google-maps-ios-utils icon indicating copy to clipboard operation
google-maps-ios-utils copied to clipboard

4.2.2 does not allow updating to latest GoogleMaps (8.x)

Open jotai-coder opened this issue 1 year ago • 12 comments

Podfile dependency should be updated or relaxed to allow clients to move to the current major version of Google Maps SDK 8.x

jotai-coder avatar Nov 27 '23 22:11 jotai-coder

If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.

@jotai-coder Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

wangela avatar Nov 27 '23 22:11 wangela

Note, this was possible until 4.2.2

jotai-coder avatar Nov 27 '23 22:11 jotai-coder

Now since SPM is out for Google Maps and Google Places you could easily update your Package.swift and depende on one of the newest Google Maps versions.

stherold avatar Feb 16 '24 11:02 stherold

This means users using the latest GoogleMaps are stuck on 4.1.0, which annoyingly overrides the EXCLUDED_ARCHS setting, meaning we have to manually clean up the setting every time we update. Please fix this, it's so simple!

jshier avatar Mar 01 '24 17:03 jshier

Here is the link to the Google Maps iOS SDK for Swift Package Manager: https://github.com/googlemaps/ios-maps-sdk

Blackjacx avatar Mar 23 '24 10:03 Blackjacx

@wangela This will become a blocking issue for shipping this SDK soon; as you noted in this comment the Google Maps SDK has privacy manifest instructions, but they state:

Important: These instructions for the Apple Privacy Manifest File apply only to the latest SDK version.

That means that only Google Maps 8.4.0 or later will be shippable once enforcement starts, which isn't compatible with the current ~> 7.3 requirement in this pod.

stuartmorgan avatar Apr 26 '24 14:04 stuartmorgan

Is there any ETA on this library being updated @wangela ?

We're currently using v8.2.0 and have had an email warning about ensuring we update because that version defaults to the Open GL renderer rather than Metal but we currently aren't able to upgrade due to incompatibility with the utils library.

patrickcapadmi avatar May 21 '24 17:05 patrickcapadmi

In the meanwhile you can use up to version 4.1.0 and it lets you use the latest version of GoogleMaps.

remarcoble avatar Jun 17 '24 21:06 remarcoble

@remarcoble Only if you also modify your Podfile to remove 4.1.0's EXCLUDED_ARCHS setting, which was quite annoying, otherwise you're limited to Intel-only builds.

jshier avatar Jun 17 '24 21:06 jshier

@jshier how are you modifying your Podfile to remove the EXCLUDED_ARCHS setting? I've tried adding the following to my Podfile:

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = ""
  end
end

but the Google-Maps-iOS-Utils project in the Pods folder still has the EXCLUDED_ARCHS setting. The only solution I've found is manually opening (or writing a script) that opens the .xconfig folder and deletes the EXCLUDED_ARCHS setting and then everything builds just fine on my M2 Mac.

Loubear111 avatar Jun 20 '24 21:06 Loubear111

@Loubear111 You need to do it at a higher level to modify the xcconfig rather than the generated project file:

if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
  xcconfig_path = config.base_configuration_reference.real_path
  open('xcconfig_mod', 'w') do |xcconfig_mod|
    File.open(xcconfig_path).each do |line|
      xcconfig_mod << line unless line =~ /EXCLUDED_ARCHS/
    end
  end
  File.rename('xcconfig_mod', xcconfig_path)
end

jshier avatar Jun 20 '24 22:06 jshier

Thanks for that code @jshier. I was tinkering around with it quite a bit because it wasn't working but I realized it was because I was looping through the global config as opposed to looping through the targets in my post_install. For anyone looking for this in the future my post_install in my Podfile ended up looking like this:

post_install do |installer|
  installer.pods_project.targets.each do |target| # This is the line I forgot to include
    target.build_configurations.each do |config|
      if config.base_configuration_reference.is_a?(Xcodeproj::Project::Object::PBXFileReference)
        xcconfig_path = config.base_configuration_reference.real_path
        File.open('xcconfig_mod', 'w') do |xcconfig_mod|
          File.open(xcconfig_path).each do |line|
            xcconfig_mod << line unless line =~ /EXCLUDED_ARCHS/
            if line =~ /EXCLUDED_ARCHS/
              puts "Removing EXCLUDED_ARCHS for pod " + target.name
            end
          end
        end
        File.rename('xcconfig_mod', xcconfig_path)
      end
    end
  end
end

Loubear111 avatar Jun 21 '24 17:06 Loubear111

you can fork this, change GoogleMaps dependency to 8.x and consume this from you repository afterwards.. until they fix it.

ovidiulaz7 avatar Jul 18 '24 09:07 ovidiulaz7

v5.0.0 was released for SPM yesterday and CocoaPods today. v6.0.0 was released for both SPM and CocoaPods today. See the README for installation instructions.

wangela avatar Aug 01 '24 00:08 wangela