Post

Replies

Boosts

Views

Activity

Reply to Best way to wake app to sync data
Argun and Kevin, Thank you both for your suggestions and explanations. The main use case is periodically running the refresh in the background. There are very few cases where the user actually interacts with the app UI, and they are probably executed very infrequently. So my guess is that the user will frequently swipe the app away after using it, but I still need the background processes to run. It sounds like neither background tasks nor silent push notifications can help me with this. Do I have any other options?
4w
Reply to Can't change background task identifier
Aha! I figured it out! I guess it would help to read the docs a little more carefully! It seems that only 1 refresh task can be scheduled at a time. If I do a BGTaskScheduler.shared.cancelAllTaskRequests() when I start up the app, to insure there aren't any "lingering" refresh tasks, I can use whatever names I want, and change them at will. Sorry to take up your time, but I learned to read better, and to file a bug (which I will close), so not a total loss (at least for me). I'll be more careful next time! Thanks again...David
Jan ’24
Reply to Can't change background task identifier
Thanks! I'll file bug report. I still have two TSI's available on my Developer Program. Would it be worthwhile to ask for help on this through the TSI? My concern is that when I first found this problem, it was when I was testing an app I'm working on. I think I changed the identifier a few times, and I don't know if I can retrace back to the original one (there seem to be some git bugs in xcode, so sometimes getting back to old version is difficult), so I may never be able to get the app to work without either: 1) figuring out what name is "registered" that will work, or 2) finding a way to "de-register" so I can put in a name that will work until the bug is fixed (if it is fixed). I guess my question is: how deep will Apple tech support go to help me get my app working, given that there is a bug I may not be able to workaround? (Does that make sense?) Any insights will be appreciated.
Jan ’24
Reply to Can't change background task identifier
What you described is correct. I have tried deleting app between 3 and 4, and it still fails. The identifier I'm using (not that this should matter) is: "com.dlsa.BackgroundProcesses.refresh" and I when I change it to: "com.dlsa.BackgroundProcesses.refreshx" it fails. The command I'm using is: e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.example.apple-samplecode.ColorFeed.refreshx"] I know it is registering the task correctly, because if I run the app and enter the old command (without the "x") I get: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No launch handler registered for task with identifier {public}@' *** First throw call stack: (0x1a55be69c 0x19d873c80 0x1a4b1cdd8 0x21bb89b0c 0x21bb882bc 0x1a5503794 0x1a550322c 0x1a44d6440 0x1a44d5fc0 0x1a44d5928 0x20f517b44 0x20f50a4b8 0x105852bb4 0x105871ca8 0x10585a7c4 0x10585b728 0x1058685f8 0x105867c2c 0x20f4b7964 0x20f4b7a04) libc++abi: terminating due to uncaught exception of type NSException but if I re-run with the correct command, I don't get the exception, but it doesn't run the background task. Switching back to name without "x" all works fine.
Jan ’24
Reply to App Store Connect Submissions
First attempt to submit was rejected because it is a game to teach blackjack gameplay and it has “betting” to keep score as if you’re at blackjack table. It’s not a multiplayer game…no interaction with anyone. No purchases or actual betting. Just there to teach the game and give sense of how you might do at the tables if you apply the lessons learned. I’m assuming the concern relates to all the online gambling and fantasy-sports games. This is nothing like that. So what should I do?
Dec ’22