Post

Replies

Boosts

Views

Activity

Reply to Contrast for texts in widgets with image backgrounds transparent mode
Right, but the code you've posted isn't making use of any of the suggestions I made - which are from WidgetKit. Those bits of WidgetKit are there to aid you in displaying the widget in the correct style for the appearance currently selected. Look at how Apple's own Podcasts widgets or Weather widgets act on the Home Screen in Clear and Tinted modes; they have no gradient or background. The recommended style for a widget background in Clear or Tinted modes is to have a clear background, i.e. no image, so you should either not display your image, or set its opacity to a low number and tweak it until it looks good. Preview your widget in Xcode, change the display mode to Clear or Tinted, then add the modifier .widgetAccentedRenderingMode(.accentedDesaturated)to the Image. Does it improve your widget?
Nov ’25
Reply to Contrast for texts in widgets with image backgrounds transparent mode
Are you using @Environment(\.widgetRenderingMode) var widgetRenderingMode already? If not, add that to your widget view, and change how the widget looks depending on the various values of widgetRenderingMode, i.e.: var body: some View { ZStack { switch renderingMode { case .fullColor: Text("Full color") case .accented: ZStack { Circle(...) VStack { Text("Accented") .widgetAccentable() Text("Normal") } } case .vibrant: Text("Full color") default: ... } } } Also, on images, there's a modifier: .widgetAccentedRenderingMode() with options like .accentedDesaturated. Take a look at how each of those values affects your widget, and you might find out the right combination that works in each of the various Home Screen modes. Note that this is only available from iOS 18 onwards. Also note (from the dev documentation) if the Image is a subview for a group that has widgetAccentable(true) applied, this modifier may conflict. It's quicker to check the various looks in Xcode previews than it is to build and deploy to an iPhone and customise the Home Screen each time, just to save you some time.
Nov ’25
Reply to 32 byte NSNumber memory leak - how to fix?
I've tried to reproduce it in a new project, but it doesn't happen, either in the Simulator or on a physical device, possibly because it only happens when there are a bunch of views or a certain stack, who knows. Back in the original project, deploying to a physical iPhone and triggering the snapshot function is now producing this in Instruments: The call to superView.drawHierarchy(in: superView.bounds, afterScreenUpdates: true) within generateSnapshot() is selected. Everything after that is UIKitCore, Foundation or CoreFoundation, so I don't see how I'm leaking the memory. I've raised FB21074853 with the smaller project. It won't show the issue, but it might be a starting point for the guys at Apple to get to it.
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’25
Reply to Adding days to a date using the result of a division operation
What version of Xcode are you using? What version of iOS/macOS/other OS are you building for? I tried it in Xcode 26.1.1 on macOS 15.7.2, targeting iOS 26.1 and it works fine, no errors. Here's a reduced version (that also works): var dateComponent = DateComponents() dateComponent.day = Int(200 / 80) let newDate: Date = Calendar.current.date(byAdding: dateComponent, to: Date.now)! print(newDate)
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’25
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 Contrast for texts in widgets with image backgrounds transparent mode
Right, but the code you've posted isn't making use of any of the suggestions I made - which are from WidgetKit. Those bits of WidgetKit are there to aid you in displaying the widget in the correct style for the appearance currently selected. Look at how Apple's own Podcasts widgets or Weather widgets act on the Home Screen in Clear and Tinted modes; they have no gradient or background. The recommended style for a widget background in Clear or Tinted modes is to have a clear background, i.e. no image, so you should either not display your image, or set its opacity to a low number and tweak it until it looks good. Preview your widget in Xcode, change the display mode to Clear or Tinted, then add the modifier .widgetAccentedRenderingMode(.accentedDesaturated)to the Image. Does it improve your widget?
Replies
Boosts
Views
Activity
Nov ’25
Reply to Contrast for texts in widgets with image backgrounds transparent mode
Are you using @Environment(\.widgetRenderingMode) var widgetRenderingMode already? If not, add that to your widget view, and change how the widget looks depending on the various values of widgetRenderingMode, i.e.: var body: some View { ZStack { switch renderingMode { case .fullColor: Text("Full color") case .accented: ZStack { Circle(...) VStack { Text("Accented") .widgetAccentable() Text("Normal") } } case .vibrant: Text("Full color") default: ... } } } Also, on images, there's a modifier: .widgetAccentedRenderingMode() with options like .accentedDesaturated. Take a look at how each of those values affects your widget, and you might find out the right combination that works in each of the various Home Screen modes. Note that this is only available from iOS 18 onwards. Also note (from the dev documentation) if the Image is a subview for a group that has widgetAccentable(true) applied, this modifier may conflict. It's quicker to check the various looks in Xcode previews than it is to build and deploy to an iPhone and customise the Home Screen each time, just to save you some time.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Can't Post On This Forum
This post is deemed to be sensitive, and the reason is the first two words, because they sound rude when they're put next to each other: // Use the singular of cues in place of A: for A in cues { // Do a thing }
Replies
Boosts
Views
Activity
Nov ’25
Reply to 32 byte NSNumber memory leak - how to fix?
I've tried to reproduce it in a new project, but it doesn't happen, either in the Simulator or on a physical device, possibly because it only happens when there are a bunch of views or a certain stack, who knows. Back in the original project, deploying to a physical iPhone and triggering the snapshot function is now producing this in Instruments: The call to superView.drawHierarchy(in: superView.bounds, afterScreenUpdates: true) within generateSnapshot() is selected. Everything after that is UIKitCore, Foundation or CoreFoundation, so I don't see how I'm leaking the memory. I've raised FB21074853 with the smaller project. It won't show the issue, but it might be a starting point for the guys at Apple to get to it.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to Adding days to a date using the result of a division operation
What version of Xcode are you using? What version of iOS/macOS/other OS are you building for? I tried it in Xcode 26.1.1 on macOS 15.7.2, targeting iOS 26.1 and it works fine, no errors. Here's a reduced version (that also works): var dateComponent = DateComponents() dateComponent.day = Int(200 / 80) let newDate: Date = Calendar.current.date(byAdding: dateComponent, to: Date.now)! print(newDate)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to Developer Strap Gen 2 - Only USB2 Speeds
I can't find any information on the Strap, and since no Apple developer has responded to any of you, I suggest you all raise feedback reports on this. At the very least Apple will see the reports and get back to you. They may not even have seen these posts on the forums.
Replies
Boosts
Views
Activity
Nov ’25
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:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
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.
Replies
Boosts
Views
Activity
Nov ’25
Reply to .glassEffect(_in:) crushing on iOS 26 public beta.
You added a comment to my post saying: The device is running the public beta before iOS 26 was officially released in september You shouldn't be running the public beta from before iOS 26 was released. That version is out of date. Does your code work on the currently-released version of iOS, which is 26.1?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
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.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Typo: "Enteprise"
Yes, you can raise feedback reports, because they're bugs just like bugs in software. Please raise the issues separately (because they relate to separate documents) at https://feedbackassistant.apple.com/ then post the FB numbers here.
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
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.
Replies
Boosts
Views
Activity
Nov ’25