Post

Replies

Boosts

Views

Activity

Reply to Clearing an app’s memory, data etc.
Before you re-launch your game, swipe up and up view the app switcher. The screen displayed there is a snapshot the system took the last time just before the game was suspended by the system. On re-launching the game, the system will display that snapshot until the app has relaunched. Since this happens very quickly it is usually just a very short flash. I believe you can set the snapshot to whatever you want before the app is suspended, but you'll have to read up on how to do that. Can you record the screen and show us exactly what you're seeing? Your explanation doesn't really explain it well.
Topic: Community SubTopic: Apple Developers Tags:
May ’25
Reply to Clearing an app’s memory, data etc.
This is an app/game you developed, right? If so, it's something you've done, not the system storing your previous game in its 'memory allocation'. Your app is reloading a previous game, or you've failed to wipe the game data from memory after you finished the game, so starting again simply plays from where you left off. It's your issue to fix. You need to architect the app better.
Topic: Community SubTopic: Apple Developers Tags:
May ’25
Reply to Problem with the note application
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. If you feel this is a bug, you can raise a Feedback report here: https://feedbackassistant.apple.com/ If you don't think it's a bug, and is more of a question, I'd suggest you ask it over at the Apple Support Forums. Thanks.
May ’25
Reply to Xcode
Here's how it works: A developer writes the source code, and creates an app. The app is built and uploaded to an App Store Connect account. The app is made available on the App Store. Did someone wrote your app for you? If so, they will have the source code. You should ask them for it. If someone did not write the app for you, then how do you have an app on the App Store? Did you buy an app from some dodgy business that just packaged it for you and put it on the App Store?
May ’25
Reply to Clarification on Use of exit(0) in iOS App for Fatal Error Recovery
If the app has entered a non-functional state, how are you going to display an alert controller? If you're able to do something in the app, then killing it is not the right thing to do. You should wipe everything and take the user back to the menu screen, or whatever start page you have, and reload everything. It's a really poor user experience to do what you're suggesting. If I were running a game and it threw up an alert telling me the game is going to crash, please restart it, I'd delete the game.
Topic: App & System Services SubTopic: Core OS Tags:
May ’25
Reply to tabItem vs. Tab() — how to support iOS 17 and 18?
I'm not sure you should try to do this, for a couple of reasons. Look at some simple code that's written for iOS 17 and 18: if #available(iOS 18, *) { TabView(selection: $selectedTab) { Tab("Watch Now", systemImage: "play", value: .watchNow) { WatchNowView() } } } else { TabView(selection: $selectedTab) { MenuView() .tabItem { Label("Menu", systemImage: "list.dash") } OrderView() .tabItem { Label("Order", systemImage: "square.and.pencil") } } } First reason: The iOS 18 format has a specific Tab object which has its own title and image in the Tab item itself, whereas iOS 17's tabItems force you to create a Label instead. That would be difficult to work around. Second reason: Tab contains a View, whereas tabItem is a modifier on a View (just as .bold() is a modifier on a Text view). It's the opposite way round, making it difficult again. It might be cleaner to simply do something like this, and you can remove the unnecessary code when you no longer support iOS 17: if #available(iOS 18, *) { MyTabs(selectedTab: $selectedTab) } else { MyTabs_iOS17(selectedTab: $selectedTab) } ... struct MyTabs: View { @Binding var selectedTab: Tabs var body: some View { if #available(iOS 18, *) { TabView(selection: $selectedTab) { Tab("Watch Now", systemImage: "play", value: .watchNow) { WatchNowView() } } } } } struct MyTabs_iOS17: View { @Binding var selectedTab: Tabs var body: some View { TabView(selection: $selectedTab) { MenuView() .tabItem { Label("Menu", systemImage: "list.dash") } OrderView() .tabItem { Label("Order", systemImage: "square.and.pencil") } } } } There are ways to do this, but as I've mentioned, you'll be trying to fit A into B and C into D, and will have to write a chunk of code that makes that happen. It will likely be easier to bite the bullet and write the two separate sections.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’25
Reply to Notification message not displayed in sleep mode
No need for the second thread. You have an hour to edit your original post. Anyway, is this an app you're developing? (I'm guessing not as that looks like the Santander logo.) If it's not for an app you're developing then this is a consumer issue. These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
May ’25
Reply to ScreenBlur is not happening always when app goes to app switcher.
I've since moved onto Swift and SwiftUI, but when one of my apps was written in Objective-C this is what I used, and it worked every time. Perhaps it's because I'm using a UIImageView?: - (void)applicationWillResignActive:(UIApplication *)app { NSLog(@"AD: applicationWillResignActive"); [self showBlurView:YES]; } - (void)applicationWillEnterForeground:(UIApplication *)app { NSLog(@"AD: applicationWillEnterForeground"); [self showBlurView:NO]; } - (void)applicationDidBecomeActive:(UIApplication *)app { NSLog(@"AD: applicationDidBecomeActive"); [self showBlurView:NO]; } - (void)showBlurView:(BOOL)show { NSLog(@"AD: showBlurView: %@", show ? @"YES" : @"NO"); if(show) { blurView = [[UIImageView alloc] initWithFrame:self.window.frame]; blurView.image = [UIImage imageNamed:@"blurViewImage"]; [self.window addSubview:blurView]; } else { if(blurView != nil) { [blurView removeFromSuperview]; } } }
Topic: UI Frameworks SubTopic: UIKit
May ’25