Using Swift, bringing our rich 3D terrain into your iOS app is easy. SceneKit SDK benefits from Apple’s toolchain and tight integration with ARKit. Using Apple's built-in Scene Kit frameworks means you can leverage compelling virtual terrain experiences without bloating your app's size.
Note this SDK is in its beta phase and will be under heavy development as we move towards our 1.0
The Mapbox Scene Kit SDK are compatible with applications written in Swift 4 or Objective-C in Xcode 9.0, and require iOS 8 or above (the examples require iOS 11 or above).
To install Mapbox Scene Kit using CocoaPods:
-
Create a Podfile with the following specification:
pod 'MapboxSceneKit', :git => 'https://github.com/mapbox/mapbox-scenekit.git' pod 'MapboxMobileEvents'
The platform specified in your Podfile should be
:iOS '11'
-
Run
pod repo update && pod install
and open the resulting Xcode workspace. -
In
Info.plist
, addMGLMapboxAccessToken
with your Mapbox Access Token as the value.
Alternatively, to install Mapbox SceneKit using Carthage:
-
Create a Cartfile with the following dependency:
github "mapbox/mapbox-scenekit" "master"
-
Run
carthage update --platform iOS
to build just the iOS dependencies. -
Follow the rest of Carthage’s iOS integration instructions. Your application target’s Embedded Frameworks should include MapboxSceneKit.framework.
-
In
Info.plist
, addMGLMapboxAccessToken
with your Mapbox Access Token as the value. -
Include
import MapboxSceneKit
at the top of your ViewController.
- Clone the repository or download the .zip file
- Run
carthage update --platform ios
to build just the iOS dependencies. - Open
MapboxSceneKit.xcodeproj
. - Sign up or log in to your Mapbox account and grab a Mapbox Access Token.
- Open the Info.plist for
Example
and paste your Mapbox Access Token intoMGLMapboxAccessToken
. (Alternatively, if you plan to use this project as the basis for a public project on GitHub, place the access token in a plain text file named.mapbox
ormapbox
in your home directory instead of adding it to Info.plist.) - Build and run the
Examples
target.
We welcome feedback and code contributions! Please see CONTRIBUTING.md for details.
You can join our Gitter community at Gitter
Mapbox SceneKit SDK for iOS is released under the ISC License. See LICENSE.md for details.