summaryrefslogtreecommitdiff
path: root/ios/app
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-12-03 16:03:00 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-01-22 14:45:56 -0800
commit9350d3f78cee508f98bbae8d31a3a47007cb0322 (patch)
tree43d9d71c670b4a900727dcd56b59b85860b66401 /ios/app
parentded8b62c916b2ad1782486ed9d1fe5049a82c512 (diff)
downloadqtlocation-mapboxgl-9350d3f78cee508f98bbae8d31a3a47007cb0322.tar.gz
[ios] Converted iOS SDK into dynamic framework
make iproj now produces a target that pulls together static libraries like core and platform-ios into a real dynamic framework. iosapp is pretty much just a regular iOS application that links Mapbox.framework (except for the inclusion of default_styles.hpp). iosapp runs fine in the Simulator and on a device, and the same is true for any application linking against Mapbox.framework. The ipackage target produces both a Bitcode-disabled static framework and a Bitcode-enabled dynamic framework, eliminating the need for a separate framework.sh. It disables code signing, since that happens on copy when the framework is embedded inside the application bundle. It also merges the device and simulator builds into a single fat framework. Also bumped itest minimum deployment target to iOS 8.0, the first version that supports linking frameworks. Fixes #828.
Diffstat (limited to 'ios/app')
-rw-r--r--ios/app/MBXAppDelegate.m2
-rw-r--r--ios/app/MBXCustomCalloutView.h2
-rw-r--r--ios/app/MBXCustomCalloutView.m2
-rw-r--r--ios/app/MBXViewController.mm4
-rw-r--r--ios/app/mapboxgl-app.gypi45
5 files changed, 34 insertions, 21 deletions
diff --git a/ios/app/MBXAppDelegate.m b/ios/app/MBXAppDelegate.m
index bca039739a..a06424feb7 100644
--- a/ios/app/MBXAppDelegate.m
+++ b/ios/app/MBXAppDelegate.m
@@ -1,6 +1,6 @@
#import "MBXAppDelegate.h"
#import "MBXViewController.h"
-#import <mbgl/ios/Mapbox.h>
+#import <Mapbox/Mapbox.h>
@implementation MBXAppDelegate
diff --git a/ios/app/MBXCustomCalloutView.h b/ios/app/MBXCustomCalloutView.h
index 7f0a61bae3..a61619b79f 100644
--- a/ios/app/MBXCustomCalloutView.h
+++ b/ios/app/MBXCustomCalloutView.h
@@ -1,5 +1,5 @@
#import <UIKit/UIKit.h>
-#import <mbgl/ios/MGLCalloutView.h>
+#import <Mapbox/Mapbox.h>
/**
* Basic custom callout view to demonstrate how to
diff --git a/ios/app/MBXCustomCalloutView.m b/ios/app/MBXCustomCalloutView.m
index 0bbb9d99ed..8f9bd8ed40 100644
--- a/ios/app/MBXCustomCalloutView.m
+++ b/ios/app/MBXCustomCalloutView.m
@@ -1,7 +1,5 @@
#import "MBXCustomCalloutView.h"
-#import <mbgl/darwin/MGLAnnotation.h>
-
static CGFloat const tipHeight = 10.0;
static CGFloat const tipWidth = 10.0;
diff --git a/ios/app/MBXViewController.mm b/ios/app/MBXViewController.mm
index 6a2b0cc3fa..fddab78559 100644
--- a/ios/app/MBXViewController.mm
+++ b/ios/app/MBXViewController.mm
@@ -1,8 +1,8 @@
#import "MBXViewController.h"
#import "MBXCustomCalloutView.h"
-#import <mbgl/ios/Mapbox.h>
-#import <mbgl/util/default_styles.hpp>
+#import <Mapbox/Mapbox.h>
+#import "../../include/mbgl/util/default_styles.hpp"
#import <CoreLocation/CoreLocation.h>
#import <OpenGLES/ES2/gl.h>
diff --git a/ios/app/mapboxgl-app.gypi b/ios/app/mapboxgl-app.gypi
index 4fa0ba6649..f154a10e9b 100644
--- a/ios/app/mapboxgl-app.gypi
+++ b/ios/app/mapboxgl-app.gypi
@@ -3,7 +3,8 @@
'../../gyp/common.gypi',
],
'targets': [
- { 'target_name': 'iosapp',
+ {
+ 'target_name': 'iosapp',
'product_name': 'Mapbox GL',
'type': 'executable',
'product_extension': 'app',
@@ -14,50 +15,64 @@
'./polyline.geojson',
'./threestates.geojson',
'./Settings.bundle/',
- './app-info.plist'
+ './app-info.plist',
],
'dependencies': [
- 'mbgl.gyp:core',
- 'mbgl.gyp:platform-<(platform_lib)',
- 'mbgl.gyp:http-<(http_lib)',
- 'mbgl.gyp:asset-<(asset_lib)',
+ 'iossdk',
],
'sources': [
- './main.m',
- './MBXAppDelegate.h',
- './MBXAppDelegate.m',
- './MBXCustomCalloutView.h',
- './MBXCustomCalloutView.m',
- './MBXViewController.h',
- './MBXViewController.mm',
+ 'main.m',
+ 'MBXAppDelegate.h',
+ 'MBXAppDelegate.m',
+ 'MBXCustomCalloutView.h',
+ 'MBXCustomCalloutView.m',
+ 'MBXViewController.h',
+ 'MBXViewController.mm',
],
'xcode_settings': {
'SDKROOT': 'iphoneos',
'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
- 'IPHONEOS_DEPLOYMENT_TARGET': '7.0',
+ 'IPHONEOS_DEPLOYMENT_TARGET': '8.0',
'INFOPLIST_FILE': '../ios/app/app-info.plist',
'TARGETED_DEVICE_FAMILY': '1,2',
- 'COMBINE_HIDPI_IMAGES': 'NO', # don't merge @2x.png images into .tiff files
+ 'COMBINE_HIDPI_IMAGES': 'NO', # disable combining @2x, @3x images into .tiff files
+ 'COPY_PHASE_STRIP': 'NO',
'CLANG_ENABLE_OBJC_ARC': 'YES',
'CLANG_ENABLE_MODULES': 'YES',
+ 'LD_RUNPATH_SEARCH_PATHS': [
+ '$(inherited)',
+ '@executable_path/Frameworks',
+ ],
},
'configurations': {
'Debug': {
'xcode_settings': {
'CODE_SIGN_IDENTITY': 'iPhone Developer',
+ 'COPY_PHASE_STRIP': 'NO',
},
},
'Release': {
'xcode_settings': {
'CODE_SIGN_IDENTITY': 'iPhone Distribution',
'ARCHS': [ "armv7", "armv7s", "arm64", "i386", "x86_64" ],
+ 'COPY_PHASE_STRIP': 'YES',
},
},
},
+
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/$(FRAMEWORKS_FOLDER_PATH)',
+ 'files': [
+ '<(PRODUCT_DIR)/Mapbox.framework',
+ ],
+ 'xcode_code_sign': 1,
+ },
+ ],
}
]
}