[英]Xcode 4.2: Build for Archive is good, but Archive fails with errors
[英]Xcode 8: Archive build fails (for nested frameworks) with link errors. Regular build compiles successfully
編輯似乎問題已深入到它以調試模式而不是發布模式構建的事實。 仍在嘗試理解為什么它內置於一個而不是另一個中
原始問題
我有一個具有以下結構的Xcode工作區。
工作空間:
FrameworkB嵌套在FrameworkA中,因此FrameworkA依賴於FrameworkB。 兩者都是我創建的自定義框架。
它可以構建和編譯良好。 當我嘗試對其進行存檔時,出現以下錯誤:
Undefined symbols for architecture armv7:
"ADI4ONS.Connection4ONS.connectionStat.getter : Swift.Bool", referenced from:
type metadata for AircraftServices.connection in Connection.o
"ADI4ONS.Connection4ONS.connectionStat.setter : Swift.Bool", referenced from:
type metadata for AircraftServices.connection in Connection.o
"ADI4ONS.Connection4ONS.connectionStat.materializeForSet : Swift.Bool", referenced from:
type metadata for AircraftServices.connection in Connection.o
"ADI4ONS.Connection4ONS.connectionString.getter : Swift.String", referenced from:
type metadata for AircraftServices.connection in Connection.o
"ADI4ONS.Connection4ONS.connectionString.setter : Swift.String", referenced from:
type metadata for AircraftServices.connection in Connection.o
"ADI4ONS.Connection4ONS.connectionString.materializeForSet : Swift.String", referenced from:
type metadata for AircraftServices.connection in Connection.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ADI4ONS是frameworkB,而AircraftServices是FrameworkA。 歡迎任何幫助。
項目/目標配置
實驗嘗試過我嘗試過的一些方法
嘗試將“存檔”設置為“調試”(而不是編輯模式中的默認“發布”):沒有運氣
為UIProject創建了一個獨立的工作區,並將二進制框架導入了該工作區。 檔案成功:作品很棒(但不是我想要的)
好吧,經過大量的研究和實驗,這是我的結果。
因此,我找出了導致發布模式構建中出現問題的參數。 它是“快速編譯器-代碼生成:優化級別”。 它具有三個值
我試圖對WMO進行更多研究,但並沒有對其進行深入研究。 好像它是在Xcode 7中引入的。
而且我的框架都在Swift中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.