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

MacCatalyst build initially fails with: invalid version number in '-target arm64-apple-ios10.15-macabi' #3984

Open
jknlsn opened this issue May 14, 2024 · 4 comments

Comments

@jknlsn
Copy link

jknlsn commented May 14, 2024

Platform

iOS, macOS

Environment

Production

Installed

Swift Package Manager

Version

8.26.0

Did it work on previous versions?

No response

Steps to Reproduce

Building always fails for MacCatalyst initially before succeeding on Xcode 15.4, whereas it succeeds on first try on 15.3.

Steps

  1. Create a new iOS app.
  2. Remove Mac for iPad, add MacCatalyst target.
  3. Add Sentry SDK package from https://github.com/getsentry/sentry-cocoa.git, adding Sentry and SentrySwiftUI to target.
  4. Clean build folder, build and run to Mac.

Expected Result

Build succeeds and runs (happens on Xcode 15.3)

Actual Result

Initially fails. Build and run again immediately after, works.

On Xcode 15.4, any time that I clean and then build, it first fails and then will succeed. After this the build will always succeed, unless cleaned in between. This has caused our Xcode Cloud builds that recently updated to using Xcode 15.4 to fail, as they just fail and don't try to build again.

I found this related discussion on the Apple Developer Forums, and added this information there as well, as it may not be able to be fixed but I don't know if there is a workaround that could be implemented. In the meantime I am using Xcode 15.3 for Xcode Cloud.

Are you willing to submit a PR?

No, I haven't figured out a fix!

@jaderyang-sms
Copy link

Same here.

@philipphofmann
Copy link
Member

philipphofmann commented May 15, 2024

@jaderyang-sms and @jknlsn, with the following steps, I can run an empty iOS app on MacCatalyst:

  1. Performa a build clean
  2. Quit Xcode
  3. Delete the contents of the derived data folder. That's usually under ~/Library/Developer/Xcode/DerivedData.
  4. Start Xcode and build the project
  5. Xcode complains with the mentioned error above
  6. Hit run app in Xcode. The build error persists, but I can run the app.

I'm using an M2 MacBook Pro with Xcode 15.4 on macOS 14.4.1.

@philipphofmann
Copy link
Member

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

@choulepoka
Copy link

I do not know if this helps, but reverting to Sentry 8.21.0 seems to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Blocked
Development

No branches or pull requests

4 participants