Hi,
I'd like to develop an app which runs speech recognition even after going into background. I know I can accomplish this using audio background mode and the process the audio but I am not sure if this workaround would get accepted into App Store because of the processing limitations while in the background.
How can I accomplish this while still being compliant with Apples privacy policy and other restrictions?
Thanks,
Marek
General
RSS for tagDelve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello.
I'm preparing transfer app now but don't understand identifier length.
reporence : https://developer.apple.com/documentation/sign_in_with_apple/transferring_your_apps_and_users_to_another_team
1 : xxxxxx.15fbexc6b31e41e78b891803a56b1axx.0247
2: xxxxxx.26ae9x5347f1f4fcebb3ae1b91807b5xx
number 1 is The team-scoped user identifier
number 2 is transfer identifier
but length is different so i scared
is it okay?
Topic:
App & System Services
SubTopic:
General
There's a 128mb limit for donating items to core spotlight. As far as I understand, there's a warning that shows in the Xcode console when either approaching or hitting that limit. It would be great if there was an API to check the current status of available storage for QA purposes to see if we're either donating too much or can donate more. Thanks!
I am developing a macOS word-processing app that should be distributed via the Apple App Store. Some of the app's functions like generating HTML and PDF exports should be automatable via Shortcuts and via shell scripts.
To support the latter, I plan to include a command line tool inside the app that can be called from the Terminal or a shell script. The tool should be able to instruct the main app to then perform the desired commands.
A well-known AppStore app that uses this design is BBEdit which also contains multiple command line tools that offer functionality from the main app to users of the Terminal.
My technical questions now are:
Should the command line tool executable be sandboxed and if yes, how?
Even after many trials, I have not found a way to make a working sandboxed command line tool. If a sandboxed tool is started from the Terminal, it is immediately terminated with an exception in _libsecinit_appsandbox.cold.12. I am aware of the Apple developer documentation article Embedding A Helper Tool In A Sandboxed App, but it addresses a different architecture in which the helper tool is started from the main app and therefore is able to inherit its sandbox.
BBEdit is only sandboxing the main app, but not its embedded command line tools and is still allowed in the App Store. Is this the way to go for me as well or does BBEdit get some special treatment in the App Store?
How can the command line tool pass the permission to access files to the main app?
As my main app is sandboxed, it needs explicit permission from the user to be able to access files. Users of a command line tool give this permission by providing file paths as arguments. How can I pass these permissions along to the main app? BBEdit is able to do this even when the user has not given it full-disk access. I know that it is using Apple Events for the communication between the command line tool and the main app, but I am not sure how this allows to pass permissions. Can anyone shed light on how to implement a solution here?
Thanks!
I am creating an iOS app that needs to parse the text from a PDF document. I can read the entire PDF document's text using the string property, but if it's a large PDF document, this could cause delays for users.
From the documentation, I came across the beginFindString function, which seems to asynchronously, with no return?
https://developer.apple.com/documentation/pdfkit/pdfdocument/beginfindstring(_:withoptions:))
Unfortunately I cannot find examples on how to use this function or its intended purpose/functionality, so any guidance would be appreciated.
My goal is to read the PDF document one line at a time, searching for newlines ('\n'), then parsing that line as needed. I'm hoping the beginFindString function will be useful.
I have an app written in swift.
It has multiple pods dependencies installed.
When the app is generated with Xcode 15.4 the size of app is ~148Mb
and when the same app is generated with Xcode 16.2 the size is ~246MB
When I extracted and analysed the app, it was observed that one of the framework installed via pods Dependencies("DocumentReaderCore") was consuming more size(42.9 MB vs 215 MB) the DocumentReaderCore present in the Payload/.app/Frameworks/DocumentReaderCore.framework/DocumentReaderCore was of type linux executable when generated using Xcode 15.4 vs the other was od document type and size was 215MB.
I have an App Intent that returns a MyEntity value with the following properties:
struct MyEntity: AppEntity {
@Property(title: "Title")
var title: String?
@Property(title: "Image")
var image: IntentFile?
}
I created a Shortcut that takes the output value of this intent and passes it as the input to the Send Message action. When I tap the MyEntity parameter in the message action, it shows to be of Type MyEntity. Below that, I can select 1 of 3 options: MyEntity, Title, or Image.
When I run the shortcut, a new message compose window appears with the following behavior depending on the selected option:
MyEntity - the message draft is empty
Title - the message draft shows the title string
Image - the message draft shows the image
My expected and desired result when MyEntity is selected would be a message draft populated with the image and the title string as text. How would I achieve this? Is it possible?
I've experimented with conforming MyEntity to Transferable. That's enabled use cases such as passing the MyEntity input as Type Image for example.
Do I need to create a custom UTType to represent MyEntity, or is that unrelated to my issue? I haven't explored this yet but seems potentially related!
Topic:
App & System Services
SubTopic:
General
Tags:
Shortcuts
Uniform Type Identifiers
App Intents
Core Transferable
Currently, I am working on an iOS app with a Deployment Target set to iOS 15.0, and macOS 12.0. The app is allowed to run on Macs with Apple Silicon.
A customer with a Mac running macOS Monterey (12) is complaining that in the TestFlight app, they cannot install the app since it shows "Requires OS Update", even though the deployment target is smaller than the installed version of macOS 12.
Are there any specifications available on which macOS version is required in order to use iOS apps on Silicon Macs?
This is more a general question of whether it is possible to share persistent/coredata from the main app to Screentime-related extensions such as DeviceActivityReportExtension.
I've set my code up (e.g., App Groups, files to different targets, using nspersistentcontainer with app group url, etc.) in a way that it builds, and the extension seems to recognize my CoreData schema (able to query using fetchrequest). But the data returned is always null. So i'm wondering if it is even possible to READ app data from the extension.
I understand it is not possible to write or pass data from the extension back to the app. I've also been able to read data that was saved in main app from UserDefaults in my extension.
I'm writing an app that uses text to speech. On the physical Iphone 12 it works but on the simulator I don't get any speech from my app.
I tried the following to enable.
Settings -> Accessebility -> "Spoken Content" -> "Speak Selecton" to ON (green)
in Voices I added the German Anna that I use on my Iphone with the downloaded enhancements.
The speech test works in this menu but not in my app. What am I missing ?
Cheers,
Gerhard
I work on a macOS application that functions as a daemon. To test it, I:
Compile executables.
Use pkgbuild and productbuild to build an application bundle.
Use codesign and notarytool to sign and notarize the app.
Install the app with /usr/sbin/installer -target LocalSystem -pkg .... This often overwrites the previous version of the app.
Sometimes, the installation fails at the postinstall stage, when it can not find the application's install directory. We explicitly check for this error in our script:
if ! [ -d "$APP_INSTALL_DIR"/Contents ]; then
echo "directory ${APP_INSTALL_DIR}/Contents is missing"
exit 1
fi
This is unexpected!
Even worse, some of our customers have occasionally seen the same issue!
We use a postinstall script in order to install files into the /Library/LaunchDaemons and /Library/ LaunchAgents directories, and start the agent with launchctl bootstrap.
Our preinstall script makes sure that the previous version of our application is fully uninstalled (so there is no confusion), and we wonder if that is part of the problem.
While researching this error, I ran across a discussion of a similar issue on Stackoverflow: <https:// stackoverflow.com/questions/19283889>. One of the commenters there wrote:
It appears that the OS X installer uses information about already installed packages and application bundles in order to decide where and if to install new packages. As a result, sometimes my installer did not install any files whatsoever, and sometimes it just overwrote the .app bundle in my build tree. Not necessarily the one used to build the installer, but any .app bundle that OS X had found. In order to get the installer to install the files properly I had to do two things:
Tell OS X to forget about the installed package. sudo pkgutil --forget <package id> Not sure if this is needed for you nor in my case, but it is probably a good idea anyway.
Delete all existing .app bundles for the app. If I didn't do this, the existing app bundle was overwritten on install instead of the app being placed in /Applications. Maybe there is a way to prevent this while building the installer package, but I haven't found it.
On the other hand, the man page for pkgutil says not to use --forget from an installer:
Discard all receipt data about package-id, but do not touch the installed files. DO NOT use this command from an installer package script to fix broken package design.
What is the correct approach to fix this problem?
Topic:
App & System Services
SubTopic:
General
Hello,
I have written a new app shortcut using the iOS AssistantIntent macro for the system.search scheme. It all works as it should. I can find it in the short cuts apps and if I search for my app in the Search feature of Springboard my app icon shows under top hits along with its associated search shortcut. When the shortcut is invoked it prompts for the text to search for and then it launches once the text is entered. This is fine but I would also like to have automatically created some additional shortcuts items where some of the common items I expect people to search for are already available so that when tapped they aren't prompted for search text and the intent is automatically launched with the query text. I'd like these to show up under top-hits for my app and in the shortcuts app as well.
I noticed that if I manually create the shortcuts in the shortcuts app then they show up under top-hits. However as I said I would like for my app to provide these automatically but I am unsure how to go about this and which APIs I should using.
Thx
Topic:
App & System Services
SubTopic:
General
Hello,
I’m experiencing an issue with Siri on iOS where it prioritizes a contact from the wrong account, even though I’ve set a default account for Contacts.
Details of the issue:
I have two contact groups:
Exchange (Outlook) — my default account.
iCloud.
There’s a contact, "Alena Jorse," which exists in both groups:
In the Exchange group, the name is saved as Alena Jorse.
In the iCloud group, it is saved as Alena Jorse with double-strike formatting (e.g., "Alena Jorse**").
Both contacts have the same phone number.
When I ask Siri to call "Alena Jorse," it selects the iCloud contact ("Alena Jorse**") instead of the Exchange contact, despite Exchange being set as the default Contacts account in my iOS settings.
Expected Behavior:
Siri should prioritize the contact from the default account (Exchange) and ignore other accounts unless specified.
Steps to Reproduce:
Have duplicate contacts in two groups (Exchange and iCloud) with the same phone number.
Set Exchange as the default Contacts account.
Ask Siri to call the contact.
Troubleshooting Steps Taken:
Ensured the default account is set to Exchange.
Verified both contacts have the same phone number.
Tested by disabling iCloud temporarily, which resolves the issue (but is not a viable long-term solution).
Request:
Could you please advise if this is intended behavior or a bug? If it’s a configuration issue, how can I ensure Siri prioritizes the default account for contacts? If it’s a bug, could this be investigated further?
Thank you for your assistance.
I want to monitor again from the bellow function of DeviceActivityMonitorExtension. I have the function of startMonitoring like this.
override func eventDidReachThreshold(_ event: DeviceActivityEvent.Name, activity: DeviceActivityName) {
super.eventDidReachThreshold(event, activity: activity)
startMonitoring()
}
public func startMonitoring() {
let startTime = DateComponents(hour: 0, minute: 0, second: 0)
let endTime = DateComponents(hour: 23, minute: 59, second: 59)//DateComponents(hour: 11, minute: 0, second: 0)//
let schedule = DeviceActivitySchedule(
intervalStart: startTime,//DateComponents(hour: 0, minute: 0, second: 0),
intervalEnd: endTime,
repeats: true
//warningTime: DateComponents(minute:1)
)
let selection: FamilyActivitySelection = savedSelection() ?? FamilyActivitySelection()
let center = DeviceActivityCenter()
let selections = self.savedSelection() ?? FamilyActivitySelection()
let applications = selections.applicationTokens
let categories = selections.categoryTokens
let webCategories = selections.webDomainTokens
let store = ManagedSettingsStore()
store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set())
store.shield.applications = applications
store.shield.webDomains = webCategories
let scheduleHard = DeviceActivitySchedule(
intervalStart: startTime,//DateComponents(hour: 0, minute: 0, second: 0),
intervalEnd: endTime,
repeats: true
//warningTime: DateComponents(minute:1)
)
let event = DeviceActivityEvent(
applications: selection.applicationTokens,
categories: selection.categoryTokens,
webDomains: selection.webDomainTokens,
threshold: DateComponents(minute: 0)//timeLimitToUseApp i.e for 15 mins
)
do {
try center.startMonitoring( .weekend,
during: scheduleHard,
events: [
.weekend: event,
]
)
print("ScreenTime Monitoring Started")
} catch let error {
print(error.localizedDescription)
}
}
Please provide us with a solution about starting monitoring from DeviceActivityMonitoringExtension's eventDidReachThreshold function or if there is any other way.
How can I show my VoIP calling app in the same list as Facetime and Whatsapp as shown in the image?
My app implements VoIP calls and is integrated with CallKit.
Any tip would be appreciated!
I'm trying to implement live caller id PIR server in python and I have an issue related to evaluation key config. I don't receive the POST /key request even if I try to install the extension on new device and I had this error in device system logs:
error 11:21:30.663022+0200 ciphermld requestData(byKeywords:shardIds:clientConfig:) threw an error: CipherML.CipherMLError.missingSecre t Ke y
I think the reason why the evaluation key is not generated is related to this error but I'm not sure. It might be also related to HE params - I tried with the same params as in swift server example with plaintext_modulus=17 and it works, but for plaintext_modulus=65537 on the same device the system doesn't send me the evaluation key. Is there a limitation that restricts the evaluation key generation for some HE params?
There is how the entire config object that I retrieve looks like:
{
"configs": {
"Live-C aller-ID-Lookup. TestLiveCallerI D.iden tity": {
"pir_config": {
"encry ption_p aram eters": {
"pol ynomial_deg ree": "4096",
"plaint ext_mo dulus": "65537",
"coeff icient_m oduli": [
"134176769",
"268369921",
"268361729"
],
"secu rity_le vel": "SECU RITY LEVEL QUANT UM128",
"h e_sc heme": "H E_SC HEM E_B F V"
},
"shard_configs": [
{
"num_entries": "2",
"entry_size": "55991",
"dimensions": [
"2",
"1"
],
"shard_id": ""
}
],
"keyword_pir_params": {
"num_hash_functions": "2",
"sharding_function": {
"sha256": {}
}
},
"algorithm": "PIR _ALGO RITHM _MUL_PIR",
"batch_size": "2",
"evalu ation_ke config_hash": ""
},
"config_id": ""
}
},
"key_info": [
{
"timestamp": "1738660849",
"key_config": {
"encryp tion_par ameters": {
"polynomial_degree": "4096",
"plaintex t_mo dulus": "65537",
"coeffic ient_m oduli": [
"134176769",
"268369921",
"268361729"
],
"secu rity_level": "SECUR ITY_LEVEL_QU ANTUM128",
"he_sc heme": "HE_SC HEME_BFV"
},
"gal ois_e lements": [
20 49,
40 97
],
"has _rel in_key": true
}
}
]
}
PS evaluation key data is just a placeholder, but anyway it should be skipped cause of expired timestamp
More logs:
```language
default 11:21:30.535865+0200 ciphermld Running rotation task for ["Live-Caller-ID-Lookup.TestLiveCallerID.identity"]
info 11:21:30.535953+0200 ciphermld Skipping groups that manage their own networking: <private>
default 11:21:30.537007+0200 ciphermld Request to fetchConfigs has started for useCases '["Li ve-Caller-ID-Lookup.TestLiveCallerID.identity"]', userId: '<private>', existingConfigIds: '["id"]'
default 11:21:30.542174+0200 ciphermld Request to queries-batch has started for userId: '<private>', length: 28350
default 11:21:30.655914+0200 ciphermld Request to fetchConfigs has finished, response length: 230
default 11:21:30.656182+0200 ciphermld Received configurations: 1 usecase(s), 1 key(s) for group 'Live-Caller-ID-Lookup.TestLiveCallerID.identity'
debug 11:21:30.660868+0200 ciphermld Skipping non-active key: timestamp: 1738660849
key_config {
encryption_parameters {
polynomial_degree: 4096
plaintext_modulus: 65537
coefficient_moduli: [134176769, 268369921, 268361729]
security_level: Quantum128
he_scheme: BFV
}
galois_elements: [2049, 4097]
has_relin_key: true
}
error 11:21:30.662982+0200 ciphermld No key for use-case 'Live-Caller-ID-Lookup.TestLiveCallerID.identity'
error 11:21:30.663022+0200 ciphermld requestData(byKeywords:shardIds:clientConfig:) threw an error: CipherML.CipherMLError.missingSecre t Ke y
default 11:21:30.663824+0200 com.apple.CallKit.CallDirectory <private> XPC request complete, results(0) error:Error Domain=CipherML.CipherMLError Code=32 "missing secre t ke y" UserInfo={NSLocalizedDescription=missing secre t ke y}
default 11:21:30.972372+0200 ciphermld Request to queries-batch has finished response, length: 0
default 11:21:30.974711+0200 com.apple.CallKit.CallDirectory <private> XPC request complete, results(1) error:(null)
default 11:21:36.161964+0200 com.apple.CallKit.CallDirectory <private> Sending XPC request
default 11:21:36.163149+0200 com.apple.CallKit.CallDirectory <private> Sending XPC request
default 11:21:36.169931+0200 ciphermld requestData(byKeywords:shardIds:clientConfig:) method was called
default 11:21:36.170448+0200 ciphermld requestData(byKeywords:shardIds:clientConfig:) method was called
default 11:21:36.174001+0200 ciphermld Cached: 0 / Missing: 1
error 11:21:36.174997+0200 ciphermld No userId or secre t Ke y for use-case '.Lve-Caller-ID-Lookup.TestLiveCallerID.identity'. Running rotation task'
default 11:21:36.175075+0200 ciphermld Running rotation task for ["Live-Caller-ID-Lookup.TestLiveCallerID.identity"]
info 11:21:36.175240+0200 ciphermld Skipping groups that manage their own networking: <private>
default 11:21:36.177700+0200 ciphermld Request to fetchConfigs has started for useCases '["Live-Caller-ID-Lookup.TestLiveCallerID.identity"]', userId: '<private>', existingConfigIds: '["id"]'
default 11:21:36.179914+0200 ciphermld Request to queries-batch has started for userId: '<private>', length: 28350
default 11:21:36.336051+0200 ciphermld Request to fetchConfigs has finished, response length: 230
default 11:21:36.336308+0200 ciphermld Received configurations: 1 usecase(s), 1 key(s) for group 'Live-Caller-ID-Lookup.TestLiveCallerID.identity'
debug 11:21:36.341522+0200 ciphermld Skipping non-active key: timestamp: 1738660849
key_config {
encryption_parameters {
polynomial_degree: 4096
plaintext_modulus: 65537
coefficient_moduli: [134176769, 268369921, 268361729]
security_level: Quantum128
he_scheme: BFV
}
galois_elements: [2049, 4097]
has_relin_key: true
}
error 11:21:36.356497+0200 ciphermld No key for use-case 'Live-Caller-ID-Lookup.TestLiveCallerID.identity'
error 11:21:36.356669+0200 ciphermld requestData(byKeywords:shardIds:clientConfig:) threw an error: CipherML.CipherMLError.missingSecre t Ke y
default 11:21:36.357075+0200 com.apple.CallKit.CallDirectory <private> XPC request complete, results(0) error:Error Domain=CipherML.CipherMLError Code=32 "missing secre t ke y" UserInfo={NSLocalizedDescription=missing secre t ke y}
default 11:21:36.625701+0200 ciphermld Request to queries-batch has finished response, length: 0
default 11:21:36.626749+0200 com.apple.CallKit.CallDirectory
In the documentation for a Message Filter Extension it states:
If you have servers that can help your app extension determine how to handle a message, you must add the Associated Domains capability to your Xcode project and specify those domains.
(https://developer.apple.com/documentation/sms_and_call_reporting/sms_and_mms_message_filtering/creating_a_message_filter_app_extension)
The words servers and domains are in the plural.
If it's possible to specify multiple servers/domains for a Message Filter Extension then how is that done? There's no documentation nor reference for that.
If multiple domains can be added to the info.plist then what is the iOS behavior in that case?
Can the extension supply/change which domain is used at run time?
I am a macOS software developer using Xcode and Objective-C. I have a wallpaper app on the App Store, and recently, a few users have asked if the app can be excluded from the ‘Screen Time’ statistics. Is there a way to allow users to choose whether or not the app should appear in the ‘Screen Time’ tracking? I have already set LSUIElement to YES in the info.plist, but the app is still being tracked in ‘Screen Time.
I've found an app that has a call blocking feature an is able to add more than 10_000_000 entries. As I understand it doesn't use more than one extension for it because I see only one in the Call Blocking & Identifying settings menu. How to implement that? My limit now is around 1_800_000 entries.
I am currently building a screen time app and I am trying to figure out how to persist the family activity picker so that when my app closes and re-opens, the app selections in it are saved. I've successfully implemented core data and figured out how to store names of the selected apps in a list like this -
Core Data addApp Function -
func addApp(name: String, context: NSManagedObjectContext){
let newApp = AppToken(context: context)
newApp.bundleIdentifier = name
saveData(context: context)
}
Adding app selections to Core Data (after the family activity picker has updated the selection) -
.onChange(of: model.selectionToDiscourage)
{
for i in model.selectionToDiscourage.applications {
print(i)
dataController.addApp(name:i.localizedDisplayName ?? "Temp", context: moc)
}
Printing saved selections in a list (bundleIdentifier is my attribute for my appToken entity, but I am just pulling the names here. For whatever reason all of them end up being Temp" as shown above anyway. In other words name:i.localizedDisplayName is not working and Temp is shown in the list for every app chosen) -
if dataController.savedSelection.isEmpty {
Text("No Apps Selected")
.foregroundColor(.gray)
} else {
List(dataController.savedSelection, id: \.self) { app in
Text(app.bundleIdentifier ?? "Unknown App")
}
.scrollContentBackground(.hidden)
}
So, when my app closes and reopens, the list of app names persists. Now, my issue is figuring out how to write back to selectionToDiscourage and loading the family activity picker with those saved apps. I have no idea if I should be doing this a different way and if using Core Data is overkill, but I cannot figure out how it's syntactically possible to write back to this family activity picker when the app reopens -
.familyActivityPicker(isPresented: $isPresented, selection:$model.selectionToDiscourage)
Thank you to whoever takes a look at this!!