Post

Replies

Boosts

Views

Activity

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
OS terminates app and stops sending Voip pushes even if reportNewIncomingCall() is called
It an app receives a Voip push, but has to terminate the call, then if this happens a few times the OS is terminating the app (Message from debugger: Terminated due to signal 9) and then it stops delivering future pushes to the app.i.e. with code let endCallAction = CXEndCallAction(call: callUUID) let transation = CXTransaction(action: endCallAction) self.callController.request(transation) { (error) in } provider.reportNewIncomingCall(with: callUUID, update: callUpdate) { error in Model.priorityLog("GRUNT reportNewIncomingCall completion error \(String(describing: error))") completion() }
2
0
1.1k
Jun ’23
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
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
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
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
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
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
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
How to view TSIs?
In this section of this web site https://developer.apple.com/account/#CodeLevelSupportCard its possible to view a historical list of submitted TSIs, but there's nothing in their content which is clickable. Looking around elsewhere, there doesn't appear to be anywhere or anyway to view the original question and the responses in submitted TSIs? Is that really the case, or is there a bug in the Apple web site and they are supposed to be viewable?
2
0
1.5k
Sep ’23