The code Bundle.main.path(for Resource: moviefilename, of Type: "mp4") returns nil while the file is present in the bundle.

Hello;

I have the following problem. It has been happening since January 10th, probably with the penultimate version of Xcode (version 12.3). I am on macos Catalina version 10.15.5.

The code Bundle.main.path(for Resource: moviefilename, of Type: "mp4") returns nil while the file is present in the bundle.

When I use simMagnifier to access the application bundle, The file corresponding to the application is greyed out and when I try to open it, I get the message “Can’t open the application because it doesn’t work on this type of Mac.” 

Have you ever encountered this problem and have you any idea how to get around it?

Sincerely

Nicolas

The code Bundle.main.path(for Resource: moviefilename, of Type: "mp4") returns nil while the file is present in the bundle.

Does this happen on a real device? Or just on the simulator?

If you delete the app and re-run, does the problem persist?

Have you got the case correct? This is the most common cause of this problem?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
The code Bundle.main.path(for Resource: moviefilename, of Type: "mp4") returns nil while the file is present in the bundle.
 
 
Q