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

Not working on Xcode 15: cannot load module 'Turf' built with SDK 'iphonesimulator16.4' when using SDK 'iphonesimulator17.0 #30

Open
KK817 opened this issue Mar 11, 2024 · 7 comments

Comments

@KK817
Copy link

KK817 commented Mar 11, 2024

Steps to Trigger Behavior

build project in xcode 15.0 - 15.3

Link to Minimal Reproducible Example

Expected Behavior

successful to run.

Actual Behavior

Have some error.

Cannot load module 'Turf' built with SDK 'iphoneos16.4' when using SDK 'iphoneos17.0': /Users/xxx/Library/Developer/Xcode/DerivedData/EKE-biopprgumksoaqgnrhztiivzzjkq/Build/Products/Debug-iphoneos/Turf.framework/Modules/Turf.swiftmodule/arm64-apple-ios.swiftmodule

Screenshots (if applicable)

Version(s) affected

  • Platform: IOS
  • OS version: IOS 17
  • Device type: iphone 15
  • Emulator/ Simulator: NO
  • Development OS: 14.3.1
  • maplibre-navigation-ios 1.0.7 & 2.0.0

Additional context

@mindthefish
Copy link
Contributor

Hi,
after updating the Xcode and/or Swift version in most cases it is sufficient to re-run the carthage command like described in 6. in the README. This should make sure that all third party dependencies including Turf are compiled with the same Swift version.
The title of this issue indicates that it is a problem with the iPhone Simulator, but you write "Emulator/Simulator: NO". What is your setup exactly?

@KK817
Copy link
Author

KK817 commented Mar 12, 2024

Hi,
I have re-run the carthage command like described in 6.

I only run Command B(Build).Have some error below.

Have new issue

/Users/xxx/Library/Developer/Xcode/DerivedData/EKE-biopprgumksoaqgnrhztiivzzjkq/Build/Products/Debug-iphoneos/Polyline.framework/Modules/Polyline.swiftmodule/arm64-apple-ios.private.swiftinterface:13:37 'LocationCoordinate2D' is not a member type of struct 'Polyline.Polyline'

still have this issue
/Users/xxx/xxx/src/EKEMapbox/EKEInstructionViewModel.swift:11:8 Compiled module was created by a different version of the compiler '5.8.0.124.2'; rebuild 'Turf' and try again: /Users/xxx/Library/Developer/Xcode/DerivedData/EKE-biopprgumksoaqgnrhztiivzzjkq/Index.noindex/Build/Products/Debug-iphoneos/Turf.framework/Modules/Turf.swiftmodule/arm64-apple-ios.swiftmodule

Have any idea?

It's working fine on xcode 14.3 but giving error on xcode 15

@KK817
Copy link
Author

KK817 commented Mar 12, 2024

I have re-run the carthage command like described in 6.

appear blow error

*** Checking out maplibre-navigation-ios at "v1.0.7"
*** Checking out Polyline at "v4.2.1"
*** Checking out Solar at "2.2.0"
*** Checking out MapboxGeocoder.swift at "v0.10.2"
*** Checking out turf-swift at "v0.2.1"
*** Checking out mapbox-events-ios at "v0.10.2"
*** Checking out MapboxDirections.swift at "v0.23.0"
*** Checking out mapbox-voice-swift at "v0.0.2"
*** xcodebuild output can be found in /var/folders/z4/vjwnjl_56xnb2klwkdd32gkc0000gn/T/carthage-xcodebuild.BC0pyj.log
*** Downloading mapbox-events-ios binary at "v0.10.2"
*** Building scheme "MapboxMobileEvents" in MapboxMobileEvents.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/xxx/ekeapp-iOS/Carthage/Checkouts/mapbox-events-ios/MapboxMobileEvents.xcodeproj -scheme MapboxMobileEvents -configuration Release -derivedDataPath /Users/xxx/Library/Caches/org.carthage.CarthageKit/DerivedData/15.0.1_15A507/mapbox-events-ios/v0.10.2 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive VALIDATE_WORKSPACE=NO -archivePath /var/folders/z4/vjwnjl_56xnb2klwkdd32gkc0000gn/T/mapbox-events-ios SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/xxx/ekeapp-iOS/Carthage/Checkouts/mapbox-events-ios)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/z4/vjwnjl_56xnb2klwkdd32gkc0000gn/T/carthage-xcodebuild.BC0pyj.log

@KK817
Copy link
Author

KK817 commented Mar 12, 2024

Thank you.

it can working on xcode 15.3 now

@mindthefish
Copy link
Contributor

I guess this can be closed.

@boldtrn
Copy link
Collaborator

boldtrn commented Apr 12, 2024

@KK817 can you verify this works with the latest master and SPM now?

@michaelkirk
Copy link
Collaborator

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

No branches or pull requests

4 participants