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

Update to Mapbox-iOS-SDK 6.3.0 #513

Merged
merged 3 commits into from
Apr 12, 2021
Merged

Update to Mapbox-iOS-SDK 6.3.0 #513

merged 3 commits into from
Apr 12, 2021

Conversation

n8han
Copy link
Collaborator

@n8han n8han commented Jan 28, 2021

The 6.0.0 upgrade had no breaking changes:

This major release does not include any breaking changes to public
APIs. We are treating this release as a SEMVER major change because
our installation instructions have changed.
https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

I did however need to cast the accessToken as a String to satisfy
the compiler after this upgrade.

Prior to the upgrade I was seeing crashes from this bug, which was fixed
in 6.2: mapbox/mapbox-gl-native-ios#485

So far I don't see any issues at all after the upgrade.

Developers will need to configure their access token in order to fetch
the mapbox sdk for this an future versions, described here:
https://docs.mapbox.com/ios/maps/guides/install/

The 6.0.0 upgrade had no breaking changes:

> This major release does not include any breaking changes to public
> APIs. We are treating this release as a SEMVER major change because
> our installation instructions have changed.
https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

I did however need to cast the `accessToken` as a `String` to satisfy
the compiler after this upgrade.

Prior to the upgrade I was seeing crashes from this bug, which was fixed
in 6.2: mapbox/mapbox-gl-native-ios#485

So far I don't see any issues at all after the upgrade.

Developers will need to configure their access token in order to fetch
the mapbox sdk for this an future versions, described here:
https://docs.mapbox.com/ios/maps/guides/install/
@felix-ht
Copy link
Collaborator

@n8han could you look into why the ios build is failing?

@n8han
Copy link
Collaborator Author

n8han commented Feb 19, 2021

@n8han could you look into why the ios build is failing?

It’s because you have to be authenticated to download the sdk, which was not required for older versions. I added instructions to the PR and readme for how to do this for developers, but I don’t know how to arrange for the automated builds. I suppose someone with privileged access to this project can create build secrets.

@tobrun
Copy link
Collaborator

tobrun commented Mar 30, 2021

Thank you for looking into this, indeed going forward you need an access token to download the binary. Doing the same for Android in #489, need to figure out how to correctly provide secrets to github actions.

@tobrun
Copy link
Collaborator

tobrun commented Mar 30, 2021

@n8han could you update CI to match the config shown in #489?
It contains the access token as SDK_REGISTRY_IOS

Writes a `~/.netrc` file containing the credentials needed to download
the iOS mapbox sdk. I'm not experienced with github workflow so I'm just
hoping that I can write to the home directory of whatever container it
runs in. This should allow curl to find and use the given credentials.
@n8han n8han temporarily deployed to IOS_CI_DOWNLOADS_TOKEN April 1, 2021 00:54 Inactive
@n8han
Copy link
Collaborator Author

n8han commented Apr 1, 2021

@tobrun I've pushed a change and the iOS build action fails with "This check failed". Not much to go on, but perhaps my guess at the environment name is incorrect. The android build has

  build-android:
     environment: ANDROID_CI_DOWNLOADS_TOKEN

so I added

  build-iOS:
    environment: IOS_CI_DOWNLOADS_TOKEN

Does that match the workflow configuration?

@tobrun tobrun had a problem deploying to ANDROID_CI_DOWNLOADS_TOKEN April 12, 2021 17:19 Failure
@tobrun tobrun temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN April 12, 2021 17:19 Inactive
@tobrun tobrun temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN April 12, 2021 17:34 Inactive
@tobrun tobrun temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN April 12, 2021 17:34 Inactive
@tobrun tobrun merged commit cc0bbe9 into master Apr 12, 2021
@tobrun tobrun deleted the iOS6_3_0 branch April 12, 2021 17:47
@themumy10
Copy link

Hi thanks for the update. For the people like me having the 401 problem issue you explained very well the issue. For those did not understand the issue i would like to explain.
Mapbox new sdk DOES NOT ALLOW YOU TO DOWLOAD SDK WITHOUT AN ACCESS TOKEN with 6.3.0 update. Since you updated the this package it will need this token. Because this update requires mapbox 6.3.0 sdk. So to solve the issue:

  1. Go to MapBox Account Page and push Create Token Button.
  2. Give it a name and MAKE SURE DOWNLOADS:READ is CHECKED.
  3. Then push Create TOKEN button.
  4. On the main screen copy this token to some where which we will use in the next steps.
  5. Mapbox gets token with .netrc file. So we should create one paste our token in this file. This file also must be available for all other projects so open terminal
  6. If needed to bring up home directory write : cd ..
  7. When home directory is set for directory write command : touch .netrc
  8. When file created write command : open .netrc
    9.File will be opened in text editor
  9. Write this lines in the file:
    machine api.mapbox.com
    login mapbox
    password
  10. Save and close the file.
  11. Now go to the project directory
  12. Write flutter clean in terminal then go to ios folder and write pod install and all set.

@leeprobert
Copy link

leeprobert commented Jun 23, 2021

To add:

  • Make sure the .netrc file doesn't already exist. Edit existing if so.
  • Make sure the file is saved as plain text
  • Make sure when you save the file you haven't accidentally included a file extension e.g: .netrc.rtf
  • Makes sure to append the token after the password line.

