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.

Post

Replies

Boosts

Views

Activity

Apple app site association CDN cache does not work with IPv6 only servers.
Hi, We have an IPv6 only server setup, where we have put AASA file as required: https://qa-jen.noknoktest.com/.well-known/apple-app-site-association But Apple CDN does not found it: https://app-site-association.cdn-apple.com/a/v1/qa-jen.noknoktest.com Is there any restriction on IPv6 only servers? Everything works with our other IPv4 servers. Note: With alternate mode configuration in application, the AASA is accessible to devices. There is no any geo restriction or IP filtering for server. What is missing to force CDN cache the file fro mentioned server?
8
0
421
Sep ’24
Unable to Retrieve bundleIdentifier with FamilyControls .individual Authorization
Tl:dr What are some reasons my bundleIDs aren't showing up and does anyone have good resources to setup the screentime API/DeviceActivityMonitorExtension? I'm working on an iOS app that uses the FamilyControls and DeviceActivity frameworks to monitor and restrict app usage. The app allows users to select apps and set usage limits. When a limit is reached, a DeviceActivityMonitorExtension should block the selected apps. My App setup: Have a model that is called when users select apps to manage these app bundle IDs are then serialized and sent to the Device Monitor Extension via App Group so it can be used when the event threshold is reached. Cant use Application Tokens because they are not serielizable and cant be passed to the extension. Problem: While testing, I’m unable to retrieve the bundleIdentifier and localizedDisplayName from the Application objects after selecting apps. Instead, these properties are nil or empty, preventing me from saving the bundle IDs to share with the extension via App Groups. Assumptions: I suspect this issue is due to missing the com.apple.developer.screentime.api entitlement, which might be required to access these properties even during development. I've requested for the entitlement but its still under review. Key Code Snippets: Authorization Request: class ScreenTimeManager: ObservableObject { static let shared = ScreenTimeManager() @Published var isAuthorized: Bool = false func requestAuthorization() async { do { try await AuthorizationCenter.shared.requestAuthorization(for: .individual) DispatchQueue.main.async { self.isAuthorized = AuthorizationCenter.shared.authorizationStatus == .approved print("Authorization status: \(AuthorizationCenter.shared.authorizationStatus)") } } catch { DispatchQueue.main.async { print("Authorization failed: \(error.localizedDescription)") self.isAuthorized = false } } } } Accessing bundleIdentifier: print("addAppGroup() Called") let managedApps = selection.applications.compactMap { application -> ManagedApp? in guard let token = application.token else { print("No token for application: \(application)") return nil } let app = Application(token: token) print("New Application instance: \(app)") guard let bundleID = app.bundleIdentifier, !bundleID.isEmpty else { print("Bundle identifier is empty or nil for application: \(app)") return nil } let displayName = app.localizedName ?? "Unknown App" print("Processing application with bundleIdentifier: '\(bundleID)' and displayName: '\(displayName)'") return ManagedApp( bundleIdentifier: bundleID, applicationToken: token, localizedDisplayName: displayName ) } if managedApps.isEmpty { print("No managed apps created. Exiting addAppGroup().") return } // Continue with creating DeviceActivityEvent... } Logs - Shows application token but never bundleID or LocalizedDisplayname Application(bundleIdentifer: nil, token: Optional(128 byte <TOKEN_PRESENT>), localizedDisplayName: nil) What I've Tried: Ensured Screen Time is enabled on the device. Verified App Group configuration in both app and extension. Checked that authorization is being requested and the status is .approved. Cleaned and rebuilt the project. Questions: Is the com.apple.developer.screentime.api entitlement required to access bundleIdentifier and localizedDisplayName when using .individual authorization? Is there a way to access these properties without the entitlement, or am I missing a configuration step? Has anyone faced a similar issue and found a solution? Lastly, is there a good place for additional resources on the screentime API??
1
0
306
Sep ’24
Instant access to call log with new ios 18 commands
Hello, I am wondering about developing my application. Can the new commands available with iOS 18 give me access to the call log (recent calls)? With a request prior to installing the application for example. I saw that Truecaller has just launched an update on iOS to offer the same features as Android, i.e. capture the call log. Apple allows applications like Truecaller to integrate their spam databases into the iOS caller ID system. I wonder by which command! Otherwise, I can perhaps use the "SMS and Call Spam Reporting" commands and divert them to retrieve the call log. To tell you the truth, I'm trying to find, for my application, a way to retrieve recent call data to create a call dashboard of certain calls, by retrieving the name or phone number, call date, call time and call duration. Does anyone have an idea?
4
0
328
Sep ’24
How to create Stick Pack with custom UI
Hi, I'd like to develop sticker packs for iMessage. In particular, I'd like to have custom UIs so user can select different groups of stickers under the same sticker drawer. Based on what I read in the developer doc, sticker pack does not allow custom UIs, and I have to go to iMessage apps. However, I discovered quite a few sticker packs have custom UIs. For example, GIPHY, Fluffcorn, Animal Stickers, Mochj Cat, they are in sticker drawer but they still have custom UIs with tabs. How is this possible? Is there something I'm missing from the developer doc? Thanks a lot!
1
1
221
Sep ’24
Detection of installed web browsers on Mac OS
Platform: macOS, Sonoma 14.6 Technology stack: Electron v29, TypeScript Hello, We're developing a desktop app for macOS that helps with automation of some browser related tasks, using Puppeteer and Chrome/Chromium browsers. One of the conditions of our app running is having Chrome/Chromium installed on the computer. To check if someone has installed one of the supported browsers our app runs the following command in the shell: mdfind "kMDItemKind == \'Application\'" it produces the list of installed apps and then we scan the list in the search of Chrome or Chromium. Recently we found out that the command's result is not consistent, because on some macOS computers the result is empty and we don't know why. Are we misunderstanding the usage of mdfind? Or maybe we should try a different way to check if Chrome or Chromium is installed on the computer running our app? Thank you.
2
0
136
Sep ’24
Siri's voice invocation to open App and pass the intent
Hi All, requirement - "Search (placeholder) in (myApp)". When user speaks this strings, Siri should open the app and pass the placeholder. This worked for me only when i used an AppEnum (with specific defined set) with AppEntity. I want the placeholder to be dynamic and not defined via the AppEnum. Have observed this feature working fine with Youtube, Spotify & Whatsapp apps. Is there anything else that these app add specifically to make this work. ? Also in these app's Siri settings, there is a toggle named - 'Use with Ask Siri'. Could someone please help in understanding, how this option is enabled ?
5
0
379
Sep ’24
iOS18 main_executable_path_missing
A crash appears when you run the app after the iOS18 update. Translated Report (Full Report Below) ... Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: GUARD 5 Triggered by Thread: 0 Thread 0 Crashed: 0 dyld 0x1bc7462b0 lsl::PreallocatedAllocatorLayout<278528ull>::init(char const**, char const**, void*) + 436 1 dyld 0x1bc73fa38 start + 1960 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x2010003030100000 x1: 0x0000000fffffc0d0 x2: 0x0000000000000006 x3: 0x00000001bc7147a7 x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x2010003030100000 x9: 0x2010003030100000 x10: 0x000000016afd3dff x11: 0x00000001bc780f30 x12: 0x0000000000000050 x13: 0x0000000000000044 x14: 0x0000000000052010 x15: 0x0000000000000000 x16: 0x0000000000000000 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000194188000 x20: 0x000000016afd3b38 x21: 0x000000016afd3ae0 x22: 0x00000001fa138050 x23: 0x000000016afd37c8 x24: 0x0000000fffffc10c x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x0000000000000000 fp: 0x000000016afd3860 lr: 0x00000001bc746130 sp: 0x000000016afd37c0 pc: 0x00000001bc7462b0 cpsr: 0x60001000 far: 0x00000001fa1380e0 esr: 0x92000047 (Data Abort) byte write Translation fault Binary Images: 0x1bc70c000 - 0x1bc78f693 dyld arm64e <77c1eed22ed7396aba34e770120d81d4> /usr/lib/dyld 0x104e2c000 - 0x1064b7fff main_executable_path_missing arm64 /main_executable_path_missing 0x0 - 0xffffffffffffffff ??? unknown-arch <00000000000000000000000000000000> ??? Error Formulating Crash Report: dyld_process_snapshot_get_shared_cache failed EOF
1
1
316
Sep ’24
How to correctly use AppIntentsExtension with AppShortcutsProvider
I've watched the following 3 WWDC videos on intents and after watching, decided to try and implement an AppIntentsExtension. All my intent action does is run a network request in the background. So it seems like I should be putting it in an AppIntentsExtension instead of in the main app to avoid having to launch the app in the background, and instead have it run directly in the extension. 2022 https://developer.apple.com/videos/play/wwdc2022/10032?time=1620 2023 https://developer.apple.com/videos/play/wwdc2023/10103?time=880 2024 https://developer.apple.com/videos/play/wwdc2024/10134/?time=992 If I just put the intent and shortcut provider code I need inside an AppIntentsExtension, everything works fine except for 1 thing. I have no way to call updateAppShortcutParameters on my AppShortcutsProvider from the main app because it is defined inside the extension. So I have no way to let siri know to re-query my parameterized phrases, and so siri doesnt expose any new phrases when things in the app are updated. So to solve this, I somehow need a way to access the AppShortcutsProvider from within the main app to be able to call updateAppShortcutParameters https://developer.apple.com/documentation/appintents/appshortcutsprovider/updateappshortcutparameters() What is the recommended way to do this? Should I be trying to create a separate framework with the shortcut provider, which is then used by both the main app an extension? I tried doing this but ran into a few build errors. I tried changing the target membership of the AppShortcutsProvider to have the file in the extension, but include both the main app and intent extension, this seems to work, but I am unsure if this is the correct approach.
1
0
275
Sep ’24
App Clip Card not appearing on initial page load
I have no idea why my app clip card is not showing on initial url load, it doesn't even show when I refresh the page. The only thing that works is pull to refresh (once or more times). After that, it shows up. Is it possible to fix this issue and show app clip card on url load? Here's the appclip url (for some reason I can't post href): https://app.celer.life/reading-exercise Initial load: After pull to refresh:
2
0
224
Sep ’24
UserDefaults.didChangeNotification not firing
Hi, I'm currently working on an app made originally for iOS 15. On it, I add an observer on viewDidLoad function of my ViewController to listen for changes on the UserDefault values for connection settings. NotificationCenter.default.addObserver(self, selector: #selector(settingsChanged), name: UserDefaults.didChangeNotification, object: nil) Said values can only be modified on the app's section from System Settings. Thing is, up to iOS 17, the notification fired as expected, but starting from iOS 18, the notification doesn't seem to be sent by the OS. Is there anything I should change in my observer, or any other technique to listen for the describe event? Thanks in advance.
4
1
321
Sep ’24
iOS 18 didFinishLaunchingWithOptions called during prewaming
Hi, I have seen a lot of answers in different threads Thread 1, Thread 2 that if an app doesn't support scenes, didFinishLaunchingWithOptions shouldn't be called during prewarming. Additionally, DTS Engineer on this Thread 3 mentioned that starting from late iOS 15, didFinishLaunchingWithOptions definitely won't be called during prewarming. However, we are still seeing in our logs, that didFinishLaunchingWithOptions is called during prewarming, for some users, even on iOS 18. Our app doesn't support scenes, and our AppDelegate is completely Objective-C. The problem is that in didFinishLaunchingWithOptions we set up our CoreData and Networking stack then we make a network request to fetch data and store it in database. When the app is launching in a prewarming state, CoreData stack can't load the persistent stores because the protected data isn't accessible during prewarming. We are setting the FileProtectionType to completeUnlessOpen for NSPersistentStoreDescription, which means the Core Data files are considered protected data. When user eventually launches app, network request resumes and crashes when trying to store data in database because Persistent Stores not loaded. What would you recommend to resolve this issue? Rewriting the Core Data stack for lazy initialization is quite challenging since we're using an old library (RestKit) for networking and Core Data caching. Thanks.
1
0
172
Sep ’24
PDFKit PDFPage.setBounds(_:for:) returns unexpected results in Xcode16
In XCode15, if you specify mediaBox for PDFDisplayBox, the page will be shrunk to fit the specified range. However, in XCode16, the page is cropped to fit the specified range, as when cropBox is specified for PDFDisplayBox. I think it's a bug because the setBounds documentation hasn't been updated, but has anyone had the same problem? Please let me know if there are any workarounds.
0
1
211
Sep ’24
ControlWidget jump deep link and custom icon error
When i use Xcode16 Beta4, I finish some code for example @available(iOS 18.0, *) struct Test001ControlWidget: ControlWidget { let kind: String = "Test001ControlWidgetKind" var body: some ControlWidgetConfiguration { StaticControlConfiguration(kind: kind, content: { ControlWidgetButton(action: Test001ControlAppIntent(), label: { HStack { Image("controlcenter_point") Text("Test001") } }) }) .displayName("Test001") } } @available(iOS 18.0, *) struct Test001ControlAppIntent: AppIntent { static let title: LocalizedStringResource = "Open Demo Some Page" static var isDiscoverable: Bool = false static var openAppWhenRun: Bool = true func perform() async throws -> some IntentResult & OpensIntent { let defaultIntent = OpenURLIntent() guard let url = URL(string: Test001JumpType.sohuWatchPoint.jumpLink()) else { return .result(opensIntent: defaultIntent) } return .result(opensIntent: OpenURLIntent(url)) } } The icon can be displayed normally and icon type is png. And deep link also jump normally.(Note: The control widget file target membership are main app and widgetExtension) But iOS18 RC code is no working and icon show "?" How do I deal with these issues? I hope to hear from you soon. Tks a lot...
1
0
244
Sep ’24
Can from carplay when user tap an app and open the app as noralmy like Spotify
Currently, when on the phone, like Spotify, I fully close the Spotify app, and in Carplay, when the user clicks on the Spotify app, this app can open as normal. I also developed my app but when I open the app in carplay, it shows a white screen, and then the app auto-terminates (closes permanently). How Can I do the behavior like the Spotify app, My app also enabled background mode in xCode. Please help me. Thanks so much
1
0
173
Sep ’24
App Clip Invocation Issues on iOS 18 and iOS 18.1 - NFC and QR Invocation not working for Default App Clip Experience
We have identified an issue on iOS 18 and iOS 18.1 (developer beta) where App Clips invoked via NFC or QR codes without a pre-configured Advanced App Clip experience (aka they should be using the Default App Clip Experience) are not functioning as expected. This issue is specific to iOS 18, as the behavior works correctly on iOS devices running 17.x. Steps to Reproduce: Set up two scenarios: One scenario where an App Clip has a pre-configured advanced app clip experience (with metadata such as title, subtitle, image). Another scenario where the App Clip is invoked without any pre-configured experience (should use the default App Clip experience). On an iOS 18 or iOS 18.1 device: For the default App Clip experience (no pre-configured advanced app clip experence): Scan the NFC tag when the phone is locked. Scan the NFC tag when the phone is unlocked. Scan the QR code. For the pre-configured App Clip experience: Perform the same tests (NFC and QR code scans). Test the same scenarios on an iOS 17 device for comparison. Expected Behavior: For default App Clip experience invocations (NFC or QR): Scanning NFC or QR should still trigger the App Clip card, even without metadata or a pre-configured advanced experience, on both locked and unlocked devices. For pre-configured Advanced App Clip Experence invocations: The App Clip card should display correctly with the configured metadata and behave as expected on both locked and unlocked devices. Observed Behavior on iOS 18 and iOS 18.1: For default App Clip experience invocations: When scanning the NFC tag on a locked device, an error message is shown - e.g., "App Clip Unavailable" or "The operation couldn't be completed. (CPSErrorDomain error 2.)" . When scanning the NFC tag on an unlocked device, the system redirects straight to the web browser instead of displaying the App Clip card (or even the normal NFC top of screen push notification style thing) Scanning the QR code also prompts the user to open the web browser similar to the experience of scanning a non app clip QR code, skipping the expected App Clip experience. For pre-configured Advanced App Clip Experence invocations: The App Clip behaves as expected, showing the correct card with metadata and functioning properly on both locked and unlocked devices. Notes: The issue is only observed on iOS 18 and iOS 18.1, while the expected behavior is working fine on iOS 17. This may indicate a regression or change in behavior introduced with iOS 18 that affects App Clip invocations that do not have a pre-configured experience.
4
6
543
Sep ’24
What happened to logging in a Message Filter Extension on iOS 18?
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
2
0
274
Sep ’24
XPCConnectionTerminationWatchdog Crash
I recently update my ionic app to ionic angular 7. I'm having this crash that does not happen in the same way, neither in the same place. Aside from needed some entitlements that I've already requested the app is crashing all the time. This is the error. ⚡️ TO JS {"value":"en"} 2024-09-24 15:43:56.097126+0200 App[33392:5520337] [Process] 0x10d003260 - [PID=33408] WebProcessProxy::didClose: (web process 0 crash) 2024-09-24 15:43:56.097185+0200 App[33392:5520337] [Process] 0x10d003260 - [PID=33408] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=Crash 2024-09-24 15:43:56.097270+0200 App[33392:5520337] [ProcessSuspension] 0x10c020720 - ProcessAssertion: Failed to acquire RBS Background assertion 'XPCConnectionTerminationWatchdog' for process because PID 0 is invalid 2024-09-24 15:43:56.097368+0200 App[33392:5521826] [ProcessSuspension] 0x10c020720 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'XPCConnectionTerminationWatchdog' for process with PID=0, error: (null) 2024-09-24 15:43:56.098184+0200 App[33392:5520337] [Process] 0x142832618 - [pageProxyID=8, webPageID=9, PID=33408] WebPageProxy::processDidTerminate: (pid 33408), reason=Crash 2024-09-24 15:43:56.101821+0200 App[33392:5520337] [Loading] 0x142832618 - [pageProxyID=8, webPageID=9, PID=33408] WebPageProxy::dispatchProcessDidTerminate: reason=Crash 2024-09-24 15:43:56.117084+0200 App[33392:5522124] [com.apple.VisionKit.processing] Error processing request from MAD on result: Error Domain=NSOSStatusErrorDomain Code=-128 "Request was canceled" UserInfo={NSLocalizedDescription=Request was canceled} request: <VKCImageAnalyzerRequest: 0x2830d0690> requestID: 6 madRequestID: 6 cancelled: YES 2024-09-24 15:43:56.245502+0200 App[33392:5520337] [Process] 0x10c07c380 - GPUProcessProxy::gpuProcessExited: reason=IdleExit 2024-09-24 15:43:56.245552+0200 App[33392:5520337] [Process] 0x10d002ce0 - [PID=33412] WebProcessProxy::gpuProcessExited: reason=IdleExit 2024-09-24 15:43:57.682680+0200 App[33392:5520337] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service 2024-09-24 15:44:04.249892+0200 App[33392:5520337] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service 2024-09-24 15:44:12.223579+0200 App[33392:5520337] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service 2024-09-24 15:44:26.098426+0200 App[33392:5520337] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service 2024-09-24 15:44:59.812245+0200 App[33392:5522961] [MADService] Client XPC connection invalidated
1
0
269
Sep ’24
IIOScanner and PHImageIODecoder crash
I have a user who keeps crashing on his iOS 18 device, I need some help~ Exception 1, Code 26, Subcode 8 > Attempted to dereference garbage pointer 0x1a. 0 ImageIO IIOScanner::getVal32() + 36 1 ImageIO PSDReadPlugin::initialize(IIODictionary*) + 620 2 ImageIO PSDReadPlugin::initialize(IIODictionary*) + 620 3 ImageIO IIOReadPlugin::callInitialize() + 400 4 ImageIO IIO_Reader::initImageAtOffset(CGImagePlugin*, unsigned long, unsigned long, unsigned long) + 164 5 ImageIO IIOImageSource::makeImagePlus(unsigned long, IIODictionary*) + 832 6 ImageIO IIOImageSource::getPropertiesAtIndexInternal(unsigned long, IIODictionary*) + 72 7 ImageIO IIOImageSource::createThumbnailAtIndex(unsigned long, IIODictionary*, int*) + 1352 8 ImageIO CGImageSourceCreateThumbnailAtIndex + 740 9 Photos _createDecodedImageUsingImageIOWithFileUrlOrData + 856 10 Photos __91-[PHImageIODecoder decodeImageFromData:orFileURL:options:existingRequestHandle:completion:]_block_invoke_2 + 176 11 libdispatch.dylib _dispatch_call_block_and_release + 32 12 libdispatch.dylib _dispatch_client_callout + 20 13 libdispatch.dylib _dispatch_continuation_pop + 596 14 libdispatch.dylib _dispatch_async_redirect_invoke + 580 15 libdispatch.dylib _dispatch_root_queue_drain + 392 16 libdispatch.dylib _dispatch_worker_thread2 + 156 17 libsystem_pthread.dylib _pthread_wqthread + 228
1
0
204
Sep ’24