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

Mismatch in SDK version returned by GMSServices #26

Open
alexp25 opened this issue Jun 16, 2024 · 0 comments
Open

Mismatch in SDK version returned by GMSServices #26

alexp25 opened this issue Jun 16, 2024 · 0 comments
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@alexp25
Copy link

alexp25 commented Jun 16, 2024

I encountered an issue when trying to upgrade to SDK version 8.4 from 7.4 in hope there would be performance improvements to marker rendering.
In my Capacitor app I have this Podfile:

// ...

target 'App' do
  capacitor_pods
  # Add your Pods here
    # Add your Pods here
  pod 'GoogleMaps', '~> 8.4' # Or use the latest version available
  pod 'CapacitorFirebaseAnalytics/Analytics', :path => '../../node_modules/@capacitor-firebase/analytics'
  
end

I have modified the Capacitor plugin @capacitor/google-maps that depends on this SDK to also use GoogleMaps version 8.4:

// ...

target 'Plugin' do
  capacitor_pods
  pod 'GoogleMaps', '~> 8.4' # Or use the latest version available
  # pod 'Google-Maps-iOS-Utils', '~> 4.2' # For clustering support
end

.podspec:

require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
  s.name = 'CapacitorPluginGoogleMaps'
  s.version = package['version']
  s.summary = package['description']
  s.license = package['license']
  s.homepage = 'https://capacitorjs.com'
  s.author = package['author']
  s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] }
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'google-maps/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
  s.ios.deployment_target  = '13.0'
  s.dependency 'Capacitor'
  s.dependency 'GoogleMaps', '~> 8.4'
  s.swift_version = '5.1'
  s.static_framework = true
end

In the plugin Pods/GoogleMaps/Example/Podfile I see this, so my project is updated to version 8.4.0:

source 'https://github.com/CocoaPods/Specs.git'

target 'GoogleMapsSwiftXCFrameworkDemos' do
    platform :ios, '14.0'
    pod 'GoogleMaps', '= 8.4.0'
end

However, calling print("GMS SDK version: (GMSServices.sdkLongVersion())") on iOS installed app still returns: GMS SDK version: 7.4.0 (74.5) which raises some doubts that it's actually updated to 8.4 after all

Is this normal, or am I missing something?

@alexp25 alexp25 added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant