Skip to content

Conversation

@lorenc-tomasz
Copy link
Collaborator

@lorenc-tomasz lorenc-tomasz commented Dec 29, 2025

Pull request

Please ensure this PR targets the dev branch and follows the project conventions.
CI already runs linting, formatting, and build checks automatically.


Before submitting

  • This PR targets the dev branch (not main)
  • Commit messages follow the semantic-release format
  • No debug logs or sensitive data included

Summary

This PR modernizes the iOS dependency management by migrating external libraries to Swift Package Manager (SPM). This change addresses the recent announcement from Google Maps Platform that CocoaPods support is being phased out and will be discontinued starting with version 11.0.

Specific changes:

  • Migrated to SPM: Replaced CocoaPods dependencies with spm_dependency for the following libraries, pinning them to the same exact versions:
    • GoogleMaps: 10.4.0
    • GoogleMapsUtils: 6.1.3
    • SVGKit: 3.0.0
  • Fixed source_files configuration:
    • Consolidated the source_files definition into a single array to prevent overwrite issues.
    • Re-added ios/**/*.{h,m,mm} to ensure Objective-C header files are correctly included alongside Swift files.
  • Removed apply_svgkit_patch as not needed when we use SPM

Type of change

  • Feature
  • Fix
  • Refactor
  • Internal / CI
  • Documentation

Scope

  • Android
  • iOS
  • JS
  • Example App
  • Docs

Related

N/A


Additional notes

Verification:

  • Verified pod install successfully resolves all SPM dependencies.
  • Verified that the generated Xcode project correctly references the Swift packages.
  • Confirmed that all source files (Swift, Obj-C++, C++) are properly indexed in the Xcode workspace.
  • Validated the integration by successfully building and running the example application, confirming that the Google Maps SDK loads correctly and that all Swift Package Manager dependencies are properly linked and functional.

@lorenc-tomasz lorenc-tomasz changed the title feat(ios): migrate to SPM dependencies and fix source_files configuration feat(ios): migrate to SPM dependencies Dec 29, 2025
@pinpong
Copy link
Owner

pinpong commented Jan 5, 2026

Thank's for the PR. Please consider the impact on breaking changes.

@pinpong
Copy link
Owner

pinpong commented Jan 7, 2026

I got this warning:
[SPM] WARNING!!! Pod RNGoogleMapsPlus is using swift package(s) GoogleMaps, GoogleMapsUtils, SVGKit with static linking, this might cause linker errors. Consider using USE_FRAMEWORKS=dynamic, see https://github.com/facebook/react-native/pull/44627#issuecomment-2123119711 for more information

@lorenc-tomasz
Copy link
Collaborator Author

Hi @pinpong :)
Happy New Year :)

I didn't see such warning. Will check it :) At the moment, I guess, we can consider this PR like a draft. As long we will not be be forced to use SDK 11.x we are good with Pods :)

In theory there shouldn't be any breaking changes as the script is from RN team directly.

@pinpong pinpong marked this pull request as draft January 7, 2026 10:48
Google Maps iOS SDK works perfectly fine with static linking
@lorenc-tomasz
Copy link
Collaborator Author

Hi,
I checked this. In general, Google Maps can work with USE_FRAMEWORKS=static, so this warning does not matter in this case.
When it comes to USE_FRAMEWORKS=dynamic, unfortunately some React Native dependencies fail to build. It looks like the RN team does not put much effort into maintaining this helper.
For now, I consider this just a curiosity, at least until we are forced to migrate to SDK 11 or the React Native team comes up with a better approach to using SPM.

Thanks again for pointing out this warning - I definitely wouldn’t want to keep something that could potentially be unstable.

I think we can close this PR for now :) I see that you pushed correct source_files patterns in dev :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants