I've added a background asset extension and am trying to invoke it using this:
xcrun backgroundassets-debug --app-bundle-id com.myCompany.myApp --device-id 00008120-000225060C9B401E --simulate --app-update
When I run that command I see this in the phone's log:
Unable to observe extension for (com.cequint.myapp), the BAApplicationInfo is missing an extensionIdentity.
So how should an extension identify be added?
The extension's info.plist is as created by the Xcode template:
<key>EXAppExtensionAttributes</key>
<dict>
<key>EXExtensionPointIdentifier</key>
<string>com.apple.background-asset-downloader-extension</string>
</dict>
And I've added the following to the app's info.plist:
> <dict>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>kBackgroundTaskIdIdentifier_RNScheduleAppRunEvent</string>
</array>
<key>BAMaxInstallSize</key>
<integer>3221225472</integer>
<key>BAInitialDownloadRestrictions</key>
<dict>
<key>BADownloadDomainAllowList</key>
<array>
<string>*.drive.google.com</string>
</array>
<key>BADownloadAllowance</key>
<integer>2147483648</integer>
</dict>
<key>BAManifestURL</key>
<string>https://drive.google.com/file/d/1doJtzxBKCoVHEF80sndK6VskCrkD9H9r/view?usp=sharing</string>
What else needs doing to provide the extension identifier the OS is saying is missing?
(Using Xcode 14.1 and iOS 16.2)
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Apple this is dead easy and quick to reproduce.
Just create an app and then add a target of type background download.
Xcode automatically assigns a group id to the target and generates a corresponding entitlements file like so:
However the extension will not build, there is this error:
You can bugger about in the developer portal as long as you want, ensuring the group identifier exists, ensuring provisioning profiles have this group capability, etc. etc. nothing will make this error go away.
Now, what is unique about the download extension's entitlements file is the com.apple.developer.team-identifier key. This does not get generated for other extension - go ahead and see for yourself, create an action extension and give it a group, the result is its group appears in the entitlements file but not this com.apple.developer.team-identifier.
If you try to print out $(TeamIdentifierPrefix) (via echoing it in a build script), you get this
/Users/me/Library/Developer/Xcode/DerivedData/experiments-clpwbtcvdpqwuodxzwmsxwpztguo/Build/Intermediates.noindex/experiments.build/Debug-iphoneos/backgroundDownloadExtension.build/Script-243C9904292461BC001FDE14.sh: line 4: TeamIdentifierPrefix: command not found
Hmm, command not found, but if you change the echo to ${TeamIdentifierPrefix} guess what gets printed, yes the team identifier i.e. in my case MV8J9D3236.
Now if in the entitlements file I add the team identifier explicitly, like so
Then magically the error about automatic signing and the provisioning profile goes away. Change it back to $(TeamIdentifierPrefix) and the error appears, change it to be explicit and it goes away.
So by tweaking the entitlements file its possible to get the extension to build, however all is not well, now that it builds, if the extension is installed and run, the OS says:
"Event (1) dropped for client (com.company.experiments) failed because the app and extension do not share any application groups."
It says that despite the fact the app and extension both do have the same group capability.
This is driving me nuts - the auto generated entitlements file is stopping the extension from compiling, but if you fix the build, it can't run.
(Xcode 14.1, iOS 16.2)
This video is referenced in several places, for example here references it
https://developer.apple.com/documentation/callkit/making_and_receiving_voip_calls_with_callkit
and Eskimo has referenced it in his posts. But its gone, there are other WWDC16 session videos but not this one (https://developer.apple.com/videos/wwdc2016)
Is it available anywhere else?
Also how can this code be run/tested for an incoming call (without using the build in simulator i.e. using a real incoming Voip call)? What tool/app etc. could be used to generate a call to the handset to see the code in action when answering a VoIP call?
A few days ago I uploaded a build to Testflight successfully.
Just now I made absolutely no changes whatsoever other than to increment the build number. This latest build doesn't appear in Testflight.
Tell me this can't be anything other than a bug with Testflight, if a build from a few days was good enough to appear, then how come with no changes it no longer is.
You can programatically get/set a picture and a thumbnail for a contact, however the new poster field added to iOS 17 apparently has no programatic access? I'm not able to see anything new being added to CNContact.h
The previous betas have all been ok, but beta 6 is for me totally and utterly unusable because it keeps hanging forever during the installation and attaching phases when trying to run an app (attached physically via cable, not bluetooth).
The first time or two of making a code change, then running, its ok, but then its guaranteed to hang eventually, it gets stuck on the "Installing app to iPhone" phase. If I restart the phone and try again it might get past that, but then it just gets stuck on "Waiting to attach to app on iPhone" phase.
I know its beta software and not expected to be perfect, but its unusable and previous beta versions are no longer available to rollback to.
Has anybody encountered this before and knows of any tricks to get it to stop hanging and load/run the app? (Restarting Xcode, restarting the phone, re-building, does not fix it for me)
I've been constantly having this problem for the past few months, using the various Xcode 15 betas and the iOS 17 betas, but the problem is still present with Xcode 15 release and iOS 17.0 release (and indeed with 17.1 beta).
The issue is Xcode constantly says "Connecting to the phone" when attempting to run an iOS app from Xcode. Once it says this it never stop. Terminating and restarting Xcode doesn't fix it, disconnecting the phone and re-connecting doesn't fix it.
If I restart the phone then Xcode will switch to saying "Preparing the phone" and it'll never stop saying that (even though the phone might have been attached for hours and has previously been prepared).
I think the problem is actually iOS 17 or iOS 17 in combination with Xcode 15 because I don't have an issue with Xcode 15 and iOS versions less than 17. Nor in 13 years have I ever encountered a similar problem before.
So for the past few months I've been avoiding using iOS 17 because of this issue it's literally impossible to develop. But it's becoming harder to avoid using iOS 17.
So restarting the phone doesn't fix it, disconnecting the phone from the Mac doesn't fix it, restarting Xcode doesn't fix it. Are there suggestions for something else to try?
Apple are there any logs I can get to provide you that will help diagnose this issue?
I'm looking at some inefficient code that somebody wrote that repeatedly searches contacts within a loop, and that loop can execute hundreds or thousands of times.
If I run the app via Xcode then its taking 20-30 seconds to execute, but if the app is downloaded from Testflight and run, the same code runs in less than a second.
I'm presuming this difference is due to the scheme being debug for Xcode run but release for the archive scheme?
Can the debug scheme really have such an enormous impact?
If I try to run Instrument's logger for an app downloaded from TestFlight it says
"Permission to debug app name was denied".
"Recover Suggestion: The app must be debuggable and signed with 'get-task-allow'.
How do you make the app debuggable? (I tried creating an archive with the scheme set to Debug, but after uploading that to TestFlight, it doesn't appear. So presumably its not possible to upload an app built with debug scheme builds to TF?).
Therefore how can I make a TF build debuggable?, and how to sign it with get-task-allow?
Does it have to be a developer distribution .ipa rather than a TestFlight build to enable Instruments/Logger to run it?
Trying to run a React Native app via Xcode can be very very very slow. Excruciatingly so.
I often see messages saying things like Launching app is taking longer than expected. LLDB is likely reading from device memory to resolve symbols.
But I see this all the time, if that's what it's doing it never finishes, and does it every time. This isn't just with one phone, its with several.
Is it possible there some fundamental conflict between Xcode and LLDB and React Native Metro trying to communicate / load / debug / whatever that slows things down to a standstill?
If an app has a Live Caller ID Lookup extension and the lookup server indicates that a caller is identified and not blocked, then if the user wished to locally block that number they can do so either via the iPhone call block button, or via the app's Call Extension block list.
However there's apparently no way for the user to do the inverse.
i.e. if Live Caller Id Lookup indicated that a number should be blocked, then how could a user indicate they don't want that number blocked for them?
If they added it to the Call Extension as an identified number, but live lookup is saying the number should be blocked, then what does the OS do? Give priority to the blocking instruction from the live lookup server, or give priority to the fact its in the Call Extension's Identified list?
I've been following the instructions on how to set up Live Caller ID Lookup using the example PIRService.
And I have been successful - I'm managed to get name information and images retrieved and displayed on the call screen, in addition to being able to block numbers via PIRService too.
So while I did get it working, it was, and still is, incredibly painful to do so due to the fact it only works about 1% of the time.
There's two main problems, which look like they're different manifestations of the same issue. The first problem is difficulty enabling the Live CallerID lookup feature via the flip switch in the iPhone's settings, and then the second issue is when this has been enabled, then a phone number's details is being attempted to be retrieved.
There's a lot, a very lot, of timeout issues being reported by CallKit logging i.e.:
configure failed Error Domain=com.apple.CipherML Code=1100 "Unable to query status due to errors: The request timed out." UserInfo={NSLocalizedDescription=Unable to query status due to errors: The request timed out., NSUnderlyingError=0xd98344450 {Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSLocalizedDescription=The request timed out., NSErrorFailingURLKey=http://192.168.1.100:8080/issue}}}
When this occurs I can see that the request is getting through to the PIRService as it outputs logging to the Mac console:
2024-07-28T09:33:15-0700 info Hummingbird : [HummingbirdCore] Server started and listening on 0.0.0.0:8080
2024-07-28T09:33:37-0700 info Hummingbird : hb_id=5e0330c893af6a98c20e5100fdb26871 hb_method=GET hb_uri=/.well-known/private-token-issuer-directory [Hummingbird] Request
2024-07-28T09:33:37-0700 info Hummingbird : hb_id=5e0330c893af6a98c20e5100fdb26872 hb_method=GET hb_uri=/token-key-for-user-token [Hummingbird] Request
So it would appear that requests are getting through to PIRService but then something is timing out after that. Could that be the PrivacyPass/Homomorphic Encryption stuff? Or something else?
What could be a cause of this instability, and is there anything that can be done to increase reliability of it?
(Xcode 16 beta 4, iOS 18 developer beta 4, Sonoma 14.5, the iPhone(s) being tested are connected to the Mac via usb cable, running on the same Wifi network).
If an app with a Message Filter Extension is run on an iPhone with iOS 18 installed then there's no logging output to the console (using print or NSLog), however there is logging in all previous versions of OS.
Being able to view logging at run time for this component is essential as a debugging aid to see, for example, if the extension launches, if a text is handled locally or deferred to the network, to see if there's a network error, to examine the server response etc.
Is there a specific reason it was disabled or is it accidental?
Thank you
I've got a 2023 M2 MacBook Pro and used to get great battery life out of it (> 6 hours when using it for development purposes).
Now however, all of a sudden, that has dropped off a cliff, and the only thing that has changed is Xcode 16 has appeared.
As I'm compiling a project I can literally see the % amount of the battery charge remaining tick down in front of my eyes as I watch.
I just compiled a project twice and during that time the battery dropped from from %89 to %79 and Xcode is listed as a culprit using significant battery drain.
Anybody else noticed anything similar?
Anything that can be done to to decrease Xcode's battery drain?
The documentation for a text filter extension states that receiverISOCountryCode is a field the extension receives
https://developer.apple.com/documentation/sms_and_call_reporting/ilmessagefilterqueryrequest/3979257-receiverisocountrycode
"The ISO Country Code of the receiving phone number"
However, if the extension defers to its text server, then the payload sent to the server doesn't contain the iso country code:
POST /server-endpoint HTTP/1.1
Accept: */*
Content-Type: application/json; charset=utf-8
Content-Length: 148
{
"_version": 1,
"query": {
"sender": "14085550001",
"message": {
"text": "This is a message"
}
},
"app": {
"version": "1.1"
}
}
from: https://developer.apple.com/documentation/sms_and_call_reporting/ilmessagefilterextensioncontext/2880240-deferqueryrequesttonetwork
Why does the payload sent to the text server not contain the country code?