當前位置:編程學習大全網 - 網站源碼 - iOS編譯錯誤-Include of non-modular header inside framework module xxxx

iOS編譯錯誤-Include of non-modular header inside framework module xxxx

在SDK開發過程中,我們自己的framework庫中的壹個.h文件引用了pod庫中的類。

這時候以源碼的形式build是沒有問題的,但是當build出靜態庫後,添加到其他項目中使用時,就報 Include of non-modular header inside framework module xxxx 錯誤。

為什麽會這樣呢?

因為Xcode在默認情況下是不允許在framework中的頭文件引入壹個不屬於任何Module的頭文件。

那應該怎麽解決呢?

方式壹:

target 下的 Build Settings 中的 Allow Non-modular includes in Framework Modules 設置成YES。

方式二:

將#import "**.h" 第三方庫寫在 .m文件中,而不是放在.h文件中。

# Include of non-modular header inside framework module

  • 上一篇:尋求JS高手,有問題現在需要幫助。
  • 下一篇:如何用caffe的python接口實現cnn
  • copyright 2024編程學習大全網