Closed CrazyGoose closed 5 years ago
@CrazyGoose: Do you have the .xcworkspace
file open and not the .xcodeproj
file?
I get errors with both.
Xcodeproj -> One error. clang: error: linker command failed with exit code 1 (use -v to see invocation)
xcworkspace -> two errors "OBJC_CLASS$_DBClientsManager", referenced from: clang: error: linker command failed with exit code 1 (use -v to see invocation)
@CrazyGoose: To get the obvious stuff out of the way, would you mind confirming that you've restarted Xcode, and then run cmd+option+shift+k
and done a clean build?
Yes,
I have cleaned derived data, restarted xcode, uninstalled pod, reinstalled pod.... many combination of each.
It is the minute I put in the code: [DBClientsManager setupWithAppKey:@"XXXXXXXXXX"]; The actual line of code does not show any errors. But it just wont compile.
Would you mind trying the step here that involves adding $(inherited)
to your project's Other Linker Flags in Build Settings, and ensure that the -ObjC
flag is included in Other Linker Flags?
DBClientsManager
uses categories, which can fail at link time sometimes if the -ObjC
flag isn't added
I believe it is already there.
@CrazyGoose: Ok, thanks. Another thing – set BUILD ACTIVE ARCHITECTURE ONLY
to NO
for both debug and release in your project's build settings. Let me know if that helps at all.
Also, if you run pod --version
and it's less than 0.25.0, you may need to update (sudo gem update cocoapods
)
Pod version 1.2.1 Changed Active Arch.. to NO for Debug. Release was already NO.
@CrazyGoose: Sorry for the radio silence here. Wanted to follow up and see if this issue was still happening for you. If it is, would you mind sending in a redacted Xcode project to the following link:
https://www.dropbox.com/developers/contact
That way, we can debug it on our end and get to the bottom of this. Either way, let me know. Thank you!
Hi scobbe, could you please help me with the same problem: ld: framework not found Pods-DBRoulette clang: error: linker command failed with exit code 1 (use -v to see invocation) I'm trying to run the sample code + all you suggestions above tried thanks!
@Schwiiz: I assume you tried everything above?
Based on your error, it seems like you don't have the .xcworkspace
file open (but instead the .xcodeproj
file).
Would you mind confirming that you have the .xcworkspace
file open while attempting to build?
unfortunately, it's .xcworkspace. it looks like this:
@Schwiiz: Oh this is the example project. Did you run pod install
in the directory that contains the Podfile
?
We don't distribute the framework code (ObjectiveDropboxOfficial) in the examples directly, but instead require you to fetch them. Let me know if this works.
Oh wait, yeah we don't distribute the workspace files either, so you must have...
@Schwiiz: Would you mind trying this:
In Project Navigator in the folder Pods look for Pods_DBRoulette.framework which is red in the above screenshot. It should also be present in Linked Frameworks and Libraries. Remove both references and see if that helps.
@scobbe ok, let me try. thanks.
@Schwiiz: Any word?
Ping @Schwiiz and @CrazyGoose.
Any update? Where you able to get this to work?
I get a mac o linker Error _OBJCCLASS$_DBClientsManager", referenced from: objc-class-ref in ofxDropBox.o
When I run on Ipad, but on simulator everything runs ok? Any Ideas?
@igiso Have you already tried the troubleshooting steps discussed earlier in this thread?
Yes I've tried, everything, I need to clarify, that my project works on Simulator, the linking problem is when testing on Device.
ps I didn't run those Pod files, I just dragged the ObjectiveDropboxOfficial.framework into the project
I tried to run them, but it made any difference
On the simulator I get this warning but it compiles:
I am putting a reference to this I think it is related:
I've solved the problem, I had to rebuild the framework for the particular device and then relink it, but now it doesn't work on the simulator,
I created two projects with shared code but different linked frameworks..
@igiso The SDK should work both on device and in the simulator. You'll need to pick one of the supported installation methods though, and follow all of the documented steps:
https://github.com/dropbox/dropbox-sdk-obj-c#sdk-distribution
It sounds like you only manually dragged in the ObjectiveDropboxOfficial.framework. To get this working, please try again using one of the officially supported installation methods.
@scobbe getting same issue while adding manually. There is only xcodeproj file
@monish152 I see you opened a new issue for your error (#238), so I'll follow up with you there to avoid spamming the other people on this old one.
Pod is installed correctly. Followed all setup as outlined but I am getting the following errors:
"_OBJCCLASS$_DBClientsManager", referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I comment out: [DBClientsManager setupWithAppKey:@"XXXXXXXXXX"]; everything complies without issue.