Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump ios sdk to 6.3.0 #1

Merged
merged 2 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/flutter_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
# We might want to add a flutter test step in the future, when there actually are tests for this plugin

build-iOS:
environment: IOS_CI_DOWNLOADS_TOKEN
name: Build iOS package
runs-on: macos-latest

Expand All @@ -45,8 +46,13 @@ jobs:
- run: flutter pub get
- name: build iOS package
run: |
echo "machine api.mapbox.com
login mapbox
password $SDK_REGISTRY_TOKEN" >> ~/.netrc
cd ./example
flutter build ios --release --no-codesign
env:
SDK_REGISTRY_TOKEN: ${{ secrets.SDK_REGISTRY_IOS}}

build-web:
name: "Build web"
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ This Flutter plugin allows to show embedded interactive and customizable vector

- Install [Flutter](https://flutter.io/get-started/) and validate its installation with `flutter doctor`
- Clone the repository with `git clone git@github.com:tobrun/flutter-mapbox-gl.git`
- Add a Mapbox access token to the example app (see next section)
- Add a public Mapbox access token to the example app (see next section)
- Add a secret Mapbox access token for downloading the SDK
- Connect a mobile device or start an emulator, simulator or chrome
- Locate the id of a the device with `flutter devices`
- Run the app with `cd flutter_mapbox/example && flutter packages get && flutter run -d {device_id}`
Expand All @@ -25,6 +26,17 @@ The **recommended** way to provide your access token is through the `MapboxMap`

An alternative method to provide access tokens that was required until the v0.7 release is described in [this wiki article](https://github.com/tobrun/flutter-mapbox-gl/wiki/Mapbox-access-tokens).

### SDK Download token

You must also [configure a secret access token having the Download: read
scope][https://docs.mapbox.com/ios/maps/guides/install/]. If this configuration
is not present, an error like the following appears during the iOS build.

```
[!] Error installing Mapbox-iOS-SDK
curl: (22) The requested URL returned error: 401 Unauthorized
```

## Avoid Android UnsatisfiedLinkError

Update buildTypes in `android\app\build.gradle`
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/MapboxMapController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MapboxMapController: NSObject, FlutterPlatformView, MGLMapViewDelegate, Ma

init(withFrame frame: CGRect, viewIdentifier viewId: Int64, arguments args: Any?, registrar: FlutterPluginRegistrar) {
if let args = args as? [String: Any] {
if let token = args["accessToken"] as? NSString{
if let token = args["accessToken"] as? String {
MGLAccountManager.accessToken = token
}
}
Expand Down
2 changes: 1 addition & 1 deletion ios/mapbox_gl.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A new Flutter plugin.
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'MapboxAnnotationExtension', '~> 0.0.1-beta.1'
s.dependency 'Mapbox-iOS-SDK', '~> 5.6.0'
s.dependency 'Mapbox-iOS-SDK', '~> 6.3.0'
s.swift_version = '4.2'
s.ios.deployment_target = '9.0'
end
Expand Down