-
Notifications
You must be signed in to change notification settings - Fork 14
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
Xcode 16.0 compatibility #1524
Xcode 16.0 compatibility #1524
Conversation
I'm able to build the app in Xcode 15.2 but not the unit tests. It looks like the issue is described in nalexn/ViewInspector#333. Their solution? Use Xcode 15.4 or later, which I've confirmed works for me. I'm not opposed to Xcode 15.4, though I know it makes our SwiftUI previews a little more annoying to use. I expect that to be temporary, though, and that we'll be on Xcode 16 soon enough. |
@joshuatbrown ok yeah this is a weird transitionary period, so let's go to 15.4 for now, and 16.0 soon™. Can you check the steps for using SwiftUI on Xcode 15.4 so we can share them with the other developers? I forget if you had to build twice or "build for testing". |
👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. Xcode upgrades are never as much fun as they should be.
CHANGELOG.md
Outdated
@@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
- Publish empty metadata event and empty contact list on delete account. [#1530](https://github.com/planetary-social/nos/issues/1530) | |||
|
|||
### Internal Changes | |||
- Update Xcode to version 16.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love a little more explanation in here since we're changing .xcode-version
to 15.4 while adding compatibility for 16. Something along those lines would be perfect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mplorentz I did it. I also moved it up to the Unreleased section.
@@ -2936,7 +2936,7 @@ | |||
CURRENT_PROJECT_VERSION = 224; | |||
DEVELOPMENT_TEAM = GZCZBKH7MY; | |||
GENERATE_INFOPLIST_FILE = YES; | |||
IPHONEOS_DEPLOYMENT_TARGET = 16.2; | |||
IPHONEOS_DEPLOYMENT_TARGET = 17.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to call this out in the CHANGELOG, too? Or is this a case where we were actually targeting iOS 17 already but these were set to 16.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see now that it was just the performance test target. No need for a CHANGELOG update, I think.
Previews don't always work automatically in Xcode 15.4 and require some manual intervention. If previews aren't working and you see this error, follow the steps below.
It's possible that Step 2 may be unnecessary, and the real issue is that Previews can't build when "My Mac" is selected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfecto!
@pelumy Now that this is merged, you'll need to use Xcode 15.4 or 16 -- Xcode 15.2 doesn't work any more. I just updated the iOS Onboarding doc in Notion; not sure if we have anything else to update. |
This fixes all compiler errors and gets our project building on Xcode 16. There is some remaining work to do before we fully upgrade, but this is a start and lets us play with the new features in Xcode 16. The remaining work is filed under #1570.