当ParseOSX框架出现Dyld错误时,OSX应用程序在加载时崩溃 [英] OSX App crashing on load when ParseOSX framework with Dyld Error
问题描述
我有一个OSX应用程序,并且添加了ParseOSX sdk.我已按照快速入门页( https://www.parse.com/apps/quickstart#parse_data/desktop/osx/existing )
I have an OSX app and I have added the ParseOSX sdk. I have followed all the instructions on the quick start page (https://www.parse.com/apps/quickstart#parse_data/desktop/osx/existing)
该应用程序在Xcode(版本5.1.1(5B1008))中运行良好,但是当我存档并创建一个程序包并进行安装时.我收到以下Dyld错误;
The app is running fine in Xcode (Version 5.1.1 (5B1008)) but when I archive and create a package and install this. I get the following Dyld error;
Dyld错误消息: 库未加载:@executable_path/../Frameworks/ParseOSX.framework/ParseOSX 引用自:/Applications/MyApp.app/Contents/MacOS/MyApp 原因:找不到图片
Dyld Error Message: Library not loaded: @executable_path/../Frameworks/ParseOSX.framework/ParseOSX Referenced from: /Applications/MyApp.app/Contents/MacOS/MyApp Reason: image not found
它继续并列出已加载的二进制图像.
It goes on and lists the Binary Images loaded.
在网上搜索时,我发现有添加副本文件构建阶段并将解析框架添加到目标位置设置为产品"目录的解析框架的参考.
Searching the web I found reference to adding a copy files build phase and adding the parse framework to that with the destination set to Products directory.
因此,似乎没有在某处安装动态库.
So it appears there is a dynamic lib not being installed somewhere.
更新:
我刚刚清理了构建文件夹,现在该应用程序甚至无法在Xcode下运行.我得到:
I just cleaned the build folder and now the app will not even run under Xcode. I get:
模型:库未加载:@executable_path/../Frameworks/ParseOSX.framework/ParseOSX 引用自:/Users/Ants/Library/Developer/Xcode/DerivedData/MyApp-hjrbgyhzpwnxhiaskxpojqyqxnvh/Build/Products/Debug/Actual.app/Contents/MacOS/MyApp 原因:找不到图片
dyld: Library not loaded: @executable_path/../Frameworks/ParseOSX.framework/ParseOSX Referenced from: /Users/Ants/Library/Developer/Xcode/DerivedData/MyApp-hjrbgyhzpwnxhiaskxpojqyqxnvh/Build/Products/Debug/Actual.app/Contents/MacOS/MyApp Reason: image not found
更新2:
事实证明,当您进入快速入门页面时.如果选择了新的应用程序选项,则会得到一个Xcode项目.这样编译.通过它,我可以看到有一个复制文件"步骤可以将ParseOSX.framework
复制到Frameworks目标中.尝试过这是我的应用,现在出现签名错误
It turns out when you are in the quick start page. If you chose the new app option you get a Xcode project. This compiles. Going through it I can see that there is is a Copy Files step that copies the ParseOSX.framework
into the Frameworks destination. Tried this is my app and I now get a signing error
/Users/Ants/Library/Developer/Xcode/DerivedData/MyApp-hjrbgyhzpwnxhiaskxpojqyqxnvh/Build/Products/Debug/MyApp.app: code object is not signed at all
In subcomponent: /Users/Ants/Library/Developer/Xcode/DerivedData/MyApp-hjrbgyhzpwnxhiaskxpojqyqxnvh/Build/Products/Debug/MyApp.app/Contents/Frameworks/ParseOSX.framework
/Users/Ants/Library/Developer/Xcode/DerivedData/MyApp-hjrbgyhzpwnxhiaskxpojqyqxnvh/Build/Products/Debug/MyApp.app: code object is not signed at all
In subcomponent: /Users/Ants/Library/Developer/Xcode/DerivedData/MyApp-hjrbgyhzpwnxhiaskxpojqyqxnvh/Build/Products/Debug/MyApp.app/Contents/Frameworks/ParseOSX.framework
推荐答案
两件事为我解决了这个问题.
Two things fixed this for me.
首先,我需要在构建阶段添加一个复制文件部分,并将ParseOSX.framework
复制到Frameworks目标中.
First I needed to add a copy files section to the build phases and copy the ParseOSX.framework
into the Frameworks destination.
然后,我需要在构建设置"的代码签名"部分的其他代码签名标志"中添加--deep
.现在,它似乎正在复制要复制的框架.
And second, I needed to add --deep
to the "Other Code Signing Flags" in the Code Signing section of Build Settings. It now signs the frameworks being copied it seems.
这篇关于当ParseOSX框架出现Dyld错误时,OSX应用程序在加载时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!