Post

Replies

Boosts

Views

Activity

Any concrete info on when Apple apply server side APNS throttling?
We have an app which gets sent APNSs by the server and use a Notification Service Extension to intercept them. In my observations I've never seen throttling applied on the device to these pushes (unlike app directed push where its easy to observe happening if you let the batter run low for example). The Apple documentation says it may perform server side throttling, but when, how often, under what circumstances? If the app has 30 million users and the server sends them 10m or 100 pushes per day will it get throttled? Does anybody have any have any documented or observed info on this.
0
0
663
Oct ’21
Notification filtering entitlement not working on iOS 13
I'm running an app with the com.apple.developer.usernotifications.filtering entitlement and the filtering works fine with iOS 15. However I tried running it on an older phone / OS (iPhone 8 / iOS 13.1.2) and it does not work. Is this entitlement not supported with iOS 13.1.2? If so, what is the earliest iOS version that supports it? The handset logged this: The OS displayed: default 07:55:58.800825-0800 NotificationServiceExtension   Mutated notification request will not visibly alert the user, will deliver original content If the app is run on iOS 15, it says : default 07:20:27.251600-0800  SpringBoard        Mutated notification request will not visibly alert the user, will supress original content
1
0
1.2k
Dec ’21
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
Unwanted Communication Extension template code doesn't work
If a unwanted communication extension target is created,then the auto-generated template code doesn't work. This can very quickly be demonstrated by: In Xcode create a new iOS project In that project create an unwanted communication extension target (I called it cheese so its easy to see in the console) Add some logging lines to the UnwantedCommunicationReportingExtension code that was created. Install app to iPhone, and select it in the settings app Swipe on a call in the call history. The following lines can be seen in the iPhone console: Unknown class _TtC6cheese13MainInterface in Interface Builder file. View controller is not of class ILClassificationUIExtensionViewController None of the logging lines added to the code are displayed, also the Done button in the presented UI is disabled - but in the code that is generated by the target templete is:       self.extensionContext.isReadyForClassificationResponse = true Which is supposed to enable the Done button. In the storyboard that gets created the custom class is set to MainInterface: How are you supposed to get this stuff working if it doesn't work out of the box? MainInterface isn't being recognized as the view controller class, and in the drop down UnwantedCommunicationReportingExtension doesn't appear. class UnwantedCommunicationReportingExtension: ILClassificationUIExtensionViewController {          override func viewDidAppear(_ animated: Bool) {         super.viewDidAppear(animated) NSLog("viewDidAppear")                  // Notify the system when you have completed gathering information         // from the user and you are ready with a classification response         self.extensionContext.isReadyForClassificationResponse = true     }          // Customize UI based on the classification request before the view is loaded     override func prepare(for classificationRequest: ILClassificationRequest) { NSLog("prepare")         // Configure your views for the classification request     }       // Provide a classification response for the classification request     override func classificationResponse(for request:ILClassificationRequest) -> ILClassificationResponse {         return ILClassificationResponse(action: .none)     } }
1
0
1.6k
Mar ’22
Unwanted communication extension is unable to persist data written to defaults
I'm currently using 4 extensions within my app and use a group in combination with UserDefaults.init(suiteName:) to share settings between the extensions and the app. However I've just tried adding an unwanted communications extension and found that data writing to defaults, in the exact same way as the other extensions, isn't saved. At first I noticed data written by the UCE wasn't present when the app tried to read it, so performed an experiment and found that while the extension is running, it can write and read data to user defaults, but the next time the extension runs, all that data has gone. I've tried using the old and now default UserDefaults.synchronize() but it makes no difference. Why is the UC extension different from every other extension? Is it possible to write and persist data from within it? let groupName = "group.com.mycompany.appName" let sharedDefaults = UserDefaults.init(suiteName: groupName) var theValue = sharedDefaults!.value(forKey: "some key") NSLog("\(theValue)") // prints nothing, despite the extension having previously run sharedDefaults!.set("some value", forKey: "some key")) sharedDefaults!.synchronize() theValue = sharedDefaults!.value(forKey: "some key") NSLog("\(theValue)") // prints "some value"
2
1
1.5k
Aug ’22
Unable to upload app with iOS 16 background asset download extension to Testflight - invalid info.plist
I'm experimenting/testing the new background download extension. The documentation for it says that the applicationDidInstall() and applicationDidUpdate() methods are only called if the app is installed from the App Store or from Testflight (I tried installing via Apple Configurator 2 but they are not called then). Hence in order to check these out I have to first upload the app to Testflight, but there's an error about the info.plist - however the info.plist is created/populated using Xcode's target template for the extension, so if Xcode itself is incorrectly creating the info.plist how is one supposed to know what's wrong with it and how to fix it? This is the content of the info.plist that was generated: <key>EXAppExtensionAttributes</key> <dict> <key>EXExtensionPointIdentifier</key> <string>com.apple.background-asset-downloader-extension</string> <key>EXPrincipalClass</key> <string>$(PRODUCT_MODULE_NAME).BackgroundDownloadHandler</string> </dict> And the error uploading to Testflight P.S. There's no apparent relevant tag for this extension
1
0
947
Aug ’22
Push to talk: how is the push token supposed to be used if its lifetime is ephemeral?
I don't understand how the push tokens are supposed to be used with push to talk given that their lifetime is ephemeral and they become invalid as soon as a channel is left. Suppose there is phone A and phone B, both with a PTT app installed on it. Then on phone A if the user launches the app and, for example, pushes a button to initiate a talk session with user B, then the app on phone A will join a channel and this will result in receivedEphemeralPushToken() getting called. Then if phone A sends that push token to the server, well then what next though? How is the user on phone B going to be informed that the user on phone A wants to talk to them. The server can't send a push to phone B using that token because that's the token for phone A. If the server has a token from phone B stored from previously, then the push isn't going to work because the documentation says the push token's lifetime is empemeral and will end as soon as the channel is left. So that channel for B's push token would have been left hours, or days or even months in the past. Summary: if user A wants to talk to user B, how does user B's app get notified user A want's to talk to them if the push tokens' lifetimes are all ephemeral?
1
1
1.3k
Aug ’22
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
usernotifications.filtering entitlement prevents a contact with an image from being added/updated
My notification service extension has the com.apple.developer.usernotifications.filtering entitlement and it would appear that this is preventing a contact with an image from either being added or updated, any attempt to do so results in calls to CNContactStore.execute() throwing an CNInvalidRecords error. If the filtering entitlement is removed then there are no problems and the contact can be added/updated without problem. If the entitlement is present but the contact is added/updated without an image then it is also problem free. It is specifically adding a contact with an image that cannot be accomplished if the entitlement is present. I've encountered problems with this entitlement before - for example there are problems attempting to use a CXCallDirectoryManager from within a notification service extension with this extension. Quote from Apple on the call extension issue: "Because that entitlement can "hide" notifications, its sandbox profile is actually more restrictive than the standard NSE sandbox. That's what's preventing access to CXCallDirectoryManager, not the App ID properties.  -Kevin Elliott DTS Engineer, CoreOS/Hardware" I'd be appreciative if somebody from Apple could comment and confirm if the problems with updating contacts with an image with this entitlement is the same fundamental sandboxing issue? If so, I don't understand why a contact can be added with this entitlement, its only an issue if the contact has an image, does that imply a bug?
1
0
1k
Sep ’22
Why does the usernotifications.filtering entitlement stop UIScreen.main.bounds from working?
If UIScreen.main.bounds is called from within a notification service extension then the values returned as as you'd expect. But then if the com.apple.developer.usernotifications.filtering entitlement is added to the extension the values returned are (0.0,0.0,0.0,0.0). Why is that, why does this entitlement stop UIScreen.main.bounds from working?
0
0
646
Sep ’22
Sandbox restriction message caused by differing Application Identifier Prefix and Team Identifier in an extension?
I'm working on an out-sourced application for a company and when a version of it built using ids and provisioning profiles from my Apple account it runs without problems. However when it is built and run using the company's ids and provisioning profiles I am seeing an issue with it. What is happening is when a notification service extension uses a call extension then the OS logs: doQueryCallExtensionStatusWithDispatchGroup() COMPLETED WITH ERROR: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.CallKit.CallDirectory was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo= NSDebugDescription=The connection to service named com.apple.CallKit.CallDirectory was invalidated: failed at lookup with error 159 - Sandbox restriction. I noticed that in the company's provising profile for the notification service extension the app identier prefix is different from the team identifer. In my own provisioning profile the app identifier prefix and team identifer are the same. Could it be the case that this difference in identifiers within the provisioning profile is leading to the sandbox error message? Attached is the notification service extension provisioning profle provided to me by the company (converted to a .plist for readability)
2
0
7.9k
Sep ’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
Xcode 14.1 beta: How do you run the backgroundassets-debug command?
If I run "man backgroundassets-debug" I get instructions/help/comments for using the backgroundassets-debug tool to simulate the background assets download framework (which has been added back to Xcode 14.1 beta 1 after being removed from Xcode 14 beta 3) But how do you actually run the backgroundassets-debug tool itself? "backgroundassets-debug -h" for example results in a command not found message. I tried searching for the tool within the Xcode 14.1 package but can't see it anywhere running "xcode-select -p" displays "/Applications/Xcode-beta.app/Contents/Developer" And "xcode-select -v" displays "xcode-select version 2395" Within Xcode preferences, command line tools is set to Xcode-beta 14.1
1
0
956
Sep ’22
Issues with https auth challenge and background asset download extension
I'm trying to get a background asset extension working with iOS 16.1/Xcode 14.1. I'm able to succesfully download a file when using BADownloadManger from within the app, but not if the extension tries to download the same file. I've discovered its not possible to use a url with http for the asset download as the OS performs a check and throws an exception saying only https is accepted. However when you use a https url there's an authentication challenge. I implemented the auth challenge method of BADownloadManagerProtocol within the app (it completes with AuthChallengeDisposition.performDefaultHandling) and the file is sucessfully able to be downloaded when the download is initiated from within the app. However, the same file cannot be downloaded when its downloaded from the extension. I implemented the BADownloaderExtension: didReceive challenge method within the extension (which returns the same thing, AuthChallengeDisposition.performDefaultHandling) however when the extension is attempted to be invokved (using the backgroundassets-debug command line tool) then the handset logs this: Failed to send -[BADownloaderExtensionProxy sendAuthenticationChallenge:download:completionHandler:]_block_invoke and the download fails. Why does the download succeed from the app but not from the extension? Why is the OS saying it can't send the auth challenge when I'm implemented the relevant method of BADownloaderExtension?
1
0
503
Oct ’22