getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
773 stars 306 forks source link

Sentry does not build on Xcode 15.4 beta 1 (15F5021i) #3947

Closed dfed closed 3 weeks ago

dfed commented 3 weeks ago

Platform

iOS

Environment

Production, Develop, TestFlight

Installed

Swift Package Manager

Version

8.25.0

Did it work on previous versions?

I have not checked

Steps to Reproduce

  1. Integrate Sentry via SPM into an iOS app
  2. Hit build

Expected Result

Sentry builds successfully

Actual Result

Copy /Users/dfed/Library/Developer/Xcode/DerivedData/Portola-cpdibskhsswjjmaarpylxxcqnqfy/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/Sentry.framework /Users/dfed/Library/Developer/Xcode/DerivedData/MyProject-cpdibskhsswjjmaarpylxxcqnqfy/SourcePackages/artifacts/sentry-cocoa/Sentry/Sentry.xcframework/ios-arm64/Sentry.framework (in target 'MyTarget' from project 'MyProject')
    cd /Users/dfed/source/apple
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -exclude Headers -exclude PrivateHeaders -exclude Modules -exclude \*.tbd -bitcode-strip all -bitcode-strip-tool /Applications/Xcode-15.4.0-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip -resolve-src-symlinks -remove-static-executable /Users/dfed/Library/Developer/Xcode/DerivedData/Portola-cpdibskhsswjjmaarpylxxcqnqfy/SourcePackages/artifacts/sentry-cocoa/Sentry/Sentry.xcframework/ios-arm64/Sentry.framework /Users/dfed/Library/Developer/Xcode/DerivedData/MyProject-cpdibskhsswjjmaarpylxxcqnqfy/Build/Products/Debug-iphoneos/MyApp.app/Frameworks

note: Injecting stub binary into codeless framework (in target 'MyTarget' from project 'MyProject')
    /Applications/Xcode-15.4.0-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot /Applications/Xcode-15.4.0-Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk -dynamiclib -Xlinker -adhoc_codesign -x c /dev/null -o /Users/dfed/Library/Developer/Xcode/DerivedData/MyProject-cpdibskhsswjjmaarpylxxcqnqfy/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/Sentry.framework/Sentry -target arm64-apple-ios9999
clang: error: invalid version number in '-target arm64-apple-ios9999'

Looks like the minimum iOS version of 9999 is invalid. Looking at git history, I believe this broke in #3774. I have not filed a Feedback with Apple

Are you willing to submit a PR?

No response

philipphofmann commented 3 weeks ago

@brustolin, I think this is related to https://github.com/getsentry/sentry-cocoa/pull/3774. Can you please have a look?

benrudhart commented 3 weeks ago

The same is true for Xcode 15.4 RC (15F31c). Does anybody know a workaround?

triplef commented 3 weeks ago

Same issue here using the latest 8.25.2 SDK release and Xcode 15.4 RC.

philipphofmann commented 3 weeks ago

I can reproduce the issue with Xcode 15.4 RC.

Possible Workarounds

Cocoa SDK version 8.21.0 works both for Sentry and Sentry-Dynamic.

If you can't downgrade to 8.21.0, you can try to use Sentry-Dynamic, as mentioned in https://github.com/getsentry/sentry-cocoa/issues/3769#issuecomment-2007854765:

CleanShot 2024-05-08 at 12 48 41

kahest commented 3 weeks ago

We have a fix ready for this which will ship early next week in the next release