-
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
Fix build in Xcode 16 #1698
base: main
Are you sure you want to change the base?
Fix build in Xcode 16 #1698
Conversation
👀 |
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 code changes here all work great for me. Unfortunately macOS sequoia is dumb and the tab bar fix that works everywhere else does not work here.
I did some investigation and found a workaround, but it means we'd need to refactor AppView
to use UITabBarController
instead of TabView
😞 .
I see a few options here.
- Do the refactor. It probably won't take that long, right?
- Just leave it broken on macOS
- Continue developing in Xcode 16, but have Github build our app with Xcode 15, punting on the issue.
- Implement the custom tab bar that Sebastian designed.
I feel like the first makes the most sense to me. It would be fun to do the 4th too. Let me know what you think.
@@ -4,8 +4,10 @@ import SwiftSoup | |||
/// Parses the Open Graph metadata from an HTML document using SwiftSoup. | |||
struct SoupOpenGraphParser: OpenGraphParser { | |||
func metadata(html: Data) -> OpenGraphMetadata? { | |||
let htmlString = String(decoding: html, as: UTF8.self) | |||
guard let document = try? SwiftSoup.parse(htmlString) else { return nil } | |||
guard |
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.
looks like the formatting got messed up here. I'm surprised it didn't trigger swiftlint.
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 that was intentional. I had to add the let htmlString
to the guard
and then I wanted the let
statements to line up. SwiftLint was good with it and Xcode formats this way so I thought it'd be OK. Is there another format you prefer?
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 prefer the condition to start on the same line as the control flow statement. I don't think I've ever seen them split apart like this before, certainly not in the Nos codebase, so it was harder for me to read. It's nice that the let
s line up but in general I think I prefer the consistent indentation over visual symmetry.
However it's not really a hill I want to die on. I could get used to this.
@mplorentz Made it a UITabBarController and everything is working! I tested in simulators as well as on macOS Sequoia and macOS Sonoma, and I think we're all set. But please test it yourself to be sure. I'm not 100% satisfied with this since I kicked a can or two down the road (see the |
👀 |
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 looks good. The pixels changed quite a bit on macOS, I wish there was more padding at the bottom. Here's a screenshot comparing Nos Dev (this branch), Nos Staging, and the Figma design:
Also, the profile icon got weirdly brighter :(
The tab bars on the iPhone look the same, except for the profile icon which is noticeably brighter than the others. I'm not sure if it's worth spending time on, but it's pretty obvious to me.
Actually maybe the icons other than the profile icon got dimmer? 🤔 |
@@ -52,5 +52,8 @@ | |||
"info" : { | |||
"author" : "xcode", | |||
"version" : 1 | |||
}, | |||
"properties" : { | |||
"template-rendering-intent" : "original" |
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 this fixes the issue with the profile icon. I'm surprised we didn't see the issue on previous builds but I guess maybe something changed in Xcode 16 or 16.1.
Oops -- ok, I'll fix iPad and try to be more careful about testing everything next time. Missed testing on iPad. 🤦 |
Issues covered
#1570
https://github.com/verse-pbc/issues/issues/46
Description
Fixes the issues in Xcode 16:
How to test