开发者

Can't access .mp4 files in resource folder iphone xcode

I have a file called fireFinalRotate.mp4, it开发者_C百科's in the XCode project folder (both in XCode and in finder). For some reason

NSString *path = [[NSBundle mainBundle] pathForResource:@"fireFinalRotate" ofType:@".mp4"];

returns a nil. Any thought? I'm baffled. Is it because it's a movie file? That code's in viewDidLoad.


Are you sure you have included the file in the build target when you build the app?

Right Click on the "Groups & Files", then select the "Target Membership" Item. Make sure there is a check mark next to the file which would indicate it is included in the build target.


I was going to say that the .mp4 is not a filetype but looks like you figured that out!

similar to how google thinks .edu is not a domain name but edu works when specifying what domains to search

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