Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

App Crash due to missing mapbox.png | mapbox-ios-sdk-3.1.0-pre.1-dynamic #4011

Closed
Mamonaku opened this issue Feb 18, 2016 · 5 comments
Closed
Labels
build iOS Mapbox Maps SDK for iOS

Comments

@Mamonaku
Copy link

Hi There,
I've followed the instructions in the readme file, to integrate the dynamic framework mapbox-ios-sdk-3.1.0-pre.1-dynamic. I'm not using cocoapods. The app crashes with:

*** Terminating app due to uncaught exception 'Resource not found', reason: 'The resource named “mapbox.png” could not be found in the Mapbox framework bundle.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001028fbe65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000102374deb objc_exception_throw + 48
    2   CoreFoundation                      0x00000001028fbd9d +[NSException raise:format:] + 205
    3   awMapBoxTest                        0x0000000100c36ae7 +[MGLMapView resourceImageNamed:] + 279
    4   awMapBoxTest                        0x0000000100c21992 -[MGLMapView commonInit] + 1506
    5   awMapBoxTest                        0x0000000100c20ddb -[MGLMapView initWithFrame:] + 107
    6   awMapBoxTest                        0x0000000100aec9bd -[ViewController viewDidLoad] + 269
    7   UIKit                               0x0000000102f83f98 -[UIViewController loadViewIfRequired] + 1198
    8   UIKit                               0x0000000102f842e7 -[UIViewController view] + 27
    9   UIKit                               0x0000000102e5aab0 -[UIWindow addRootViewControllerViewIfPossible] + 61
    10  UIKit                               0x0000000102e5b199 -[UIWindow _setHidden:forced:] + 282
    11  UIKit                               0x0000000102e6cc2e -[UIWindow makeKeyAndVisible] + 42
    12  UIKit                               0x0000000102de5663 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
    13  UIKit                               0x0000000102debcc6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1760
    14  UIKit                               0x0000000102de8e7b -[UIApplication workspaceDidEndTransaction:] + 188
    15  FrontBoardServices                  0x0000000108902754 -[FBSSerialQueue _performNext] + 192
    16  FrontBoardServices                  0x0000000108902ac2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    17  CoreFoundation                      0x0000000102827a31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    18  CoreFoundation                      0x000000010281d95c __CFRunLoopDoSources0 + 556
    19  CoreFoundation                      0x000000010281ce13 __CFRunLoopRun + 867
    20  CoreFoundation                      0x000000010281c828 CFRunLoopRunSpecific + 488
    21  UIKit                               0x0000000102de87cd -[UIApplication _run] + 402
    22  UIKit                               0x0000000102ded610 UIApplicationMain + 171
    23  awMapBoxTest                        0x0000000100aecfbf main + 111
    24  libdyld.dylib                       0x00000001063c492d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Any ideas?
thanks!

@1ec5
Copy link
Contributor

1ec5 commented Feb 18, 2016

First of all, please try upgrading to version 3.1.1. We fixed some build issues since 3.1.0-pre.1.

Can you look inside the build product and verify that Mapbox.framework is directly inside the application bundle?

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS build labels Feb 18, 2016
@Mamonaku
Copy link
Author

One day lost on this one, what a waste. Could you please update your readme, instead of
"folder into the “Embedded Binaries” section of the General tab."
replace by
"folder into the “Embedded Binaries” section of the General tab (i.e. NOT as a framework / in Link Binary with Library section)"

Yeah, guilty on this one. I'm sure I'm not the only one.

thanks!

@friedbunny
Copy link
Contributor

Thanks for the suggestion.

1ec5 added a commit that referenced this issue Feb 18, 2016
People are used to dragging frameworks into the Linked Frameworks and Libraries section, but the SDK only works when embedded inside the application.

Fixes #4011.
@1ec5
Copy link
Contributor

1ec5 commented Feb 18, 2016

Clarified in a57a88a.

@Mamonaku
Copy link
Author

thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

3 participants