[osx] Fixed standalone launch of osxapp (and run-xosx)

Mapbox.framework needs to be embedded in the application bundle.
This commit is contained in:
Minh Nguyễn
2015-12-03 13:28:20 -08:00
committed by Minh Nguyễn
parent ea57be5598
commit bab3935431
4 changed files with 21 additions and 21 deletions

View File

@@ -8,7 +8,9 @@ This project provides an OS X SDK analogous to the Mapbox iOS SDK. Mapbox does n
### Install
1. Copy `gyp/build/Release/Mapbox.framework` into your project. It should happen automatically, but ensure that `Mapbox.framework` is listed in the *Linked Frameworks and Libraries* section of the General tab for your application target.
1. Copy `gyp/build/Release/Mapbox.framework` into your project.
1. In the project editor, select your application target, go to the General tab, and add `Mapbox.framework` to the *Embedded Binaries* section.
1. Mapbox vector tiles require a Mapbox account and API access token. In the project editor, select the application target. In the Info tab, set `MGLMapboxAccessToken` to your access token. You can obtain one from the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/).

View File

@@ -23,42 +23,27 @@
'../platform/darwin/NSException+MGLAdditions.h',
'../platform/darwin/NSString+MGLAdditions.h',
'../platform/darwin/NSString+MGLAdditions.m',
'../include/mbgl/darwin/MGLTypes.h',
'../platform/darwin/MGLTypes.m',
'../include/mbgl/darwin/MGLStyle.h',
'../platform/darwin/MGLStyle.mm',
'../include/mbgl/darwin/MGLGeometry.h',
'../platform/darwin/MGLGeometry_Private.h',
'../platform/darwin/MGLGeometry.mm',
'../include/mbgl/darwin/MGLAnnotation.h',
'../include/mbgl/darwin/MGLShape.h',
'../platform/darwin/MGLShape.m',
'../include/mbgl/darwin/MGLMultiPoint.h',
'../platform/darwin/MGLMultiPoint_Private.h',
'../platform/darwin/MGLMultiPoint.mm',
'../include/mbgl/darwin/MGLOverlay.h',
'../include/mbgl/darwin/MGLPointAnnotation.h',
'../platform/darwin/MGLPointAnnotation.m',
'../include/mbgl/darwin/MGLPolyline.h',
'../platform/darwin/MGLPolyline.mm',
'../include/mbgl/darwin/MGLPolygon.h',
'../platform/darwin/MGLPolygon.mm',
'../include/mbgl/osx/MGLAccountManager.h',
'../platform/osx/src/MGLAccountManager_Private.h',
'../platform/osx/src/MGLAccountManager.m',
'../include/mbgl/osx/MGLMapView.h',
'../platform/osx/src/MGLMapView_Private.h',
'../platform/osx/src/MGLMapView.mm',
'../include/mbgl/osx/MGLMapView+IBAdditions.h',
'../platform/osx/src/MGLMapView+IBAdditions.m',
'../include/mbgl/osx/MGLMapViewDelegate.h',
'../platform/osx/src/MGLOpenGLLayer.h',
'../platform/osx/src/MGLOpenGLLayer.mm',
'../platform/osx/src/MGLCompassCell.h',
'../platform/osx/src/MGLCompassCell.m',
'../platform/osx/src/MGLAttributionButton.h',
'../platform/osx/src/MGLAttributionButton.m',
'../include/mbgl/osx/MGLAnnotationImage.h',
'../platform/osx/src/MGLAnnotationImage.m',
'../platform/osx/src/NSBundle+MGLAdditions.h',
'../platform/osx/src/NSBundle+MGLAdditions.m',

View File

@@ -34,12 +34,26 @@
],
'xcode_settings': {
'SDKROOT': 'macosx',
'SUPPORTED_PLATFORMS':'macosx',
'INFOPLIST_FILE': '../platform/osx/app/Info.plist',
'CLANG_ENABLE_OBJC_ARC': 'YES',
'INFOPLIST_FILE': '../platform/osx/app/Info.plist',
'LD_RUNPATH_SEARCH_PATHS': [
'$(inherited)',
'@executable_path/../Frameworks',
],
'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.MapboxGL',
'SDKROOT': 'macosx',
'SUPPORTED_PLATFORMS': 'macosx',
},
'copies': [
{
'destination': '<(PRODUCT_DIR)/$(FRAMEWORKS_FOLDER_PATH)',
'files': [
'<(PRODUCT_DIR)/Mapbox.framework',
],
'xcode_code_sign': 1,
}
],
},
]
}

View File

@@ -25,7 +25,7 @@
'INFOPLIST_FILE': '../platform/osx/sdk/Info.plist',
'LD_RUNPATH_SEARCH_PATHS': [
'$(inherited)',
'@executable_path/Frameworks',
'@executable_path/../Frameworks',
'@loader_path/Frameworks',
],
'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.MapboxGL',
@@ -42,7 +42,6 @@
],
'sources': [
'./Mapbox.h',
'./Mapbox.m',
],