m0nac0 referenced this pull request in maplibre/flutter-maplibre-gl Oct 5, 2021
* Change iOS dependencies to Maplibre

* Update MapLibre dependency

* Set iOS deployment target to 9.0

* fix Podfile syntax

* Podfile: comment out platform key

* set MinimumOSVersion: 9.0; uncomment Podfile:platform key

* CI: verbose iOS build

* Update IPHONEOS_DEPLOYMENT_TARGET to 9.0

* [web] Fix Mapbox GL JS CSS embedding (#551)

Fixes #514

* iOS: update Podfile to fix CI (#565)

* Update deprecated patterns to fix CI static analysis  (#568)

* [offline][android] Add setOffline method (#537)

* Add batch mode of screen location (#554)

* Change SDK version of example

* Add toScreenLocationBatch

* Add custom marker example

* Define which annotations consume tap events (Multiple annotations on click area management) (#575)

* AnnotationClickOrder working (not order but activation/desactivation)

* Switch to annotationConsumeTapEvents method

* Remove failed offline pack downloads (#583)

When a download error occurs, the app is informed through the channel so
that it can display an appropriate error. However, on subsequent calls
to list the available downloaded packs it is surprising to see that the
failed region download is present as if it had been downloaded.

There is no way for the app to repair this incomplete pack. Therefore,
it seems much better to clean up the failed download as soon as it's
detected. If any tiles were downloaded they will be at least temporarily
in the cache and available to a future re-download attempt. This follows
the same logic as failures caused by hitting the tile limit.

* [docs] update changelog for v0.11.0 release (#584)

* [release] update pubspec for v0.11.0 (#585)

* add annotationOrder to web (#588)

* emits onTap only for the feature above the others (#589)

* [web] update image dependency to ^3.0.2 (#598)

* [android] bumpn release to v9.6.0 and use SDK registry distribution mechanism (#489)

* [iOS][Android] Batch creation/removal for circles, fills and lines (#576)

* added batch mode

* added circle support

* added remove features

* removed test code

* inital android implementation

* added documentation

* removed unused code

* add batch example

* fix feature mamager on release build (#593)

* Improve description to enable location features (#596)

* Update to Mapbox-iOS-SDK 6.3.0 (#513)

* Update to Mapbox-iOS-SDK 6.3.0

The 6.0.0 upgrade had no breaking changes:

> This major release does not include any breaking changes to public
> APIs. We are treating this release as a SEMVER major change because
> our installation instructions have changed.
https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

I did however need to cast the `accessToken` as a `String` to satisfy
the compiler after this upgrade.

Prior to the upgrade I was seeing crashes from this bug, which was fixed
in 6.2: mapbox/mapbox-gl-native-ios#485

So far I don't see any issues at all after the upgrade.

Developers will need to configure their access token in order to fetch
the mapbox sdk for this an future versions, described here:
https://docs.mapbox.com/ios/maps/guides/install/

* Setup .netrc for iOS mapbox sdk download

Writes a `~/.netrc` file containing the credentials needed to download
the iOS mapbox sdk. I'm not experienced with github workflow so I'm just
hoping that I can write to the home directory of whatever container it
runs in. This should allow curl to find and use the given credentials.

Co-authored-by: tobrun <tobrun.van.nuland@gmail.com>

* [docs] update changeog for v0.12.0 (#602)

* [release] v0.12.0 (#603)

* fix: update MapLibre dependencies and imports.

* fix: update String cast

* Fix maplibre dependency (org.maplibre.gl has migrated to maven central)

* Update iOS MapLibre to 5.12.0

* Bump MapLibreAnnotationExtension to 0.0.1-beta.3

* Update maplibre_gl.podspec

* [iOS] - Fix compilation issue with maplibre 5.12.0

* Update CHANGELOG.md

Co-authored-by: m0nac0 <58807793+m0nac0@users.noreply.github.com>
Co-authored-by: shroff <ashroff6@gmail.com>
Co-authored-by: Yoshikage Ochi <yoshikage.ochi@mapbox.com>
Co-authored-by: Stephane Trepier <stephane.trepier@gmail.com>
Co-authored-by: Nathan <nathan@transit.app>
Co-authored-by: Tobrun <tobrun.van.nuland@gmail.com>
Co-authored-by: Andrea Valenzano <andr3a689@gmail.com>
Co-authored-by: Ahmed <ahm322@hotmail.com>
Co-authored-by: Felix Horvat <felix.horvat@ocell.aero>
Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Co-authored-by: Konrad Koeppe <konrad.koeppe@bareways.com>
Co-authored-by: Vincent Berthet <vincent@web-74.com>
@rouuuge
Copy link

rouuuge commented Feb 16, 2023

out of nowhere i got:
[!] Error installing Mapbox-iOS-SDK
[!] /usr/bin/curl -f -L -o /var/folders/r9/kr7r0jk52js8xsb1gw7v_dmh0000gn/T/d20230216-30797-qt16yk/file.zip https://api.mapbox.com/downloads/v2/mobile-maps/releases/ios/packages/6.4.1/mapbox-ios-sdk-dynamic.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.11.3 cocoapods-downloader/1.6.3'

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 39 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
curl: (22) The requested URL returned error: 401

Days ago all worked...does anyone has the same problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants