getsentry/sentry-cocoa

invalid version number in '-target arm64-apple-ios9999-simulator

lionel-alves opened this issue ยท 21 comments

Platform

iOS

Environment

Develop

Installed

Swift Package Manager

Version

8.26

Did it work on previous versions?

It is after updating to Xcode 15.4

Steps to Reproduce

  1. Add sentry-cocoa dependency using SPM, version 8.26.
  2. Add Sentry static framework
  3. Compile

Expected Result

Should compile without error

Actual Result

clang: error: invalid version number in '-target arm64-apple-ios9999-simulator'

Note

It works with Senty-Dynamic framework.

This is related to #3947. You can try the following workaround while we're investigating this, as mentioned in #3947 (comment) or using Xcode 15.3.

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 #3769 (comment):

CleanShot 2024-05-08 at 12 48 41

Adding my "me too": with Xcode 15.4 (15F31d) it compiles fine if I target a simulator running 17.5, but if I target a physical iPad running 17.5 I get "invalid version number in '-target arm64-apple-ios9999'". I'm using SentrySwiftUI.

It's weird, compiling an empty SwiftUI project for both Sentry and Sentry-Dynamic works for me on an M2 MacBook Pro with Xcode 15.4 on macOS 14.4.1 for both running a SwiftUI app on a Simulator with iOS 17.5 and on a real iPhone 12 with iOS 15.4, but when trying to run the app for MacCatalysit I get the same error as mentioned in #3984: invalid version number in '-target arm64-apple-ios10.15-macabi

@matthewreimer and @lionel-alves, maybe the steps pointed out here help to solve your problem: #3984 (comment).

This is also happening on watchOS app with the same -target arm64-apple-watchos9999-simulator error

@fnazarios, can you try if the steps explained it #3984 (comment) solve your problem please?

@philipphofmann Unfortunately, it didn't have any effect.

Similar boat over here. Some devs can build following the steps mentioned in issue 3984, but others cannot. We're also unable to run test targets. Sorry folks, the Xcode update break strikes again. :(

This issue is affecting me as well. Tried the fix mentioned here: https://github.com/getsentry/sentry-cocoa/issues/3984#issuecomment-2112246277. It worked on my local machine, but not for the remote Mac Mini that acts as our test server.

Same here, however using Sentry-Dynamic as suggested instead resolved the issue.

According to Apple staff in the Apple forum this an issue with Xcode, and the recommendation is to stick to Xcode 15.3.

If you were using Sentry version 8.25.0 or lower and got this error, then updated to version 8.26.0 and still got this error, it is due to some Xcode caching. I had to clean derived data folder and reopen Xcode in order to have it working.

@brustolin, I already suggested that in #3984 (comment), but it seems not to work for everybody; see #3980 (comment).

@brustolin, I already suggested that in #3984 (comment), but it seems not to work for everybody; see #3980 (comment).

Strange, I can easily reproduce this.

If it helps, all 14 of our devs have now been able to run against iOS 17.2 on Xcode 15.4. I'm not knowledgeable enough to know what may be specific about 17.2, but figured I'd share.

I was on 8.24.0, upgrading to 8.26.0 fixed it for me

I was getting this before, when trying to run on a simulator, 8.26.0 fixed it but now I'm getting the same error when trying to load a preview.

Note: It's an iOS app not catalyst.

just tested on 8.26.0 after purging all Xcode related Caches & ~Library/Developer/Xcode/

  • iOS builds fine
  • macOS Catalyst fails

error: clang:1:1 invalid version number in '-target arm64-apple-ios10.15-macabi'

linking with both static Sentry and SentrySwiftUI

Apple clang version 15.0.0 (clang-1500.3.9.4)
Xcode Version 15.4 (15F31d)

@munhitsu The maccatalist problem is a Xcode bug as explained in this issue

Going back to 8.21.0 seems to fixes the issue.

As previously mentioned, this is a bug in Xcode, and we can only wait for Apple to fix the bug and refer to our troubleshooting docs to solve this issue.