Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSX App crashing on load when ParseOSX framework with Dyld Error

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

like image 961
Ants Avatar asked Jun 17 '14 23:06

Ants


3 Answers

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.

like image 166
mark.ed Avatar answered Oct 07 '22 19:10

mark.ed


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.

like image 23
Ants Avatar answered Oct 07 '22 19:10

Ants


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.

enter image description here

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

like image 1
Benedicte Raae Avatar answered Oct 07 '22 21:10

Benedicte Raae