diff --git a/platform/ios/platform/ios/INSTALL.md b/platform/ios/platform/ios/INSTALL.md index 85c8be898..8785347de 100644 --- a/platform/ios/platform/ios/INSTALL.md +++ b/platform/ios/platform/ios/INSTALL.md @@ -23,37 +23,44 @@ Before building, follow these steps to install prerequisites: 1. Install [Xcode](https://developer.apple.com/xcode/) 1. Launch Xcode and install any updates 1. Install [Homebrew](http://brew.sh) -1. Install [Node.js](https://nodejs.org/), [CMake](https://cmake.org/), [ccache](https://ccache.samba.org), and [pkg-config](https://formulae.brew.sh/formula/pkg-config-wrapper#default), [glfw](https://formulae.brew.sh/formula/glfw): - +1. Install additional dependencies. ```bash - brew list node || brew install node - brew list cmake || brew install cmake - brew list ccache || brew install ccache - brew list pkg-config || brew install pkg-config - brew list glfw || brew install glfw + brew install node cmake ccache pkg-config glfw cmake-docs + ``` - # To install the CMake documentation - brew list cmake-docs || brew install cmake-docs +1. Install [xcpretty](https://github.com/supermarin/xcpretty) for prettifying command line builds. (optional): ``` -1. Install [xcpretty](https://github.com/supermarin/xcpretty) (optional, used for prettifying command line builds): + sudo gem install xcpretty ``` - [sudo] gem install xcpretty +1. Install [jazzy](https://github.com/realm/jazzy) for generating API documentation (optional): ``` -1. Install [jazzy](https://github.com/realm/jazzy) for generating API documentation: - ``` - [sudo] gem install jazzy + sudo gem install jazzy ``` +### Build the iOS Demo App + +``` +git clone --recurse-submodules git@github.com:maplibre/maplibre-gl-native.git +cd maplibre-gl-native/platform/ios +make iproj +``` + +Xcode should automatically open, and you can then build the Demo App (iosapp). + +![iosapp](https://user-images.githubusercontent.com/556367/214957991-7ddb56b1-937e-4a15-a03c-36f355677cf6.png) + +If you wish to deploy on attached hardware, you need to setup your Apple Developer account and select it in the *Signing and Capabilities* menu. + +![Team](https://user-images.githubusercontent.com/556367/214957613-2d565b1a-6590-495e-8979-2022096e02f1.png) + ### Building the SDK 1. Clone the git repository: ```bash - git clone https://github.com/maplibre/maplibre-gl-native.git + git clone --recurse-submodules https://github.com/maplibre/maplibre-gl-native.git cd maplibre-gl-native ``` - Note that this repository uses Git submodules. They'll be automatically checked out when you first run a `make` command, - but are not updated automatically. We recommended that you run `git submodule update` after pulling down new commits to - this repository. + Note that you must check out the project's git submodules to build. If you did not include `--recurse-submodules` in the clone, you can later run `git submdule update --init`. 1. Run `make iframework BUILDTYPE=Release`. The packaging script will produce a `build/ios/pkg/` folder containing: - a `dynamic` folder containing a dynamically-linked fat framework with debug symbols for devices and the iOS Simulator - a `documentation` folder with HTML API documentation diff --git a/platform/ios/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/platform/ios/ios.xcodeproj/project.pbxproj index a9cb22b0b..5723e98a4 100644 --- a/platform/ios/platform/ios/ios.xcodeproj/project.pbxproj +++ b/platform/ios/platform/ios/ios.xcodeproj/project.pbxproj @@ -2811,9 +2811,8 @@ }; DA1DC9491CB6C1C2006E619F = { CreatedOnToolsVersion = 7.3; - DevelopmentTeam = KBDAWM7T4E; LastSwiftMigration = 0820; - ProvisioningStyle = Manual; + ProvisioningStyle = Automatic; }; DA2E88501CC036F400F24E7B = { CreatedOnToolsVersion = 7.3; @@ -3741,13 +3740,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = KBDAWM7T4E; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = app/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.maplibre.maplibregl; PRODUCT_NAME = "MapLibre GL"; - PROVISIONING_PROFILE_SPECIFIER = "MapLibre GL TestApp Development"; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = RelWithDebInfo; }; @@ -4328,13 +4328,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = KBDAWM7T4E; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = app/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.maplibre.maplibregl; PRODUCT_NAME = "MapLibre GL"; - PROVISIONING_PROFILE_SPECIFIER = "MapLibre GL TestApp Development"; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Debug; }; @@ -4345,13 +4346,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = KBDAWM7T4E; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = app/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.maplibre.maplibregl; PRODUCT_NAME = "MapLibre GL"; - PROVISIONING_PROFILE_SPECIFIER = "MapLibre GL TestApp Development"; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Release; };