我试图用外部框架编写一个新模块。我已按照此处的说明操作:http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Module_Project-section-43288810_iOSModuleProject-AddaThird-PartyFramework了解如何添加外部框架。
模块编译。 Titanium应用程序也可以编译。但是当在iPhone模拟器内部时,应用程序崩溃(甚至在使用模块之前)。
我在Titnaium Studio中收到以下错误:
[ERROR] : An error occurred during build after 1m 19s 125ms
[ERROR] : Detected multiple crashes:
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-05-193036_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-05-193042_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-05-193122_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-05-193354_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-064617_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-072141_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-072205_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-072249_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-073843_Ophirs-Mac-mini.crash
[ERROR] : Note: these crashes may or may not be related to running your app.
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous> (/Users/ophir/.appcelerator/install/5.0.4/package/node_modules/appc-cli-titanium/plugins/run.js:92:66)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
TRACE | Sending exit signal to titanium process: 19220
我在崩溃日志中检查了这是我得到的:
Dyld Error Message:
Library not loaded: @rpath/SweetAlertFramework.framework/SweetAlertFramework
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/6451C367-A7B7-437D-956F-57E86D8419FD/data/Containers/Bundle/Application/683ED437-B0E6-42F0-BC8E-26B2E95829CA/SweetAlertDialogTest.app/SweetAlertDialogTest
Reason: image not found
我已经检查了module.xcconfig
内的路径并且它是正确的。这里看起来很奇怪的另一件事是崩溃日志/Users/USER/Library/Developer/CoreSimulator/Devices/6451C367-A7B7-437D-956F-57E86D8419FD/data/Containers/Bundle/Application/683ED437-B0E6-42F0-BC8E-26B2E95829CA/SweetAlertDialogTest.app/SweetAlertDialogTest
中的路径,它不是我机器上的有效路径。
为什么找不到该模块?
答案 0 :(得分:1)
我认为@HansKnoechel意味着说*.framework
和iphone/platform
。这样,当模块实际捆绑时,框架也将被包含在内。您可以通过查看modules/iphone/<YourModule>/<YourModuleVersion>/platform
目录来验证框架是否在正确的位置。
答案 1 :(得分:0)
看起来无法引用第三方框架的捆绑包。确保将* .framework文件复制到platform / ios中,以便编译它们。同时检查Xcode设置&#34;将二进制文件与库&#34;并确保它列在那里。