SQLite/SQLite-Bridging.h not found in SQLite.swift

断了今生、忘了曾经 提交于 2020-01-13 11:52:38

问题


I'm using SQLite.swit (https://github.com/stephencelis/SQLite.swift) to develop an app. I was following the Pod installation guide and can get it running on iOS simulator. However, when I try to install the app on my test device, it shows the error

/Users/.../Build/Products/Debug-iphoneos/Pods/SQLite.framework/Headers/SQLite.h:9:9: 
error: 'SQLite/SQLite-Bridging.h' file not found

Is it my way of configuration incorrect? Anyway ran into the same issue as mine?


回答1:


I initially fixed this by changing the #include line to look like below:

#import "SQLite-Bridging.h"

I find it weird that I have to make such changes. Digging in deeper, I found what I think as cached files under ~/Library/Developer/Xcode/DerivedData. I clean up the folder related to my project and run pod update. That did it for me.

I was on older version of SQLite.swift and when upgrading, I deduce that xcode did not updating some cached files. If you also came from upgrading from older, the above trick may work for you.




回答2:


This is similar to @maresa's answer, but simplifying it, all I had to do was go to Window > Projects and delete the DerivedData folder info.

(Update: In Xcode 8 this location no longer appears. Supposedly Xcode cleans up Derived Data by itself. If you want to delete it manually you can find the folder yourself by going to Preferences > Locations and clicking the gray arrow by the Derived Data folder. Then delete your project folder.)




回答3:


There are different instructions for an iOS project. Did you try these steps?

https://github.com/stephencelis/SQLite.swift/blob/master/Documentation/Index.md#frameworkless-targets




回答4:


I fixed it by cleaning the project folder.You can try to hold option ,then click Product -> Clean build folder.



来源:https://stackoverflow.com/questions/31095002/sqlite-sqlite-bridging-h-not-found-in-sqlite-swift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!