From 13e2acbc754893efb945fe02d20824698415dcdb Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 11 Feb 2016 12:21:49 -0800 Subject: [ios, osx] Consolidate remaining files in platform/{ios,osx} --- platform/ios/framework/Info.plist | 24 +++++++ platform/ios/framework/Mapbox.h | 26 ++++++++ platform/ios/framework/Mapbox.m | 29 +++++++++ platform/ios/framework/Settings.bundle/Root.plist | 33 ++++++++++ .../Settings.bundle/en.lproj/Root.strings | Bin 0 -> 552 bytes platform/ios/framework/framework-ios.gypi | 70 +++++++++++++++++++++ platform/ios/framework/modulemap | 8 +++ platform/ios/framework/strip-frameworks.sh | 70 +++++++++++++++++++++ 8 files changed, 260 insertions(+) create mode 100644 platform/ios/framework/Info.plist create mode 100644 platform/ios/framework/Mapbox.h create mode 100644 platform/ios/framework/Mapbox.m create mode 100644 platform/ios/framework/Settings.bundle/Root.plist create mode 100644 platform/ios/framework/Settings.bundle/en.lproj/Root.strings create mode 100644 platform/ios/framework/framework-ios.gypi create mode 100644 platform/ios/framework/modulemap create mode 100755 platform/ios/framework/strip-frameworks.sh (limited to 'platform/ios/framework') diff --git a/platform/ios/framework/Info.plist b/platform/ios/framework/Info.plist new file mode 100644 index 0000000000..3bf250da27 --- /dev/null +++ b/platform/ios/framework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.0.0 + CFBundleSignature + ???? + CFBundleVersion + 0 + + diff --git a/platform/ios/framework/Mapbox.h b/platform/ios/framework/Mapbox.h new file mode 100644 index 0000000000..11f163376a --- /dev/null +++ b/platform/ios/framework/Mapbox.h @@ -0,0 +1,26 @@ +#import + +/// Project version number for Mapbox. +FOUNDATION_EXPORT double MapboxVersionNumber; + +/// Project version string for Mapbox. +FOUNDATION_EXPORT const unsigned char MapboxVersionString[]; + +#import "MGLAccountManager.h" +#import "MGLAnnotation.h" +#import "MGLAnnotationImage.h" +#import "MGLCalloutView.h" +#import "MGLMapCamera.h" +#import "MGLGeometry.h" +#import "MGLMapView.h" +#import "MGLMapView+IBAdditions.h" +#import "MGLMapView+MGLCustomStyleLayerAdditions.h" +#import "MGLMultiPoint.h" +#import "MGLOverlay.h" +#import "MGLPointAnnotation.h" +#import "MGLPolygon.h" +#import "MGLPolyline.h" +#import "MGLShape.h" +#import "MGLStyle.h" +#import "MGLTypes.h" +#import "MGLUserLocation.h" diff --git a/platform/ios/framework/Mapbox.m b/platform/ios/framework/Mapbox.m new file mode 100644 index 0000000000..93f58b9be6 --- /dev/null +++ b/platform/ios/framework/Mapbox.m @@ -0,0 +1,29 @@ +#import + +#import "../src/NSBundle+MGLAdditions.h" +#import "../src/NSProcessInfo+MGLAdditions.h" +#import "../../darwin/src/NSString+MGLAdditions.h" + +__attribute__((constructor)) +static void InitializeMapbox() { + static int initialized = 0; + if (initialized) { + return; + } + + mgl_linkBundleCategory(); + mgl_linkStringCategory(); + mgl_linkProcessInfoCategory(); + + [MGLAccountManager class]; + [MGLAnnotationImage class]; + [MGLMapCamera class]; + [MGLMapView class]; + [MGLMultiPoint class]; + [MGLPointAnnotation class]; + [MGLPolygon class]; + [MGLPolyline class]; + [MGLShape class]; + [MGLStyle class]; + [MGLUserLocation class]; +} diff --git a/platform/ios/framework/Settings.bundle/Root.plist b/platform/ios/framework/Settings.bundle/Root.plist new file mode 100644 index 0000000000..889610e152 --- /dev/null +++ b/platform/ios/framework/Settings.bundle/Root.plist @@ -0,0 +1,33 @@ + + + + + PreferenceSpecifiers + + + Title + Privacy Settings + Type + PSGroupSpecifier + FooterText + This setting allows the application to share anonymized location and usage data with Mapbox. + + + DefaultValue + + Key + MGLMapboxMetricsEnabled + Title + Mapbox Telemetry + Type + PSToggleSwitchSpecifier + TrueValue + + FalseValue + + + + StringsTable + Root + + diff --git a/platform/ios/framework/Settings.bundle/en.lproj/Root.strings b/platform/ios/framework/Settings.bundle/en.lproj/Root.strings new file mode 100644 index 0000000000..e7658d692d Binary files /dev/null and b/platform/ios/framework/Settings.bundle/en.lproj/Root.strings differ diff --git a/platform/ios/framework/framework-ios.gypi b/platform/ios/framework/framework-ios.gypi new file mode 100644 index 0000000000..1dcc2c0f9d --- /dev/null +++ b/platform/ios/framework/framework-ios.gypi @@ -0,0 +1,70 @@ +{ + 'includes': [ + '../../../gyp/common.gypi', + ], + 'targets': [ + { + 'target_name': 'iossdk', + 'product_name': 'Mapbox', + 'type': 'shared_library', + 'mac_bundle': 1, + + 'dependencies': [ + 'mbgl.gyp:core', + 'mbgl.gyp:platform-<(platform_lib)', + 'mbgl.gyp:http-<(http_lib)', + 'mbgl.gyp:asset-<(asset_lib)', + ], + + 'xcode_settings': { + 'CLANG_ENABLE_OBJC_ARC': 'YES', + 'COMBINE_HIDPI_IMAGES': 'NO', # disable combining @2x, @3x images into .tiff files + 'CURRENT_PROJECT_VERSION': '0', + 'DEFINES_MODULE': 'YES', + 'DYLIB_INSTALL_NAME_BASE': '@rpath', + 'INFOPLIST_FILE': '../platform/ios/framework/Info.plist', + 'LD_RUNPATH_SEARCH_PATHS': [ + '$(inherited)', + '@executable_path/Frameworks', + '@loader_path/Frameworks', + ], + 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.sdk.ios', + 'OTHER_LDFLAGS': [ '-stdlib=libc++', '-lstdc++' ], + 'SDKROOT': 'iphoneos', + 'SKIP_INSTALL': 'YES', + 'SUPPORTED_PLATFORMS': [ + 'iphonesimulator', + 'iphoneos', + ], + 'VERSIONING_SYSTEM': 'apple-generic', + }, + + 'mac_framework_headers': [ + 'Mapbox.h', + '