简体   繁体   中英

Unable to get correct file path from bridge header when project name has a space

I have created a manual bridging-header using these these instructions . However, my project name has a space in it. I get the following error when compiling:

Bridging header '/Word-Word/Word-Word-Bridging-Header.h' does not exist

Here is what I have put under the bridging-header section in the project's build settings:

/Word-Word/Word-Word-Bridging-Header.h

How can I get the correct file path? Thanks!

我不得不把空间留在那里,而不是在两个字母之间添加一个破折号。

Is that truly the path? I would tend to think not, since it implies it is at the root directory.

Assuming you mean the Objective-C Bridging Header setting from Build Settings ... that path is relative to the file your .xcodeproj is located. So, for example if your structure looks like

Word-Word.xcodeproj
Word-Word/ (note this is a directory)
Word-Word/Word-Word-Bridging-Header.h

You would need the Objective-C Bridging Header to be Word-Word/Word-Word-Bridging-Header.h .

If your bridging header is in the same directory as your .xcodeproj, then you would need to set it to be: Word-Word-Bridging-Header.h

Since only you right now know your directory structure, you will need to determine the proper relative path to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM