Delve 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.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

Transfer sub is different length
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?
0
0
124
Dec ’24
Embedding automation command line tool into an AppStore app
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!
0
0
379
Dec ’24
SIri trigger command conflicts
We're having trouble with getting Siri to hand off specific trigger words to our app via shortcuts. I want to be able to say "Hey Siri Myappname Foobar" but in some cases if Foobar is the name of a specific business it may launch maps instead showing locations of those businesses. Is there any way to inform Siri, "no, *****, launch our app as the shortcut specifies!"
0
1
243
Mar ’25
Device Activity monitor extension Not working
anyone has the same problem which is that your device activity extension ain't working even tho all the code work perfectly in the console, I setup it in the right way , tried to make schedule and it did the same exact thing when I tried to create usage threshold. anyone know the reason for this bug? here is my extension code import ManagedSettings import FamilyControls import Foundation import OSLog import UserNotifications class MonitoringExtension: DeviceActivityMonitor { private let defaults = UserDefaults(suiteName: "group.com.William.app") private let logger = Logger(subsystem: "com.William.app", category: "MonitoringExtension") override func eventDidReachThreshold(_ event: DeviceActivityEvent.Name, activity: DeviceActivityName) { let activityRaw = activity.rawValue logger.info("Limite atteinte: \(activityRaw)") scheduleNotification(title: "Limite dépassée", body: "Tu as utilisé trop de temps sur \(activityRaw).") guard let data = defaults?.data(forKey: "\(activityRaw)_selection"), let selection = try? JSONDecoder().decode(FamilyActivitySelection.self, from: data) else { logger.warning("Pas de sélection pour \(activityRaw)") return } let store = ManagedSettingsStore() // ← LE SEUL QUI MARCHE store.shield.applications = selection.applicationTokens if !selection.categoryTokens.isEmpty { store.shield.applicationCategories = .specific(selection.categoryTokens) } logger.info("BLOCAGE ACTIF via ManagedSettingsStore.default") } override func intervalDidEnd(for activity: DeviceActivityName) { super.intervalDidEnd(for: activity) let store = ManagedSettingsStore() store.clearAllSettings() // ← Débloque à minuit logger.info("Restrictions levées à la fin de l'intervalle") } private func scheduleNotification(title: String, body: String) { UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound]) { granted, _ in guard granted else { return } let content = UNMutableNotificationContent() content.title = title content.body = body let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: nil) UNUserNotificationCenter.current().add(request) } } }
0
0
170
3w
Set Default Value for Date Picker in App Intent
Hi everyone, I have a simple question regarding App Intents. I have an intent that defines a few parameters, one of which is a Date. When the user is prompted for input, I’d like the date picker to start at a specific value (e.g., tomorrow) instead of the default current date. Is there a way to set an initial/default value for the date parameter in an App Intent? Thanks in advance for any guidance!
0
1
290
Jan ’25
Possible to access CoreData/Persistent storage from DeviceActivityReportExtension?
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.
0
0
428
Dec ’24
PSA: Call Screening breaks in a multitude of ways; no missed call notifications or badges; not lighting up screen; not visible when using focus;
Call Screening has serious issues right now leading to missing calls from genuine callers because the system does not acknowledge them with missed call notifications or badges in a lot of cases. I'm posting this in the hope of catching an engineer who can bring this to the attention of the teams working on this. Filed as FB20678829 — I ran the following tests with iOS 26.1 beta 3, but the issues have been occurring on iOS 26.0 as well. I used an iPhone, Apple Watch, iPad, and Mac for this. The iPhone has Call Screening enabled with the option „Ask Reason for Calling“ The iPhone has call forwarding enabled to all devices. Test 1: Active Focus Turn on a focus like Do not Disturb on all devices. Lock all devices. Make a phone call to the iPhone with an unknown number. Behavior: iPhone: displays Call Screening UI on the Lock Screen, but it will not light up the screen. You don’t know Call Screening is happening unless you activate the display just in that moment on devices without Always On Display. Watch: does nothing. Mac: does nothing. iPad: displays Call Screening UI on the Lock Screen, but it will not light up the screen. You don’t know Call Screening is happening unless you activate the display just in that moment. In this test the caller does not answer any of the Call Screening questions and just hangs up. The result is that only the Mac displays a missed call notification. iPhone, iPad, and Watch do not acknowledge the missed call (no phone app icon badge, no notification, no badge inside the Phone app itself), you can only see the call inside the Calls list when manually looking for it. Test 2: No Focus Turn off any focus like Do not Disturb on all devices. Lock all devices. Make a phone call to the iPhone with an unknown number. Behavior: iPhone: displays Call Screening UI on the Lock Screen, but it will not light up the screen. You don’t know Call Screening is happening unless you activate the display just in that moment on devices without Always On Display. Watch: does nothing. Mac: displays Call Screening UI when unlocked. iPad: displays Call Screening UI on the Lock Screen, but it will not light up the screen. You don’t know Call Screening is happening unless you activate the display just in that moment. In this test the caller does not answer any of the Call Screening questions and just hangs up. The result is that only the Mac displays a missed call notification. iPhone, iPad, and Watch do not acknowledge the missed call (no phone app icon badge, no notification, no badge inside the Phone app itself), you can only see the call inside the Calls list when manually looking for it. The only improvement here is that the Mac now shows the Call Screening UI. Test 3: Caller answers Call Screening questions An active focus does not matter. Lock all devices. Make a phone call to the iPhone with an unknown number. Once the caller answered the Call Screening questions, the following happens: All devices ring like expected When the caller hangs up or I don’t answer: Mac: Shows Missed Call notification without details iPhone: Shows Missed Call notification with transcript of Call Screening (also badges phone app icon) iPad: does nothing. Watch: Shows the mirrored iPhone notification. Things to note: When turning off call forwarding on iPhone to other Apple devices like iPad and Mac, the phone app icon is always badged for missed calls when Call Screening was active, but no notification is displayed regardless.
0
0
65
Oct ’25
Testing Live Caller ID Lookup Feature before App Store Release
Hi, We are working to integrate the Live Caller ID Lookup feature into our app. After submitting the request form via the link: https://developer.apple.com/contact/request/live-caller-id-lookup/, we received this reply from Apple: Apple’s OHTTP relay has been configured to talk to your OHTTP gateway. Now Live Caller ID Lookup should work for your application extension when distributed through App Store. However, before officially releasing our app on the App Store, we’d like to make sure the Live Caller ID Lookup feature is working as expected. To test this, we uploaded the app to TestFlight, and it successfully passed App Review. However, the test failed — we observed that the system tries to fetch the config from http://www.example.com/config instead of our actual configuration URL. Questions: Is this expected behavior when using TestFlight? Does the Live Caller ID Lookup feature only become active after full public release on the App Store? Is there any recommended way to test this feature before public release? Thank you!
0
0
132
Oct ’25
App Clip works in TestFlight but not elsewhere
My app is available in TestFlight but has been rejected in App Review with the review feedback that the app clip "just shows a blank screen". However, in the TestFlight app, the App Clip works as expected and brings up the clip. It also works correctly from Xcode testing. Any ideas on what the problem could be? It is using the default App Clip link (appclip.apple.com)
0
0
318
Jan ’25
UE 5.4 Game Instantly Crash on iOS devices on Testflight
Hi, I'm working on a game for the past few years using first Unreal Engine 4, and now Unreal Engine 5.4.4. I'm experiencingan unusual crash on startup on some devices . The crash is so fast that I'm barely able to see the launching screen sometimes because the app closes itself before that. I got a EXC_CRASH (SIGABRT) so I know that it's a null pointer reference, but I can't quite wrap my head about the cause, I think that's something messed up in the packaging of the app, but here is where I'm blocked, I'm not that accustomed with apple devices. If someone has some advise to give, please, any help will be very valuable. Many thanks. Log : Crash Log on Ipad
0
0
505
Feb ’25
Associated Domain not working to Open App
Hello Having trouble getting associated domain to work in our project. It was working when we used Branch, but our company wants to host the domain ourselves. This is a multi-scheme project, using .xcconfig files to define the correct entitlement per Build. The relevant entitlement file has: com.apple.developer.associated-domains applinks:bm.ddcas.ai in the ....{other irrelevant test associated domains....} The project Team and App ID are taken from the Identifiers screen where the Identifier capabilities has 'associated domains' ticked on. I've also checked elsewhere on AppleDeveloper/Connect to be sure. When we used Branch with domain key app links: bmstores.app.link this worked fine. With https://bm.ddcas.ai (our own host) which is publicly available and has an aasa file in both the main directory and /.well-known, typing this in safari or anything just doesn't attempt to link to the App. The iPhone is in developer mode, and using the developer menu associated domains diagnostic tool, typing https://bm.ddcas.ai results in the diagnostic saying 'The url is a Universal Link for the app with identifier **********.***etc (the app is installed on real iPhone 12, iOS 18.6.2 and my Xcode is 16.4) However, it just doesn't work if we type in https://bm.ddcas.ai and results in a Safari message of '400 not found' and the 'nginx' shows. We have read innumerable Apple Dev posts and StackOverflow posts, as well as several step by step 'how to's' online but this just isn't working. The aasa file is at https://bm.ddcas.ai/apple-app-site-association and is setup as follows: { "applinks": { "apps": [], "details": [ { "appID": "{my Team ID}.{my App ID}", "paths": [ "*" ], "components": [ { "/": "/verification", "?": { "verification_code": "[A-Za-z0-9]{6}" }, "comment": "Matches verification code path" } ] } ] } } Our Server guys say the website (bm.ddcas.ai) is public and hosted, it just doesn't have a /verification path as they say it should redirect before reaching that. Also, our Android redirect works using this site, so this appears to be something specific Apple code is looking for. What, please, are we likely to be missing as it does not seem obvious from the Apple documentation or any of the resources I have checked online. Normally we can figure anything out, but getting nowhere here so the help is appreciated.
0
0
96
Sep ’25
Device Activity Privacy Restrictions
Hey there! So, I'm trying to see what I'm able to do with the Device Activity Report Extension, and I have a few questions about the following quote: To protect the user’s privacy, your extension runs in a sandbox. This sandbox prevents your extension from making network requests or moving sensitive content outside the extension’s address space. In particular, what constitutes the address space for this extension? Can I save data to a UserDefaults object that only the extension can access? (Apps like Opal allow the user to label apps as "distracting" and "non-distracting", and I'm wondering how they do that!) From what I've read, I believe it cannot write to a shared app group or model (and I just want to confirm this) It also seems that there's nothing preventing it from reading data from the main app, so I'm just wondering if it's able to read data from an app group or model with no problem. Thanks in advance!
0
0
126
Aug ’25
Message Filter Extension and multiple servers
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?
0
0
445
Jan ’25
A Summary of the WWDC25 Group Lab - watchOS (Part 1)
At WWDC25 we launched a new type of Lab event for the developer community - Group Labs. A Group Lab is a panel Q&A designed for a large audience of developers. Group Labs are a unique opportunity for the community to submit questions directly to a panel of Apple engineers and designers. Here are the highlights from the WWDC25 Group Lab for watchOS (part 1). 1. I'm really excited about the new design system on all platforms. Liquid Glass is super cool. What do developers need to keep in mind when building for watchOS 26? To adopt the new design system, start with updating your app for watchOS 10 – If you have done so, your app will be mostly ready for watchOS 26. For more information, see Design and build apps for WatchOS 10. You can then look into Liquid Glass specific APIs to fine tune your app. This topic is covered in Adopting Liquid Glass. If you have SwiftUI views using any custom style, make sure they are still legible and fit with the new design system. 2. Something that really stood out to me were updates to the Smart Stack, with the system prioritizing Widgets when they're most relevant. Tell me more about these new opportunities for apps. Workout apps that record workouts using HealthKit may be automatically suggested on the watch face and appear in the Smart Stack without adding a widget. Relevant widgets are a great way to present information related to a date, location, point-of-interest type, sleep schedule, or fitness condition in the Smart Stack when it is relevant. Relevant widgets don't need to display a empty state view when they are not relevant. They are only shown in the Smart Stack when relevant. The watchOS 26 Design ToolKit in the Apple Design Resources includes a set of templates that you can use to layout your widgets. 3. Is the Wrist Flick gesture available to developers in the same way as Double Tap is? The system uses Wrist Flick to dismiss notifications and incoming calls, silence timers and alarms, or return to the watch face. There is no separate API for the Wrist Flick gesture. Apps that are using XCUIAutomation to make sure their user interface behaves as intended can use the XCUIDeviceHandGesture.flick to automate tests that verify that their app responds appropriately to the Wrist Flick gesture. For apps using automated testing, the XCUIDeviceHandGesture.doubleTap can be also be used to automate testing of the app with the Double Tap gesture. See XCUIDevice.perform(handGesture:) 4. Can HRV measurements be triggered on demand via API in watchOS? Guidelines or processes for enabling energy-intensive biometric sampling on development devices for IRB-approved research? You don’t have direct control on the sampling rate in watchOS. You can use HealthKit (HKQuantityTypeIdentifierHeartRateVariabilitySDNN, to be specific) to query the HRV data, once the system has sampled and persisted the data to HealthKit. If that doesn’t help, we suggest that you file a feedback report with your concrete use case for us to investigate. Specific to IRB-approved research using Apple Watch or its companion iPhone, you might want to look at this FAQ and SensorKit to see if they can be of any help. 5. What is the best advice for someone who is new to making a watchOS app that’s been on iOS and iPadOS? You can start with exploring the system experience features on watchOS, such as notifications, controls, and widgets, and getting familiar with the system spaces, like Smart Stack, watch face, and control center. Knowing the watchOS app design principles and practices is important as well. Design and build apps for WatchOS 10 is a great resource for this topic. SwiftUI is an amazing across-platform framework, and you will use it to create your watchOS app. If you're already using it, great! Keep in mind some watch-only constraints. Comparing to iPhone or iPad, Apple Watch has a limited battery and smaller screen size, which significantly impacts how people use your app and how your app works. 6. Was there any extension this year to the 7 day limit on querying Apple Health data on the watch? There is no change on the limit this year. You can get this official limit at runtime using earliestPermittedSampleDate. There are some exceptions, and so don't be surprised if you see some data types are retained longer. The companion iPhone holds the full set of the health data. If you need to access the health data that has been purged from the Apple Watch, consider doing it with your iOS app, and then passing the result to your watchOS app.
0
0
107
Jul ’25