OSX App crashing on load when ParseOSX framework with Dyld Error
Asked Answered
V

3

5

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

Vicenta answered 17/6, 2014 at 23:29 Comment(4)
In step 2, when dragging the Parse framework in, did you check the checkbox to copy the file?Priestly
hey @Priestly thanks for the idea, I just re added it and the framework is in the app directory next tot he xcodeprojt file so yeah it looks like it go copied in.Vicenta
I just create a test app with only the line [Parse setApplicationId:@"rterter" clientKey:@"ertert"]; in the Delegate. Get exactly the same error. dropbox.com/s/h2xea315dldwqjc/ParseTestApp.zipVicenta
Ok so if I download the new Xcode project I can get that to run. Going to go through the build settings and see what is different.Vicenta
V
7

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.

Vicenta answered 18/6, 2014 at 3:41 Comment(2)
Note that the deep code signing option has to have two dashes, so add --deep instead.Hatred
@bojand thanks for that, I had actually added --deep.Vicenta
C
16

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.

Contrive answered 2/11, 2014 at 16:38 Comment(2)
I needed to add both ParseOX.framework and Bolts.framework as embedded binaries. Only then would it run without error. NOTE: I diff'd the remade Parse Xcode project and my own Parse project and the embedded binaries seemed to be the only difference that I could see of any importance. (Disclaimer: I didn't review each difference in depth and I'm not an export on Xcode project files, so YMMV). But the embedded binaries seem to work.Seriatim
Fixed for me too, something broke after upgrading from parse 1.7.5 to 1.9. Like always, there's no update of this lib that goes smoothNasopharynx
V
7

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.

Vicenta answered 18/6, 2014 at 3:41 Comment(2)
Note that the deep code signing option has to have two dashes, so add --deep instead.Hatred
@bojand thanks for that, I had actually added --deep.Vicenta
U
1

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.

Umbrian answered 27/1, 2016 at 14:47 Comment(1)
This fixed it for me on Xcode 7.3.1 and Parse 1.12.0. Thanks for the tip.Frustration

© 2022 - 2024 — McMap. All rights reserved.