googlemaps / google-maps-ios-utils

Google Maps SDK for iOS Utility Library
https://developers.google.com/maps/documentation/ios-sdk/utility/
Apache License 2.0
714 stars 401 forks source link

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

Closed jotai-coder closed 2 months ago

jotai-coder commented 10 months ago

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

wangela commented 10 months ago

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.

jotai-coder commented 10 months ago

Note, this was possible until 4.2.2

stherold commented 7 months ago

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.

jshier commented 7 months ago

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!

Blackjacx commented 6 months ago

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

stuartmorgan commented 5 months ago

@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.

patrickcapadmi commented 4 months ago

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.

remarcoble commented 3 months ago

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

jshier commented 3 months ago

@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.

Loubear111 commented 3 months ago

@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.

jshier commented 3 months ago

@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
Loubear111 commented 3 months ago

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
ovidiulaz7 commented 2 months ago

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

wangela commented 2 months ago

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.