Search results for

214 results found

Post

Replies

Boosts

Views

Activity

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
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, despit
2
0
1.5k
Mar ’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 hou
1
0
1.2k
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: EXAppExtensionAttributes EXExtensionPointIdentifier com.apple.background-asset-downloader-extension EXPrincipalClass $(PRODUCT_MODULE_NAME).BackgroundDownloadHandler And the error uploading to Testflight P.S. There's no apparent relevant tag for this extension
1
0
941
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
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
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
640
Sep ’22
Warnings "The app references non-public selectors" using Xcode 14 to upload to App Store Connect
Using the newly released Xcode 14 to upload an app to App Store Connect results in several warnings saying The app references non-public selectors in ..... This does not occur when uploading if the archive is built using Xcode 13 Is this a re-emergence of an Apple bug: https://developer.apple.com/forums/thread/127678?answerId=715975022#715975022 Which has the response: The issue has been resolved on the app validation backend. Please try resubmitting. Sorry for the trouble. Apple Developer Tools Engineer
7
0
3.6k
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
947
Sep ’22
Background Assets: how to add BAManifestURL | backgroundassets-debug tool doesn't do anything
I've added a background downloads extension to my app and added device console logging to every method in the placeholder code created by XCode, then installed the app to the phone. When I run the following command: xcrun backgroundassets-debug --app-bundle-id com.myCompany.myApp --device-id 00008110-001E0DDA0AB8801E --simulate --app-update and watch the console log - there's none of my logging from within the extension. In the OS log I can see this: error 11:24:41.550702-0700 backgroundassets.user Event (1) dropped for client () failed because client Info dictionary is missing its 'BAManifestURL' key. The template generated code says this: The manifest that is downloaded is determined by BAManifestURL defined in the application's Info.plist So I tried adding a key of BAManifestURL with a url hoping to initially just get the extension launching. But I still get the error saying the info dictionary is missing the BAManifestURL key. So exactly how should the BAManifestURL key value pair be added to the info.pli
2
0
1.2k
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 (u
1
0
497
Sep ’22
iOS 16.1 is setting Personal Focus Smart Activation to be on by default - is there a way an app can detect if a focus mode currently active or not
As a user, I've been hit several times missing calls and notifications when I was expecting them. I've just figured out why that is - its because iOS 16.1 is automatically setting Smart Activation to on for Personal Focus. So I kept missing phone calls because the iPhone had been turning on Personal Focus when I was unaware it was. As well as blocking calls, it also doesn't display any notification. (I never use this focus feature, I didn't even know it existed until now, so for it to be enabled by default is absolutely ridiculous behavior. This is iOS 16.1 beta yet but its so close to the release date of 16.1 it must be the final behavior). Now with my developer hat on, I would like my application to detect if notifications are being suppressed due to a focus's do not disturb. Is there an API available for an app to determine if a notification has not been displayed to the user due to this for non communication type apps? Just a regular app that receives user-directed push messages and needs to know if they
0
0
1.4k
Oct ’22
What is an applicationName token?
I'm looking at this tutorial on app intents and shortcuts: https://arctouch.com/blog/implementing-app-shortcuts-intents And it says Each phrase also has to contain your app name. To make it easier, you can provide the system with a list of synonyms for your app name and then use the applicationName token instead of your app name as a string literal But it doesn't provide an example of using an applicationName token. I've tried searching for this but can't find anything. What is the applicationName token and what might an example of it being used be in a shortcut?
1
0
1.7k
Oct ’22