-->

“Non-portable path to file ”File.h“; specified pat

2019-03-15 08:59发布

问题:

I updated to Xcode 8.3 and Swift 3.1 and got this warning in my bridging header file, referencing to an Objective-C header file:

Non-portable path to file "File.h"; specified path differs in case from file name on disk

How can I resolve this?

回答1:

It turned out that I misspelled the file's name, the correct name was "FILE.h" instead of "File.h". The warning appeared because of the soon coming APFS to macOS.



回答2:

In my case, the !!project folder name!! isn't match the bridging header path.

I changed

"project/project-Bridging-Header.h"

to

"Project/project-Bridging-Header.h"

Tested on Xcode 9.3