用第三方框架编写Appcelerator Titanium iOS模块
我试图用外部框架编写一个新模块。我按照这里的说明:http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Module_Project-section-43288810_iOSModuleProject-AddaThird-PartyFramework关于如何添加外部框架的工作。用第三方框架编写Appcelerator Titanium iOS模块
模块编译。钛应用程序也编译。但是当在iPhone模拟器中时,应用程序崩溃(甚至在使用模块之前)。
,我发现了以下错误Titnaium演播室:
[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
中的路径,它不是我机器上的有效路径。
为什么找不到该模块?
它看起来像第三方框架的捆绑无法引用。确保将* .framework文件复制到platform/ios中,以便编译它们。同时检查Xcode设置“链接二进制库”,并确保它在那里列出。
我认为@HansKnoechel的意思是说*.framework
和iphone/platform
。这样,当模块实际上捆绑在一起时,框架也将包含在内。您可以通过检查modules/iphone/<YourModule>/<YourModuleVersion>/platform
目录来验证框架是否在正确的位置。
是否做到了。我遵循了文档的说明。我也检查过,当我将模块添加到我的Titanium项目中时,包含框架(没有它,它不在Appcelerator Studio中编译)。我也检查了一遍,并检查了文档中提到的框架搜索路径。 – developer82
嗨,谢谢你的回答。我可以在哪里找到* .bundle文件。没有看到这样的东西...... – developer82
这是关于.framework文件的@brianjd纠正。 –
它就在那里 - 我按照文档页面上的说明进行操作,它就是其中的一部分。 – developer82