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

Upgrade iOS SDK to 6.0.0 #986

Closed
lukemcgregor opened this issue Aug 10, 2020 · 11 comments · Fixed by #1044
Closed

Upgrade iOS SDK to 6.0.0 #986

lukemcgregor opened this issue Aug 10, 2020 · 11 comments · Fixed by #1044
Labels
iOS iOS related tickets

Comments

@lukemcgregor
Copy link

It looks like there is a new version of the underlying iOS mapbox SDK, I'm getting the following in logs (v8.1.0-rc.2)

Mapbox Maps SDK for iOS version 6.0.0 is now available: https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v6.0.0

@mkraina
Copy link
Contributor

mkraina commented Aug 13, 2020

would it be possible to try the new SDK via setting ENV["REACT_NATIVE_MAPBOX_MAPBOX_IOS_VERSION"]?
running REACT_NATIVE_MAPBOX_MAPBOX_IOS_VERSION="~> 6.0" pod update
results in

[!] CocoaPods could not find compatible versions for pod "@react-native-mapbox-gl-mapbox-static":
  In Podfile:
    react-native-mapbox-gl (from `../node_modules/@react-native-mapbox-gl/maps`) was resolved to 8.1.0-rc.2, which depends on
      @react-native-mapbox-gl-mapbox-static (~> 6.0)

None of your spec sources contain a spec satisfying the dependency: `@react-native-mapbox-gl-mapbox-static (~> 6.0)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

REACT_NATIVE_MAPBOX_MAPBOX_IOS_VERSION="~> 6.0" pod install --repo-update
leads to

[!] CocoaPods could not find compatible versions for pod "@react-native-mapbox-gl-mapbox-static":
  In snapshot (Podfile.lock):
    @react-native-mapbox-gl-mapbox-static (= 5.8.0, ~> 5.8)

  In Podfile:
    react-native-mapbox-gl (from `../node_modules/@react-native-mapbox-gl/maps`) was resolved to 8.1.0-rc.2, which depends on
      @react-native-mapbox-gl-mapbox-static (~> 6.0)

Specs satisfying the `@react-native-mapbox-gl-mapbox-static (= 5.8.0, ~> 5.8), @react-native-mapbox-gl-mapbox-static (~> 6.0)` dependency were found, but they required a higher minimum deployment target.

@ferdicus ferdicus added the iOS iOS related tickets label Aug 28, 2020
@mkraina
Copy link
Contributor

mkraina commented Sep 14, 2020

I've managed to install the version 6.2.0-beta.1 using ENV['REACT_NATIVE_MAPBOX_MAPBOX_IOS_VERSION'] = '~> 6.2.0-beta.1' in combination with local podspec pod '@react-native-mapbox-gl-mapbox-static', :path => './@react-native-mapbox-gl-mapbox-static.podspec.json'
I had to provide .netrc file according to documentation
I also downloaded the direct zip file mapbox-ios-sdk-6.2.0-beta.1-dynamic-with-events and use it as a source in podspec but run into issue mapbox/mapbox-gl-native-ios#196
here is my podspec, practically just C&P of @mfazekas' with change of the source

{
  "name": "@react-native-mapbox-gl-mapbox-static",
  "version": "6.2.0-beta.1",
  "summary": "Mapbox Mobile Events for static link with Mapbox GL",
  "description": "This is an unufficial workaround that allows consumption of Mapbox-iOS-SDK without use_frameworks!. Mapbox Mobile Events collects usage information to help Mapbox improve its products.",
  "homepage": "https://github.com/react-native-mapbox-gl/maps/wiki/react-native-mapbox-gl-mapbox-static-podspec",
  "license": {
    "type": "ISC",
    "file": "LICENSE.md"
  },
  "authors": {
    "react-native-mapbox-gl": "mfazekas@szemafor.com"
  },
  "screenshots": "https://docs.mapbox.com/ios/api/maps/5.8.0/img/screenshot.png",
  "source": {
    "http": "file://mapbox-ios-sdk-6.2.0-beta.1-dynamic-with-events.zip",
    "flatten": true
  },
  "platforms": {
    "ios": "9.0"
  },
  "requires_arc": true,
  "vendored_frameworks": "dynamic/MapboxMobileEvents.framework",
  "module_name": "MapboxMobileEvents",
  "preserve_paths": "**/*.bcsymbolmap"
}

after updating pods, my Xcode project was updated with folowing (changes related to @react-native-mapbox-gl-mapbox-static) :

- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/MapboxMobileEvents.framework",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/MapboxMobileEvents.framework.dSYM",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/BADC3E19-B154-39DA-BE9A-E7C52B45BD0C.bcsymbolmap",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/F86F5A50-B0A0-3D96-8330-20AFDAC47DCC.bcsymbolmap",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/877E1F78-505A-34B9-A9A0-42F8BFA435B9.bcsymbolmap",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/7C38D00F-328F-3E0C-B30E-E47F366F0F3D.bcsymbolmap",
-  "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/MapboxMobileEvents.framework",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/MapboxMobileEvents.framework.dSYM",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/BADC3E19-B154-39DA-BE9A-E7C52B45BD0C.bcsymbolmap",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/F86F5A50-B0A0-3D96-8330-20AFDAC47DCC.bcsymbolmap",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/877E1F78-505A-34B9-A9A0-42F8BFA435B9.bcsymbolmap",
- "${PODS_ROOT}/@react-native-mapbox-gl-mapbox-static/dynamic/7C38D00F-328F-3E0C-B30E-E47F366F0F3D.bcsymbolmap",

@mfazekas as you created the former 5+ podspec, don't you have any idea what could have gone wrong?

@mkraina
Copy link
Contributor

mkraina commented Sep 15, 2020

Finally solved this, I'm adding MapboxMobileEvents directly to the project as stated in official installation docs but using Mapbox-iOS-SDK via Pods, so no adding Mapbox to Framworks...
furthermore, I'm having enviroment vars defined in my Podifle:

  ENV['REACT_NATIVE_MAPBOX_MAPBOX_IOS_VERSION'] = '~> 6.2.0-beta.1'
  ENV['REACT_NATIVE_MAPBOX_GL_USE_FRAMEWORKS'] = 'true'

Seems to be working OK so far

@ferdicus
Copy link
Member

hey @nasmuris, great that it worked 👍

Could you concisely write down in one comment the exact steps required to upgrade, so others can see them at a glance till we increase/ include it in the repo.

Thanks 🙇

@natew
Copy link

natew commented Sep 19, 2020

@nasmuris where do you find the mapbox-ios-sdk-6.2.0-beta.1-dynamic-with-events.zip?

@melvinmt
Copy link

melvinmt commented Nov 3, 2020

@nasmuris

using ENV['REACT_NATIVE_MAPBOX_MAPBOX_IOS_VERSION'] = '~> 6.2.0-beta.1'

maybe a noob question, but how did you set this ENV variable?

@NathanNovak
Copy link

I have been trying to update to ^8.1.0-rc10 and get the same error as @nasmuris gets:

[!] CocoaPods could not find compatible versions for pod "@react-native-mapbox-gl-mapbox-static":
  In Podfile:
    react-native-mapbox-gl (from `../node_modules/@react-native-mapbox-gl/maps`) was resolved to 8.1.0-rc10, which depends on
      @react-native-mapbox-gl-mapbox-static (~> 5.9.0)

None of your spec sources contain a spec satisfying the dependency: `@react-native-mapbox-gl-mapbox-static (~> 5.9.0)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

