box-ios-browse-sdk icon indicating copy to clipboard operation
box-ios-browse-sdk copied to clipboard

Unable to run sample code: dyld: Library not loaded: @rpath/BoxContentSDK.framework/BoxContentSDK

Open tylerjames opened this issue 6 years ago • 3 comments

I'm trying to run the sample app. I've installed Carthage and run: carthage update --platform iOS in the directory. It appears to have executed successfully.

When I try to run the project in the simulator it builds but immediately crashes with this error:

dyld: Library not loaded: @rpath/BoxContentSDK.framework/BoxContentSDK
Referenced from: /Users/Tyler/Library/Developer/CoreSimulator/Devices/B04EF5A8-71DE-40C8-8D78-1D6D640ED4AC/data/Containers/Bundle/Application/2FBAA231-F522-48C3-96A2-C538A51DE0B4/BoxBrowseSDKSampleApp.app/BoxBrowseSDKSampleApp
Reason: image not found

There are no additional steps in the instructions for running the sample app, though I did create an app on your developer portal and input my client ID and secret.

I've tried the usual steps of deleting Derived Data, cleaning the app and rebuilding but to no avail.

Have I missed something?

tylerjames avatar Sep 26 '17 20:09 tylerjames

Hi Tyler,

Can you pull the latest release, 1.0.9? https://github.com/box/box-ios-browse-sdk/releases/tag/v1.0.9

We had an issue in the Sample app project, the BoxContentSDK should have been included in it's project as an embedded linked library. In addition, I updated an import module reference in the Browser SDK that referenced the Box Content SDK. https://github.com/box/box-ios-browse-sdk/pull/129

I should have probably added the following to project commit, but simple enough to correct. The browse sdk is dependent on two 3rd party libraries. MBProgressHUD and Masonry. They will both get installed into the Carthage/Build/iOS directory when you run the above carthage command.

After carthage completes, in xCode, select the 'BoxBrowseSDKSampleApp' project-> select the 'General' tab and add (+) both of these frameworks for the 'Embedded Binaries'. They should be listed, if not drag and drop them from the Carthage/Build/iOS directory.

Let me know how it works out, Jim

jdizoglio avatar Sep 26 '17 22:09 jdizoglio

Thanks @jdizoglio that got it running.

Next problem is that it shows a white screen with a button that says "Start" and after clicking it I end at an authorization error page that says:

Error: redirect_uri_mismatch

I imagine there's some kind of additional setup that I need to do in order to get OAuth working for the sample?

tylerjames avatar Sep 27 '17 15:09 tylerjames

Not working sample project. Please fix it

Build Failed Task failed with exit code 65: /usr/bin/xcrun xcodebuild -project /Users/Innoppl/Downloads/box-ios-browse-sdk-master/BoxBrowseSDKSampleApp/Carthage/Checkouts/box-ios-sdk/BoxContentSDK/BoxContentSDK.xcodeproj -scheme BoxContentSDK -configuration Release -derivedDataPath /Users/Innoppl/Library/Caches/org.carthage.CarthageKit/DerivedData/11.2_11B52/box-ios-sdk/v1.1.3 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/1p/1mzv8q3j0m7cnclxvdkw39qw0000gn/T/box-ios-sdk SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/Innoppl/Downloads/box-ios-browse-sdk-master/BoxBrowseSDKSampleApp/Carthage/Checkouts/box-ios-sdk)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/1p/1mzv8q3j0m7cnclxvdkw39qw0000gn/T/carthage-xcodebuild.QXo48r.log

sarrathy avatar Nov 07 '19 11:11 sarrathy