Skip to content

[google_maps_flutter_ios] Adds Swift Package Manager compatibility#6639

Closed
vashworth wants to merge 8 commits intoflutter:mainfrom
vashworth:google_maps_flutter_ios_v2
Closed

[google_maps_flutter_ios] Adds Swift Package Manager compatibility#6639
vashworth wants to merge 8 commits intoflutter:mainfrom
vashworth:google_maps_flutter_ios_v2

Conversation

@vashworth
Copy link
Copy Markdown
Contributor

Makes google_maps_flutter_ios available as a Swift Package to Flutter. Also, remains compatible with CocoaPods.

Fixes flutter/flutter#146920.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@vashworth
Copy link
Copy Markdown
Contributor Author

vashworth commented May 6, 2024

Using GoogleMaps Swift Package appears to be having issues:

https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_2%20master/12829/overview
Fails on 'build examples'

BUILDING google_maps_flutter/google_maps_flutter_ios/example/ios14 for iOS
 Running command: "flutter build ios --no-codesign" in /Volumes/Work/s/w/ir/x/w/packages/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14
 Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
 Building dev.flutter.plugins.googleMobileMapsExample for device (ios-release)...
 ...
 Running pod install...                                           1,133ms
 Running Xcode build...                                          
 Xcode build done.                                            8.5s
 Failed to build iOS app
 Parse Issue (Xcode): Module 'GoogleMaps' not found
 /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Core/GMSEmpty.m:16:8
 Encountered error while building for device.

https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_1%20master/12751/overview
Fails on 'drive examples'

Running command: "flutter test -d 0E012867-5DC0-45CC-8AA7-E26E8D5B816D integration_test" in /Volumes/Work/s/w/ir/x/w/packages/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14
...
Running Xcode build...                                                                           
Xcode build done.                                            6.8s
Failed to build iOS app
Parse Issue (Xcode): Module 'GoogleMaps' not found
/Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Core/GMSEmpty.m:16:8
Could not build the application for the simulator.

Does not happen every time

@vashworth
Copy link
Copy Markdown
Contributor Author

https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_2%20master/12830/overview

Error with verbose logs:

CompileC /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsCoreTarget.build/Objects-normal/arm64/GMSEmpty.o /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Core/GMSEmpty.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'GoogleMapsCoreTarget' from project 'GoogleMaps')
                cd /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk
                /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -ivfsstatcache /Users/chrome-bot/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator17.0-21A325-082b46144e8a3fe0e600305fde315d51.sdkstatcache -target arm64-apple-ios14.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fobjc-arc -fmodules -gmodules -fmodules-cache-path\=/Users/chrome-bot/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/chrome-bot/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=GoogleMapsCoreTarget -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-implicit-atomic-properties -Wno-objc-interface-ivars -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wno-implicit-fallthrough -DSWIFT_PACKAGE -DDEBUG\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=1 -isysroot /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version\=2 -fobjc-legacy-dispatch -I/Volumes/Work/s/w/ir/x/w/packages/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/build/ios/Debug-iphonesimulator/include -I/Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Core/Sources -I/Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsCoreTarget.build/DerivedSources-normal/arm64 -I/Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsCoreTarget.build/DerivedSources/arm64 -I/Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsCoreTarget.build/DerivedSources -F/Volumes/Work/s/w/ir/x/w/packages/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/build/ios/Debug-iphonesimulator -F/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -iframework /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/Developer/Library/Frameworks -DXcode -MMD -MT dependencies -MF /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsCoreTarget.build/Objects-normal/arm64/GMSEmpty.d --serialize-diagnostics /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsCoreTarget.build/Objects-normal/arm64/GMSEmpty.dia -c /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Core/GMSEmpty.m -o /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsCoreTarget.build/Objects-normal/arm64/GMSEmpty.o
            /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Core/GMSEmpty.m:17:9: fatal error: module 'GoogleMaps' not found
            @import GoogleMaps;
             ~~~~~~~^~~~~~~~~~
            1 error generated.
            CompileC /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsBaseTarget.build/Objects-normal/arm64/GMSEmpty.o /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Base/GMSEmpty.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'GoogleMapsBaseTarget' from project 'GoogleMaps')
                cd /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk
                /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -ivfsstatcache /Users/chrome-bot/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator17.0-21A325-082b46144e8a3fe0e600305fde315d51.sdkstatcache -target arm64-apple-ios14.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fobjc-arc -fmodules -gmodules -fmodules-cache-path\=/Users/chrome-bot/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/chrome-bot/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=GoogleMapsBaseTarget -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-implicit-atomic-properties -Wno-objc-interface-ivars -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wno-implicit-fallthrough -DSWIFT_PACKAGE -DDEBUG\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=1 -isysroot /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version\=2 -fobjc-legacy-dispatch -I/Volumes/Work/s/w/ir/x/w/packages/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/build/ios/Debug-iphonesimulator/include -I/Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Base/Sources -I/Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsBaseTarget.build/DerivedSources-normal/arm64 -I/Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsBaseTarget.build/DerivedSources/arm64 -I/Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsBaseTarget.build/DerivedSources -F/Volumes/Work/s/w/ir/x/w/packages/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/build/ios/Debug-iphonesimulator -F/Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -iframework /Volumes/Work/s/w/ir/cache/osx_sdk/xcode_15a240d/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/Developer/Library/Frameworks -DXcode -MMD -MT dependencies -MF /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsBaseTarget.build/Objects-normal/arm64/GMSEmpty.d --serialize-diagnostics /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsBaseTarget.build/Objects-normal/arm64/GMSEmpty.dia -c /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Base/GMSEmpty.m -o /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/Build/Intermediates.noindex/GoogleMaps.build/Debug-iphonesimulator/GoogleMapsBaseTarget.build/Objects-normal/arm64/GMSEmpty.o
            /Users/chrome-bot/Library/Developer/Xcode/DerivedData/Runner-bynswbqjzzfjuuheqrjysabjmvyt/SourcePackages/checkouts/ios-maps-sdk/Base/GMSEmpty.m:17:9: fatal error: module 'GoogleMaps' not found
            @import GoogleMaps;
             ~~~~~~~^~~~~~~~~~
            1 error generated.

@vashworth
Copy link
Copy Markdown
Contributor Author

@stuartmorgan-g stuartmorgan-g added the triage-ios Should be looked at in iOS triage label Jun 3, 2024
@vashworth
Copy link
Copy Markdown
Contributor Author

Closing until GoogleMaps issue is resolved.

@vashworth vashworth closed this Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[google_maps_flutter_ios] Add Swift Package Manager compatibility to google_maps_flutter_ios

2 participants