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

Google maps utils compiler error in new Xcode Version 15.0.1

Open michalakakis opened this issue 1 year ago • 42 comments
trafficstars

I update the xcode to it's latest version and I came up with the following issue

Failed to build module 'GoogleMapsUtils'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)', while this compiler is 'Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)'). Please select a toolchain which matches the SDK.

michalakakis avatar Dec 09 '23 21:12 michalakakis

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.

@michalakakis 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 Dec 09 '23 21:12 wangela

I'm seeing the same error with the XCFramework. Mine is XCode 15.0.0, so it might just be the swift 5.9 compiler in XCode 15.

markemer avatar Dec 11 '23 18:12 markemer

Same problem here, XCode 15.0.1 after migrating Google Maps SDK from XCFramework to SPM

piotrsmajek avatar Dec 15 '23 10:12 piotrsmajek

I had this issue recently and had to rollback my GoogleMaps to version 8.3.0. I commented it on this thread https://github.com/googlemaps/google-maps-ios-utils/issues/393#issuecomment-1843037835 Today I wanted to try if using SPM would allow me to upgrade to 8.3.1 but no, I have the same issue.

lluisgerard avatar Dec 15 '23 12:12 lluisgerard

To provide some details, I rolled back again my project to manual installation. The project that compiles successfully has:

  • Google Maps 8.1.0
  • Google Maps Utils 4.2.2

It's when I try to update to Google Maps version 8.3.0 (manually) or 8.3.1 (SPM) that I get the error Failed to build module 'GoogleMapsUtils'; this SDK is not supported by the compiler.

lluisgerard avatar Dec 15 '23 15:12 lluisgerard

