Post

Replies

Boosts

Views

Activity

Can a Live Caller ID server supply live data or must it be static?
With the Live Caller ID example server, the caller lookup dataset is defined in an input.txtpd and processed by running a ConstructDatabase command which creates a block.binpb and an identity.binpb file. In other words, a static input file is being processed into static block and identity files. However, in the real world, the data content for identified and blocked numbers is something which is in a constant state of flux and evolution, as new numbers becoming available, old ones become stale, numbers which were initially considered safe change into being considered malicious etc. etc. Is the example server just that, merely an example using fixed datasets, and an actual production server is able to use live every changing data to formulate its response back to the iPhone OS query? Here's a concrete use case - suppose it's a requirement to permit US nanp numbers but to block anything else. The total number of non US nanp numbers is so large and ever changing that it would be unfeasible to attempt to capture them in an input.txtpd file and then process that, and then to re-capture and re-process it endlessly. Instead what would be required is the ability for the Live Caller ID server to evaluate at query time, using a regular expressions for example, if a number is nanp or not. Is this possible?
5
1
856
Mar ’25
didRegisterForRemoteNotificationsWithDeviceToken() not called if requestAuthorization() is not called
If I run the following code in didFinishLaunchingWithOptions() UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { granted, error in if granted { DispatchQueue.main.async { application.registerForRemoteNotifications() } } } Then the result is that didRegisterForRemoteNotificationsWithDeviceToken() gets called. However if I change the code to be just: DispatchQueue.main.async { application.registerForRemoteNotifications() } Or as as its already running on main in this scenario, then just application.registerForRemoteNotifications() Then didRegisterForRemoteNotificationsWithDeviceToken() does NOT get called, but also neither does didFailToRegisterForRemoteNotificationsWithError(). Obtaining a push token is supposed to be independent of the user granting notifications permissions, so why am I not observing that behavior? I only observe this behavior when running on hardware, when running on the simulator both forms of the code work. Yet its nothing to do with my phone not being able to contact the Apple servers etc. - if I change the code back and forth back and forth between the two then if 100% works when using requestAuthorization() and 100% doesn't when not using it. There's nothing additional or out of the ordinary with the code, its standard app delete template stuff. Why isn't it getting a push token when requestAuthorization() isn't used? (I've tried adding an async delay to calling registerForRemoteNotifications(), but it made no difference).
5
1
266
Sep ’25
OSLogStore can't access an app's extensions?
I've got an iOS app with lots of extensions, some of them complex and doing a lot of stuff. After a bug I'd like to be able to use OSLogStore to get a holistic picture of logging for the app and its extensions and send that to a debugging server to retrospectively view logs for the app and its extensions. The constructor is OSLogStore.init(scope: OSLogStore.Scope), however scope only has one value .currentProcessIdentifier. Implying if that is called from within the app it can only get access to logging for its process only. I tried it out to confirm this is the case - if I log something in an extension (using Logger), then run the app with code like this:  let logStore = try! OSLogStore(scope: .currentProcessIdentifier)  let oneHourAgo = logStore.position(date: Date().addingTimeInterval(-3600)) let allEntries = try! logStore.getEntries(at: oneHourAgo)       for entry in allEntries { look at the content of the entry Then none of the entries are from the extension. Is there anyway from within the app I can access logging made within an extension?
4
0
873
Apr ’25
How do you file a feature request?
If you go to https://feedbackassistant.apple.com and create a new feedback (for iOS and iPad) item, then these are the types of feedback choices: Incorrect/Unexpected Behavior Application Crash Application Slow/Unresponsive Battery Life Suggestion A suggestion sounds more like something an iPhone user want so suggest as a feature, not how a developer might request an API feature. Is that really what, as a developer, you are supposed to use to make a development feature request?
4
0
3.7k
Jul ’23
Very occasionally a phone gets into a state where the OS cannot launch a notification service extension
This is about the 3rd time I've seen this now (in about 5 years of using notification service extension, however all the occurrences have been in the past couple of months so presumably its some recent instability). What happens is a push is sent to the handset and is meant to get intercepted by a notification extension, except that doesn't happen - not due to an error with the app - something internally has gone wrong with the OS. Once this starts the notification service extension can never receive pushes again until the phone is restarted after with the extension starts to receive the pushes again. I got log from the OS when it did this and found there was an RBSRequestErrorDomain Code=5 error [u A0F3A639-F287-4B0C-AADE-A6F547D91404:m (null)] [<private>(<private>)] Failed to start plugin; pkd returned an error: Error Domain=PlugInKit Code=4 "RBSLaunchRequest error trying to launch plugin com.theCompany.app.NotificationServiceExtension(A0F3A639-F287-4B0C-AADE-A6F547D91404): **Error Domain=RBSRequestErrorDomain Code=5 "Launch failed**." UserInfo={NSLocalizedFailureReason=Launch failed., **NSUnderlyingError=0x5faa61190 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111"** UserInfo={NSLocalizedDescription=**Launchd job spawn failed**}}}" UserInfo={NSLocalizedDescription=RBSLaunchRequest error trying to launch plugin com.theCompany.app.NotificationServiceExtension(A0F3A639-F287-4B0C-AADE-A6F547D91404): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x5faa61190 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}} Can file a radar but just posting here first just in case anybody from Apple know what the OS error code and hence the reason. (longer console log available)
4
1
1.2k
Oct ’23
For goodness sake, why does Xcode keep doing this?
This has been a continual headache for months, ever since Xcode 15 came out. Everything is working just fine, you just made a code change, built and run it, and Xcode installs to the phone nice and quickly and runs it. But them bamn, next time you do the same thing, Xcode displays "Installing to " forever. It just never finishes. I've had this occur numerous times every day, with different versions of Xcode, multiple different iPhones, running multiple different versions of iOS, and even with different Macs. Always the same. It'll be working just fine, then out of the blue, without changing anything, Xcode will suddenly just decide to get into this state where it just hang and during installation, and won't recover even after terminating and restarting Xcode. Please somebody from Apple, what is going on? Is there a work around, how can it stopped from happening? Deleting the app doesn't fix it, restarting Xcode doesn't fix it. Unplugging the usb cable doesn't fix it, Restarting the phone doesn't fix it. What will? Wasted sooo much time with this happening every day for that several months. I've asked this question before and was met with total silence. Must I really raise an official support ticket to get an answer to this? Surely I'm not the only one this is happening to? And if its not "Installing to " that hangs forever then its "Attaching to on <name of phone" that hangs forever, usually both at the same time. (Currently running Xcode 15.2, iPhones are connected via usb).
4
1
898
Jan ’24
Notification content extensions not working in 10.2
I wrote a notification content extension which with 10.1 was working perfectly and reliably - it was getting called 100% of the time, as it should, and eveything was great and working as it should.But now with 10.2 I just cannot get the bugger to work at all - the extension just isn't being called by the OS (actually it was called once out of about 30 attempts and on that one occasion the UNNotificationExtensionDefaultContentHidden YES flag was ignored, which it didn't use to be with 10.1)Anybody else having problem with content extensions with 10.2, but if not is there some trick or tweak or change you applied to get them to work?
4
0
3.8k
Aug ’22
Notification displayed via Notification Service Extension doesn't display correctly if the iPhone is passcode protected and locked
I've got a notification service extension which is working as expected unless the user a) turns the passcode for the iPhone on and b) turns on Auto-lock and the iPhone is locked when a push arrives If auto-lock is turned on and the phone is locked but passcode is not turned on, then the notification is displayed as expected. The iPhone displays a notification with the top line being the name of the app and the second line saying "Notification", which is neither the content within the push payload, not what is being set as the content within the extension. There's no difference in behaviour of the extension when passcode is enabled. Adding logging to the extension I can confirm the content is being replaced and posted as expected: NSLog("Going to post notification title: \(notificationContent.title) subtitle: \(notificationContent.subtitle) body: \(notificationContent.body)") contentHandler(notificationContent) The notificationContent is as expected and is identical when passcode is on off. Why is the iPhone displaying the notification incorrectly if passcode is turned on and the phone locked?
3
0
1k
Jan ’22
How is one supposed to create a Background Assets extension? There's no extension type for this existing in Xcode beta 5
I want to use features described in the background assets WWDC22 session, however with Xcode 14 Beta 5 there is no application extension of this type. There was an application extension type with beta 4, but there are two problems with this firstly Testflight doesn't recognize it so its impossible to upload and therefore use (because some of the features are documented as only working when the app is installed from Testflight/App Store). secondly, if one creates an extension using Xcode beta 4, then it complies with beta 4, but it won't compile with beta 5. Therefore it is currently impossible to even begin to start working with the background assets extension framework.
3
0
1.1k
Sep ’22
How to implement background asset downloading feature?
I want to use features described in the background assets WWDC22 session (https://developer.apple.com/videos/play/wwdc2022/110403/). In earlier versions of Xcode 14 beta there used to be a background asset extension target type, however this got removed in beta 5 and has still not been put back even though Xcode 14 RC is released. With Xcode 14 beta 4, if the background asset target was chosen then a bunch of template code was created, same as happens with any extension type. But if the background asset extension target type isn't even present in the Xcode 14 RC, how is one supposed to create an extension and use this new feature?
3
0
1.6k
Dec ’22
Xcode 14.1 is unable to provision an asset download extension
This can easily be reproduced from scratch following these steps: Launch Xcode and choose to create a new iOS app. Organization name: com.company, ProductName:experiments. Therefore the bundle id is: com.company.experiments Create a background download target, productName:backgroundDownloadExtension. Therefore the bundle is is: com.company.experiments.backgroundDownloadExtension When Xcode creates the extension it automatically gives it a group capability with id: group.com.company.experiements. Within the signing & Capabilities section for the extension there is the following error: Within the developer portal, go to the Identifiers section, locate the main app bundle com.company.experiements. If not ticked, tick the App Groups capability. Click on edit, select group.com.company.experiments Within the developer portal Identifiers section, locate the extension bundle, com.company.experiments.backgroundDownloadExtension. Ensure the App Groups capability is ticked. Click on edit, select group.com.company.experiments. Like so for both the app and extension: Back in Xcode, for the app add the group capability, tick group.com.company.experiments. Now it matches the extension and will be like this for both of them: Quit and relaunch Xcode because Xcode is so unbelievably sticky and seems to cache everything, e-v-e-r-y-t-h-i-n-g, and millions of problems can be solved just by quitting/relaunching it. In the Signing & Capabilities section for the extension it still displays this: Back in the developer portal, create a provisioning profile for iOS development, choose the com.company.experiments bundle id, download it. Do likewise for the com.company.experiments.backgroundDownloadExtension After downloading, click on them both. Quit and re-lanch Xcode again. Any luck? No its still displaying the provisioning error. Ok, enough of Xcode's automatic management of signing. Let's turn that off and import the the extension provisioning profile that was just downloaded. Still getting this error: The entitlements file's contents are: <key>com.apple.security.application-groups</key> <array> <string>group.com.company.experiments</string> </array> The contents of the downloaded extension profile are: <key>Entitlements</key> <dict> <key>com.apple.security.application-groups</key> <array> <string>group.com.company.experiments</string> </array> <key>application-identifier</key> <string>MV8J9D3236.com.company.experiments.backgroundDownloadExtension</string> <key>keychain-access-groups</key> <array> <string>MV8J9D3236.*</string> <string>com.apple.token</string> </array> <key>get-task-allow</key> <true/> <key>com.apple.developer.team-identifier</key> <string>MV8J9D3236</string> </dict> I give up, how the hell can you create a background download extension without Xcode displaying the error?
3
1
1.7k
Jan ’23
"ITMS-90338: Non-public API usage - The app references non-public selectors" issue still present when uploading to TestFlight, except now its preventing builds from appearing
While attempting to upload my app to TestFlight (which has already been uploaded numerous times, including just a few days ago with the same code base) there is this error "TMS-90338: Non-public API usage - The app references non-public selectors in : _isKeyDown, _modifiedInput, _modifierFlags....." Nothing new there, that's been happening for months for myself and countless others and has been reported numerous times, i.e. https://developer.apple.com/forums/thread/127678?answerId=715975022#715975022 https://developer.apple.com/forums/thread/714450 But now there's a difference - in the past the builds always appeared in Testflight after getting this warning, so it wasn't an issue. But now that's changed, the build is no longer appearing in Testflight, so it suddenly is a very big issue.
3
0
895
Feb ’23
Is there any way of adjusting logging level dynamically at run time?
I've gone through several tutorials, and the documentation, it seems there's no way to adjust the logging level dynamically, or even at build time for that matter. i.e. there is apparently nothing that exists such as: static let logger = Logger(subsystem: subsystem(), category: category()) logger.setMinimalLevel(.Warning) logger.trace("I won't get displayed because minimal level is debug") Am I mistaken and there is something like this?
3
0
742
Sep ’23