-
Notifications
You must be signed in to change notification settings - Fork 114
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
Upgrade to support Xcode 14.0 #7062
Conversation
This also touched all the schemes to update the `LastUpgradeVersion` to track they were checked in Xcode 14.0.
You can test the changes from this Pull Request by:
|
On iOS 16, `DateFormatter` returns a different localized string for template format 'MMM d, h:mm a', compared to previous iOS versions. Feeback to Apple: FB11335645.
Make the app compatible with Xcode 14
Hi @mokagio , do you think this PR is ready for review now? |
Yes it is! Pushing the button and reaching out to the devs. |
Generated by 🚫 dangerJS |
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.
This works great for me both on the simulator and physical devices.
Thanks for the updates!
This seems to address the "Update project to recommended settings" warning for the Pods project.
…ings Upgrade project to Xcode 14.0 stable recommended settings
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.
Working as before on an iOS 15 device and iOS 16 simulator! Just some minor non-blocking questions
super.viewWillDisappear(animated) | ||
|
||
if #available(iOS 16.0, *) { | ||
self.navigationController?.setNavigationBarHidden(false, animated: animated) | ||
} |
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.
nit: does it make sense to reverse the order of the super
call since this is a "disappear" event?
super.viewWillDisappear(animated) | |
if #available(iOS 16.0, *) { | |
self.navigationController?.setNavigationBarHidden(false, animated: animated) | |
} | |
if #available(iOS 16.0, *) { | |
self.navigationController?.setNavigationBarHidden(false, animated: animated) | |
} | |
super.viewWillDisappear(animated) |
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.
The API doc says
If you override this method, you must call super at some point in your implementation.
I don't think the order of these two statements would make any difference, the pop animation should begin and end at the same time.
// We want to hide navigation bar *only* on HubMenu screen. But on iOS 16, the `navigationBarHidden(true)` | ||
// modifier on `HubMenu` view hides the navigation bar for the whole navigation stack. | ||
// Here we manually hide or show navigation bar when entering or leaving the HubMenu screen. | ||
if #available(iOS 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.
do you still see the navigation bar issue #7091 with the latest Xcode 14? somehow I don't see this issue anymore on trunk
using Xcode 14 in an iOS 16.0 simulator. I don't have an iOS 16 device though, might be worth testing on one to confirm if this workaround is still needed.
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.
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.
@jaclync Hmm, that's strange. I just run the trunk branch on an iPhone 14 simulator using Xcode 14, and verified this is still an issue.
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.
Sounds like something odd on my end then, thanks for checking both!
@@ -52,6 +52,9 @@ struct ShippingLineDetails: View { | |||
symbol: nil, | |||
keyboardType: .default) | |||
.accessibilityIdentifier("add-shipping-name-field") | |||
.onTapGesture { | |||
focusAmountInput = false |
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 you have the testing steps for this change?
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.
This code was added so that the test_creat_new_order
UI test can pass on CI. It's a strange issue though, since the test failure only occurs on CI, not on my mac.
BTW, the issue was mentioned in my original PR.
Here is a very strange issue only happens in UI test on CI. I had to explicitly make a text field loose keyboard focus by changing the binding variable, for the other "add-shipping-name-field" text field to gain keyboard focus.
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.
BTW, you can find my many attempts of fixing this issue in this buildkite branch builds.
From the test result bundle (you can download one from the artifacts of this step), it appears even thought "add-shipping-name-field" is tapped, it's still "add-shipping-amount-field" that has the keyboard focus, which caused the test to fail.
if #available(iOS 16.0, *) { | ||
XCTAssertEqual(timeRangeBarViewModels.map { $0.timeRangeText }, ["Monday, Jan 3", "Monday, Jan 3 at 1:00 AM"]) | ||
} else { | ||
XCTAssertEqual(timeRangeBarViewModels.map { $0.timeRangeText }, ["Monday, Jan 3", "Monday, Jan 3, 1:00 AM"]) | ||
} |
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.
nice catch!
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.
✅ Xcode 13.4.1 + iOS 14.5, 15.5 simulators
✅ Xcode 14 + iOS 16 simulator + iOS 16 device
There are couple of new warnings in Xcode 14:
warning build: Run script build phase 'SwiftLint' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase.
warning build: Run script build phase 'Check for nested frameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase.
Hi @jaclync , I'll merge this PR for now. I'm happy to follow up if you have any further comments. Thanks! 😄 |
Note: While I am listed as the PR author, @crazytonyli did all the heavy lifting to get the app building and up-to-date through all the betas! —@mokagio
Description
This is going to be a long running branch to (try to) stay on top of the Xcode 14 betas PRs.
I expected many of you will want to checkout this branch locally to play with it. As such, I think we should keep it alive by merging
trunk
into it. But, I think once we'll officially switch to Xcode 14 stable, it'll make sense to do a big rebase so the history stays tidy.I called the branch
xcode-14
. This might give us the option to keep the beta branch stable (🙃 🙂) and work on a new beta support without breaking the "stable" branch. That is, we might have anxcode-14-beta-2
branch in the future.Ideally, we should implement as many fixes for errors and warnings found here as possible on
trunk
. See:Testing instructions
Download Xcode 14 beta 1 and run this branch 😅 .
If you do, you might notice a bunch of:
I haven't looked into it yet, other than finding this thread about it in the Swift forums.
Screenshots
RELEASE-NOTES.txt
if necessary.