Same issue to me, but using Xcode 14.3.0 (didn't try Xcode 15 yet).

Any update on this? I'm blocked due to this issue. I'm using Xcode 14.3.0 and I installed the GoogleMaps iOS SDK 8.3.1 through SPM. Installing it through Cocoapods works but I'll would like to use the new SPM support.

image

federicopolesello avatar Dec 29 '23 16:12 federicopolesello

Do we have any updates on this issue? The latest release of iOS GoogleMaps SDK is pointless because we cannot use it with the latest Google maps utils.

andyzaharia avatar Jan 03 '24 11:01 andyzaharia

same problem, when will this be fixed??🫠😤

Bilalyyy avatar Jan 08 '24 16:01 Bilalyyy

Same problem here

chanffdavid avatar Jan 09 '24 10:01 chanffdavid

While https://github.com/googlemaps-samples/maps-sdk-for-ios-samples/issues/70 was solved, can we expect to resolve this issue around Easter? 😉 @wangela

twprzybysz avatar Jan 16 '24 20:01 twprzybysz

This update and Google Maps as whole is useless and trash. My team is being force to go to native Apple Maps because of all the issues we've had with GMS. Good riddance.

RSady avatar Jan 16 '24 20:01 RSady

Same problem here.

  • XCode 15.2
  • Google Maps 8.3.1
  • Google Maps Utils 4.2.2

Installing Google Maps through Cocoapods works.

WonKimGoRevel avatar Jan 19 '24 04:01 WonKimGoRevel

same issue here : Google Maps Utils 4.2.2 installing through SPM

Screenshot 2024-02-06 at 11 52 30 AM

MohammadJahirul avatar Feb 06 '24 05:02 MohammadJahirul

Any updates on this? On December 16 someone from Google said that they were working on this.

lluisgerard avatar Feb 06 '24 07:02 lluisgerard

While googlemaps-samples/maps-sdk-for-ios-samples#70 was solved, can we expect to resolve this issue around Easter? 😉 @wangela

I don't want to jinx it, but if I look at the rate google fixes, bugs we might still be wating in 2027.

I hope I am wrong...

Jodebjo avatar Feb 26 '24 09:02 Jodebjo

Temporary solution: Point SPM to this branch https://github.com/googlemaps/google-maps-ios-utils/tree/wangela/8-0-0

VladOrackle avatar Mar 06 '24 08:03 VladOrackle

Temporary solution: Point SPM to this branch https://github.com/googlemaps/google-maps-ios-utils/tree/wangela/8-0-0

Same issue and same fix.

jrodriguer avatar Mar 06 '24 15:03 jrodriguer

I tried the branch but it didn't work for me

Screenshot 2024-03-06 at 22 38 24

alexookah avatar Mar 07 '24 09:03 alexookah

@alexookah is it possible you have the Google Maps SDK already added to that project either by a custom SP or pod?

The branch being suggested has a dependency on Google Maps and so you might be getting a duplicate copy of the framework.

dsmailes avatar Mar 07 '24 09:03 dsmailes

Yes the only way to have latest google maps sdk with google-maps utils is to have google maps with cocoapods and google-maps utils as spm

alexookah avatar Mar 07 '24 09:03 alexookah

@alexookah you can, in my experience at least with this branch of Utils, remove the Google Maps pod and then use the official SPM version of Google Maps of your choice, or just allow the Utils package to manage via its dependency declared in package.swift

dsmailes avatar Mar 07 '24 10:03 dsmailes

My solution is for SPM usage only I guess Utils having dependency on maps is quite warranted, because why would you want it without the maps

VladOrackle avatar Mar 07 '24 10:03 VladOrackle

any updates on this? For me the branch Vlad provided doesn't work.

ungurmaria avatar Mar 08 '24 19:03 ungurmaria

any updates or workarounds ?

Kvadroman avatar Mar 11 '24 10:03 Kvadroman

What appears to work for me now is having both Google Maps and google utils via SPM, BUT instead of using the branch mentioned by @VladOrackle, I used the last commit form this branch, which as of now it's de4e482df1fd729362db91239269e1e92cb0d787

Below you can see my configuration. Maybe it helps someone. Working with the branch itself did not work for me and I still had the same error.

Screenshot 2024-03-11 at 12 33 38

ungurmaria avatar Mar 11 '24 10:03 ungurmaria

What appears to work for me now is having both Google Maps and google utils via SPM, BUT instead of using the branch mentioned by @VladOrackle, I used the last commit form this branch, which as of now it's de4e482df1fd729362db91239269e1e92cb0d787

Below you can see my configuration. Maybe it helps someone. Working with the branch itself did not work for me and I still had the same error.

Screenshot 2024-03-11 at 12 33 38

but you need to update it manually every time instead of this you may wrap in your own package and add this as dependency

.package(name: "google-maps-ios-utils", url: "https://github.com/googlemaps/google-maps-ios-utils.git", branch: "wangela/8-0-0")

it updates every time when wangela/8-0-0 branch was updated

Kvadroman avatar Mar 11 '24 14:03 Kvadroman

I am not sure what you mean, for me when I am using the branch itself, it fails with the error mentioned in this thread. Using the commit is the only working way for me.

ungurmaria avatar Mar 11 '24 14:03 ungurmaria

`import PackageDescription

let package = Package( name: "YourPackageName", platforms: [.iOS(.v15)], products: [ .library( name: "YourPackageName", targets: ["YourPackageName"]), ], dependencies: [ .package(url: "https://github.com/googlemaps/ios-maps-sdk", .upToNextMinor(from: "8.4.0")), .package(url: "https://github.com/googlemaps/google-maps-ios-utils.git", .branch("wangela/8-0-0")) ], targets: [ .target( name: "YourPackageName", dependencies: [ .product(name: "GoogleMapsUtils", package: "google-maps-ios-utils"), .product(name: "GoogleMaps", package: "ios-maps-sdk"), .product(name: "GoogleMapsCore", package: "ios-maps-sdk"), .product(name: "GoogleMapsBase", package: "ios-maps-sdk") ], path: "Sources/YourPackageName" ), .testTarget( name: "YourPackageNameTests", dependencies: ["YourPackageName"]), ] )`

I mean wrap this packages in one

Снимок экрана 2024-03-11 в 23 24 41

all packages you need will downloaded automatically

Kvadroman avatar Mar 11 '24 21:03 Kvadroman

Hi folks, still working on this in PR #444. Our goals are to update the Package to Apple's latest manifest structure, continue supporting CocoaPods, end support for Carthage, right-size version dependencies, and update the build, tests, and release actions based on source instead of binary packaging. It's almost done but there are some tests failing that I need to get resolved before I can be confident that the release will not break folks who install via either SPM or CocoaPods. Building from my branch is risky :)

wangela avatar Mar 14 '24 18:03 wangela