I have tried to follow the instructions listed above but they did not work for me. Can you please help resolve this?

NathanNovak referenced this issue in StraboSpot/StraboSpot2 Dec 15, 2020
…ating. Created a comment on a similar issue in Stackoverflow (https://github.com/react-native-mapbox-gl/maps/issues/986).

Signed-off-by: NathanNovak <nnovak@ku.edu>
@NathanJozef
Copy link

NathanJozef commented Dec 17, 2020

Also getting exactly the same issue as mentioned by @NathanNovak.

@NathanNovak I've got it working again now. While this fix feels like a temp workaround, it might at least keep you developing for the moment.

I altered the pod spec in the npm module - node_modules/@react-native-mapbox-gl/maps/react-native-mapbox-gl.podspec. On line 5 of the file there is the variable default_ios_mapbox_version. I changed this variable contents form '> 5.9.0' to '> 5.8.0'. Naturally there are references to the 5.9.0 version in your podfile.lock, so you will need to either delete your podfile.lock or update the references there too.

@mfazekas
Copy link
Contributor

FWIW I've also published 5.9.0 of static fixer, so it rc10 should work if you default to the 5.9.0 version

@bahung1221
Copy link

Based on suggestion of @nasmuris above, I added these lines to Podfile and it worked now:

...
target 'MyAwesomeApp' do
  $ReactNativeMapboxGLIOSVersion = "~> 5.9.0"
  ENV['REACT_NATIVE_MAPBOX_GL_USE_FRAMEWORKS'] = 'true'
  ...
end

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

Successfully merging a pull request may close this issue.

10 participants