Mapbox Scene Kit SDK for iOS
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 deprecated and no longer officially supported. The samples should continue to work but you should contact Mapbox if you intend to build a product incorporating the SDK
Requirements
The Mapbox SceneKit SDK is 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).
Installation
Using CocoaPods
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.
Using Carthage
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.
Examples
- 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.
Contributing
We welcome feedback and code contributions! Please see CONTRIBUTING.md for details.
You can join our Gitter community at Gitter
License
Mapbox SceneKit SDK for iOS is released under the ISC License. See LICENSE.md for details.