Post

Replies

Boosts

Views

Activity

Reply to .glassEffect(_in:) crushing on iOS 26 public beta.
My question on how to handle crashes is not limited to just iOS version variations issues. I was refering to general exceptions and runtime errors that can cause app termination. Thanks. TEST! You need to test your app on different versions of the operating system, and fix any bugs you find. Proactively code so that your app handles failures gracefully. For example, don't always assume there's going to be a value and force unwrap things. Provide a default value and handle it, i.e. some.filter { $0.abc == "xyz" }.first! should be some.filter { $0.abc == "xyz" }.first ?? defaultThing. Use guard let and if let.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25
Reply to .glassEffect(_in:) crushing on iOS 26 public beta.
Firstly, please ignore the pre-release Public Beta; it's irrelevant. The fact that a friend of yours is running it is irrelevant. It is not a supported version of iOS, and you should not be developing against it. Think about it... Apple might release ten betas of iOS 27; are you going to write your apps so that they run on all ten betas, even though no one will be running those betas anymore? Your friend should not be running the Public Beta. It is not supported, and you should not support it either. Secondly, the way to correctly make sure your app doesn't crash on different versions of iOS is to test your app. Xcode allows you to use multiple Simulators which will let you catch most issues. Also, you can use code such as if #available(iOS 26.0, *) to conditionally run code that applies only if that version of iOS is available on the device. If it isn't, you run some other code. I do this all the time. I have a function like this: func olderiOS() -> Bool { if #available(iOS 26.0, *) { return false } return true } // Create a global var to use it so we don't keep running the check: let isOlderiOS: Bool = olderiOS() I use it for inline checks, such as: .padding(.top, (isOlderiOS ? 10 : 5) where you can't use if #available(). Finally, you can apply conditional modifiers to code. Something like this: public struct Additional<Content> { public let content: Content public init(_ content: Content) { self.content = content } } extension View { var additional: Additional<Self> { Additional(self) } } extension Additional where Content: View { @ViewBuilder func presentationDetents_before_iOS18_0(height: CGFloat) -> some View { if #available(iOS 18.0, *) { content .presentationDetents([.height(height)]) } else { content } } } I've created the presentationDetents_before_iOS18_0 modifier because you can't use the .presentationDetents modifier before iOS 18, so this function applies it if iOS 18.0+ is available, and doesn't if we're on iOS 17 or below. I use it like this: .sheet(isPresented: $showSheet) { ChooseImageSheet(showSheet: $showSheet) .additional.presentationDetents_before_iOS18_0(height: 400) } There might be easier ways to do some of this, but it works for me.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25
Reply to Guideline 4.2 - Design - Minimum Functionality
My app was a web app running in WebView. Don't do this. No one wants to have to download an app when they could just as easily go to a website and perform exactly the same actions there. That's why your app was rejected. If the Review Team sent you a screenshot of the 'left menu' saying it didn't have enough content, then you should add more content to the app. 2-3 screens inside open WebView Write those pages as native pages inside your app rather than merely views onto a web page. Make the experience native, i.e. the user is in an app on iOS, so make the experience look and feel like they're in an app in iOS, rather than them having downloaded an app and being sent to a website. I promised my client I would develop an app for him. You seem to be coming at this from the wrong direction. You promised your client you would develop an app for them, but you're trying your hardest to simply shoehorn a website into an app 'shell'. That's not a good experience for the users, and it's not what your client wants. Approach the problem from the angle of creating an app with the features that the client needs. Build each screen as required. What you're doing seems to be merely adding a web view that goes to an existing web page. Not good.
Nov ’25
Reply to CarPlay & iPhone 17 Pro (Pixelated Screen)
These are the Developer Forums, where developers of third-party apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual employee developers chat about bugs. You should raise your issue at: https://feedbackassistant.apple.com and include screenshots (if possible), the exact iOS version number, and which car and in-car entertainment system it's being connected to.
Topic: Community SubTopic: Apple Developers Tags:
Nov ’25
Reply to Build-error xcode
Target 'PCS_EmpApp' (project 'PCS_EmpApp') has copy command from '/Users/mayankjain/Documents/05-NOV-2025-SWETA_IOS/PCS_EmpApp/PCS_EmpApp/xcode-out/Platforms/iOS/Info.plist' to '/Users/mayankjain/Library/Developer/Xcode/DerivedData/PCS_EmpApp-chsylqbxjptobeawzzckymqzagvr/Build/Products/Debug-iphonesimulator/PCS_EmpApp.app/Info.plist That's telling you that you have a copy command in the Build Phases that's copying your Info.plist file, and a second process that's generating the file. Both processes try to put it in the same place, hence the 'multiple commands produce...' error. Remove that copy command, and the build should work.
Nov ’25
Reply to Visual glitch iOS 26.1 Home screen: Different rotated Liquid Glass effects after reboots
You've raised this before on these forums, but you're in the wrong place. These Developer Forums are for developers from around the world to ask for hints and tips on coding apps for Apple's platform. We aren't employed by Apple, so bugs posted on here won't get anywhere. You need to raise each issue you find separately at https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can track them.
Topic: Community SubTopic: Apple Developers Tags:
Nov ’25
Reply to Visual glitch of Reminders-App (iOS 26.1)
You should raise this as a bug in the usual way. It won't really get progressed if it's only posted in these Developer Forums. Especially given we aren't Apple's actual developers; we're just random people from around the world writing apps for Apple's platforms. These Developer Forums are for us to ask for hints and tips on coding. You need to raise each issue you find separately at https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can track them.
Nov ’25
Reply to Switfui: change color in 'menu'
As far as I know you cannot change the styling for a menu item because the menu is displayed appropriately for the operating system it's running on. So, trying .foregroundColor(), .foregroundStyle(), .tint() etc. likely won't work. The only way you can make a menu item red is by giving the Button the destructive role. This, by default, makes the item red, but it may also have other side effects that you may not want: Button(role: .destructive) From the documentation: Use this role for a button that deletes user data, or performs an irreversible operation. A destructive button signals by its appearance that the user should carefully consider whether to tap or click the button. For example, SwiftUI presents a destructive button that you add with the swipeActions(edge:allowsFullSwipe:content:) modifier using a red background. So please, use it wisely. In the meantime, why not raise a feedback request, and ask for a way to tint a menu item? https://feedbackassistant.apple.com/
Topic: UI Frameworks SubTopic: SwiftUI
Nov ’25
Reply to iOS 26.1 and tabViewBottomAccessory
Okay, so in the meantime you could use something like this: public struct Conditional<Content> { public let content: Content public init(_ content: Content) { self.content = content } } extension View { var conditional: Conditional<Self> { Conditional(self) } } @ViewBuilder func showAccessory(_ enabled: Bool, accessoryContent: View) -> some View { if(enabled) { if #available(iOS 26.2, *) { content .tabViewBottomAccessory(isEnabled: enabled) { accessoryContent } } else { if #available(iOS 26.0, *) { content .tabViewBottomAccessory() { accessoryContent } } else { content } } } else { content } } // Use it like this: ... MyView { } .conditional.showAccessory(true /*or false*/, accessoryContent: MyAccessoryView()) Caveat: I have not tried this.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25