views:

2802

answers:

1

I am attempting to set up my own project using a third party library (MPOAuthConnection) for connecting to an oauth REST API.

Steps I've gone through thus far:

  1. Downloaded source for MPOAuthConnection.
  2. Built source and had a resulting MPOAuth.framework in the Product tab.
  3. Opened my existing project and dragged the MPOAuth.framework into the "Linked Frameworks" of my project.
  4. Build my project and it fails at Runtime with the following error

[Session started at 2009-11-03 16:41:37 -0600.]
Warning - No location found for "OAuthClientController.m:68"
GNU gdb 6.3.50-20050815 (Apple version gdb-1344) (Fri Jul 3 01:19:56 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys002
Loading program into debugger…
sharedlibrary apply-load-rules all
warning: Unable to read symbols for
"@executable_path/../Frameworks/MPOAuth.framework/Versions/A/MPOAuth" (file not found).
warning: Unable to read symbols from "MPOAuth" (not yet mapped into memory).
Program loaded.
run
[Switching to process 32686]
Running…
dyld: Library not loaded:
@executable_path/../Frameworks/MPOAuth.framework/Versions/A/MPOAuth
Referenced from:
/Users/markpowell/Documents/Programming/Cocoa/Celery/build/Debug/Celery.app/Contents/MacOS/Celery
Reason: image not found
No memory available to program now: unsafe to call malloc
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Not safe to call dlopen at this time.)

So apparently, it can't find any of the framework information at runtime, but can at compile time? I'm a bit new to the OS X platform, so still struggling a bit with the tools. Any help would be greatly appreciated.

EDIT: I did add a new Build Phase -> New Copy Files Build phase, dragged the Framework (MPOAuth.framework) to the dialog and set it to go to Frameworks. But still got the same error.

+5  A: 

It looks like you haven't copied the MPOAuth framework into your application bundle:

"@executable_path/../Frameworks/MPOAuth.framework/Versions/A/MPOAuth" (file not found).

The @exectuable_path is the path to your application binary inside of ".../MyApp.app/Contents/MacOS"

You should create a new build phase for your target, "Copy Files Phase" that specifies the destination as "Frameworks". Drag the MPOAuth framework in your Xcode project into that path and it will be copied into the correct location.

EDIT Nov 3rd, 2009: 17:59 EST: I would highly suggest reading the Xcode documentation as it saved me a ton of time when I learned how to use this tool effectively. Select "Xcode Help" from the "Help" menu while Xcode is active.

Lyndsey Ferguson
Yeah, I suppose it is time to dig deeper into the help text. I did create the new build phase, but without any luck. Which implies that the copy of the files didn't work as expected...
MarkPowell
Thank you, further upon further inspection, I failed to drag the actual framework under the copy build phase.
MarkPowell