OSX App crashing on load when ParseOSX framework with Dyld Error

大城市里の小女人 提交于 2019-12-22 06:24:04

问题


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)

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 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.

UPDATE:

I just cleaned the build folder and now the app will not even run under Xcode. I get:

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

UPDATE 2:

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


回答1:


I ran into the same problem with xcode 6.1. Fixed it by adding ParseOSX.framework to "Embedded Binaries" on the general tab of the Targets page.




回答2:


Two things fixed this for me.

First I needed to add a copy files section to the build phases and copy the ParseOSX.framework into the Frameworks destination.

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.




回答3:


I was updating an existing parse project to the newest SDK (1.12.0) using Xcode 7.2 and ran into the same problem.

The solution for me was to set Runpath Search Paths to @executable_path/../Frameworks.

I found this by comparing the Starter project from Parse to my project.



来源:https://stackoverflow.com/questions/24274898/osx-app-crashing-on-load-when-parseosx-framework-with-dyld-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!