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

Deep/universal links not working in ios with edge broser
Deeplinks in our Mobile (native) application work fine from email clients such as Gmail and Outlook with a default browser such as Safari. If the app is already installed, clicking the link launches it. However, when we click on the same link from Outlook email with the default browser, Edge, it opens directly in the browser, because any external links in Outlook email route through safe links, which prevents deep linking to the APP. The current behavior is as follows: When Safari is the default browser, the process works seamlessly, and the app opens directly. outlook->deep link pressed -> redirect to safari ->opens the app if already installed However, when Microsoft Edge is set as the default browser, it opens the App Store link in a popover, with an option to open the app if installed. outlook->deep link pressed -> redirect to Edge->opens the app store inside edge even app already installed Note : outlook is enforcing safe link policies and also App protection policies. I would like to achieve the same behavior with Microsoft Edge as with Safari, where the app opens directly rather than redirecting to the App Store. Is there a specific configuration or workaround to ensure that Microsoft Edge, when set as the default browser, opens the app directly instead of redirecting to the App Store? Any insights or suggestions would be greatly appreciated. I am expecting that this safe link works the same as works with a safari in iOS Devices. I have also tried this - https://learn.microsoft.com/en-us/mem/intune/apps/app-protection-policy-settings-ios#exempt-universal-links but not working I'd appreciate it if you could assist me with this matter as soon as possible. How to handle deep links in Outlook when using a default browser like Edge
0
0
169
Oct ’24
@IntentParameterDependency Always Returns nil in iOS 18
The following code works perfectly fine in iOS 17, where I can retrieve the desired dependency value through @IntentParameterDependency as expected. However, in iOS 18, addTransaction always returns nil. struct CategoryEntityQuery: EntityStringQuery { @Dependency private var persistentController: PersistentController @IntentParameterDependency<AddTransactionIntent>( \.$categoryType ) var addTransaction func entities(matching string: String) async throws -> [CategoryEnitity] { guard let addTransaction else { return [] } // ... } func entities(for identifiers: [CategoryEnitity.ID]) async throws -> [CategoryEnitity] { guard let addTransaction else { return [] } // ... } func suggestedEntities() async throws -> [CategoryEnitity] { guard let addTransaction else { return [] } // ... } } Has anyone else encountered the same issue? Any insights or potential workarounds would be greatly appreciated. iOS: 18.0 (22A3354) Xcode 16.0 (16A242d)
2
2
383
Sep ’24
Screen Time API - Device Activity Report
I need some assistance with the Screen Time API’s DeviceActivityReport extension. I know the extension is sandboxed but I need the data inside my app. Jomo is currently doing this so it’s not impossible. I see they’re saying it’s an estimate which is about 5 - 10 off of the actual screen time, but how are they doing this? Any attempt to store the screen time data inside some sort of database or UserDefaults always fails of course due to the sandbox. Any advice would be greatly appreciated!
0
0
191
Oct ’24
Difficulty blocking and scheduling with the Screen Time API
Hello, I'm currently facing some technical difficulties in implementing features related to application restrictions using the ScreenTime API. In our app, we allow users to set up restrictions for specific apps and app categories, with scheduled times and days (for example, Mondays and Thursdays, from 2pm to 5pm). The blocking sessions must run independently and simultaneously, allowing different sets of applications to be restricted at different times. However, I ran into two main problems: 1. Applying restrictions in the DeviceActivityMonitor extension: Although I can enable and disable restrictions, I haven't found an effective way to apply multiple FamilyActivitySelections directly in the DeviceActivityMonitor extension. The extension has to manage different blocking sessions independently, restricting different sets of applications and categories simultaneously or separately. I would like to know if it is possible to transmit this list of selected applications via UserDefaults or CoreData to the extension in order to facilitate this integra To better illustrate, here is a snippet of the code I am using: import Foundation import FamilyControls import ManagedSettings import DeviceActivity class AppBlockManager: ObservableObject { private let store = ManagedSettingsStore() private let center = DeviceActivityCenter() @Published var activitySelection: FamilyActivitySelection private var activityName: DeviceActivityName private var schedule: DeviceActivitySchedule init(selection: FamilyActivitySelection, activityName: DeviceActivityName, schedule: DeviceActivitySchedule) { self.activitySelection = selection self.activityName = activityName self.schedule = schedule } func startBlock() { do { try center.startMonitoring(activityName, during: schedule) if let applications = activitySelection.applications.isEmpty ? nil : activitySelection.applicationTokens { store.shield.applications = applications } if let categories = activitySelection.categories.isEmpty ? nil : activitySelection.categoryTokens { store.shield.applicationCategories = ShieldSettings .ActivityCategoryPolicy .specific(categories) store.shield.webDomainCategories = ShieldSettings .ActivityCategoryPolicy .specific(categories) } if let webDomains = activitySelection.webDomains.isEmpty ? nil : activitySelection.webDomainTokens { store.shield.webDomains = webDomains } } catch { print("Error starting monitoring: \(error)") } } func stopBlock() { store.shield.applications = nil store.shield.webDomains = nil store.shield.applicationCategories = nil store.shield.webDomainCategories = nil center.stopMonitoring([activityName]) } } Currently, this AppBlockManager is part of the main app target, not within the DeviceActivityMonitor extension, which is currently empty. With this configuration, I can only have one blocking session active at a time, and when it is deactivated, all restrictions are removed. I tried using different ManagedSettingsStore instances, each named individually, but without success. 2. Problems with scheduling restrictions: Currently, when setting up scheduled monitoring via DeviceActivitySchedule, the restrictions are activated immediately, ignoring the specific times scheduled (e.g. starting at 2pm and ending at 5pm). I need the schedule to work correctly, applying the restrictions only during the defined periods. Alternatively, I've considered running a background task that checks whether active sessions (up to a maximum of 3) should apply the restrictions at that time, but I'm still looking for a more suitable solution. In view of these challenges, I would like some guidance on the following points: What would be the best way to configure the DeviceActivityMonitor extension to receive and apply different FamilyActivitySelections, ensuring that the blocking sessions are independent and can run simultaneously? Is there a recommended approach to ensure that restrictions scheduled via DeviceActivitySchedule are applied and removed according to the times and days defined by the user, ensuring that applications are restricted only during the scheduled periods?
0
1
227
Oct ’24
WeatherKit moonPhase:full is skipped
HI there, when requesting the daily forecast via the WeatherKit REST API, I found out that under certain circumstances the moon phase full is skipped. Example from Japan (working): { "forecastDaily": { "name": "DailyForecast", "metadata": { "attributionURL": "https://developer.apple.com/weatherkit/data-source-attribution/", "expireTime": "2024-10-21T15:16:10Z", "latitude": 35.650, "longitude": 139.840, "readTime": "2024-10-21T14:16:10Z", "reportedTime": "2024-10-21T12:00:37Z", "units": "m", "version": 1, "sourceType": "modeled" }, "days": [ ..., { "forecastStart": "2024-10-16T15:00:00Z", "forecastEnd": "2024-10-17T15:00:00Z", "conditionCode": "MostlyCloudy", "maxUvIndex": 4, "moonPhase": "waxingGibbous", "moonrise": "2024-10-17T07:47:26Z", "moonset": "2024-10-16T20:09:01Z", "precipitationAmount": 0.09, "precipitationChance": 0.43, "precipitationType": "rain", ... "windSpeedMax": 16.03, }, { "forecastStart": "2024-10-17T15:00:00Z", "forecastEnd": "2024-10-18T15:00:00Z", "conditionCode": "Rain", "maxUvIndex": 4, "moonPhase": "full", "moonrise": "2024-10-18T08:20:34Z", "moonset": "2024-10-17T21:24:49Z", "precipitationAmount": 4.83, "precipitationChance": 0.83, "precipitationType": "rain", ... "windSpeedMax": 15.57, }, { "forecastStart": "2024-10-18T15:00:00Z", "forecastEnd": "2024-10-19T15:00:00Z", "conditionCode": "Drizzle", "maxUvIndex": 5, "moonPhase": "waningGibbous", "moonrise": "2024-10-19T08:58:43Z", "moonset": "2024-10-18T22:42:03Z", "precipitationAmount": 3.85, "precipitationChance": 0.76, ... "windSpeedMax": 28.81, }, ... ] } } Example from Germany where the fullmoon is skipped: { "forecastDaily": { "name": "DailyForecast", "metadata": { "attributionURL": "https://developer.apple.com/weatherkit/data-source-attribution/", "expireTime": "2024-10-21T15:41:17Z", "latitude": 47.760, "longitude": 12.650, "readTime": "2024-10-21T14:41:17Z", "reportedTime": "2024-10-21T13:00:37Z", "units": "m", "version": 1, "sourceType": "modeled" }, "days": [ { "forecastStart": "2024-10-16T22:00:00Z", "forecastEnd": "2024-10-17T22:00:00Z", "conditionCode": "MostlyClear", "maxUvIndex": 3, "moonPhase": "waxingGibbous", "moonrise": "2024-10-17T16:07:30Z", "moonset": "2024-10-17T05:19:30Z", "precipitationAmount": 0.0, ... "windSpeedMax": 8.23, }, { "forecastStart": "2024-10-17T22:00:00Z", "forecastEnd": "2024-10-18T22:00:00Z", "conditionCode": "Cloudy", "maxUvIndex": 2, "moonPhase": "waningGibbous", "moonrise": "2024-10-18T16:30:22Z", "moonset": "2024-10-18T06:48:39Z", "precipitationAmount": 1.17, ... "windSpeedMax": 8.73, }, { "forecastStart": "2024-10-18T22:00:00Z", "forecastEnd": "2024-10-19T22:00:00Z", "conditionCode": "Cloudy", "maxUvIndex": 2, "moonPhase": "waningGibbous", "moonrise": "2024-10-19T16:59:14Z", "moonset": "2024-10-19T08:18:33Z", "precipitationAmount": 0.02, ... "windSpeedMax": 7.16, }, ] } } As you can see here https://moon.nasa.gov/moon-observation/daily-moon-guide/?intent=011#1729171951907::0:: and on several other sites specialized on the lunar cycle) on 2024-10-17 should be shown full moon. I know this error is probably because the forecast starts prior to the full moon phase and ends after it but customers don't care about technicalities. They see that there is a full moon missing and complain to me. And they are right. Can you fix this somehow? For example, if a DailyForecast spans the majority of a full moon this Day is marked as full moon. Another question: Are you considering providing a moonPhase attribute to the "currentWeather" dataset? That would be the best option. (At least for me :))
1
2
145
Oct ’24
v2 Weatherkit REST API documentation release date
Hi. The WWDC video of the v2 weatherkit api showed some examples for the REST API. However, they were very limited. The documentation for the REST API is currently for the v1 weatherkit API. When will the documentation for the v2 API be released? There are some new features of the v2 that I would really like to use, but I can't without knowing the new v2 REST API specifications. Any guidance would be much appreciated. Thanks!
5
1
601
Jul ’24
Erreur 34 311
hi i dont know if i post in a good section. i have crash without message in console only error 34 311 what does this code mean? erreur -311 smFHBlkDispErr : an error occurred during _sDisposePtr (suppression du bloc FHeader). erreur -34 dskFulErr : full disk or is this something else? thank
2
0
217
Oct ’24
steam game crash. HELP
Process: ArmA3 [9180] Path: /Users/USER/Library/Application Support/Steam/*/ArmA3.app/Contents/MacOS/ArmA3 Identifier: com.vpltd.Arma3 Version: 1.82.0 (20230605.1) Code Type: X86-64 (Translated) Parent Process: launchd [1] User ID: 501 Date/Time: 2024-10-19 11:33:49.3660 +0100 OS Version: macOS 15.1 (24B5077a) Report Version: 12 Anonymous UUID: C2C26AB0-3885-5F5F-E3E0-4D98B373493E Sleep/Wake UUID: 8FDB755C-9D72-4485-BB5A-BD8593ADEF9F Time Awake Since Boot: 31000 seconds Time Since Wake: 8273 seconds System Integrity Protection: enabled Notes: PC register does not match crashing frame (0x0 vs 0x10011E9BB) Crashed Thread: 33 E.d3d11.BackendThread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018 Exception Codes: 0x0000000000000001, 0x0000000000000018 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [9180] VM Region Info: 0x18 is not in any region. Bytes before following region: 4294967272 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---&gt; __TEXT 100000000-101b74000 [ 27.5M] r-x/r-x SM=COW /Users/USER/Library/Application Support/Steam/*/ArmA3.app/Contents/MacOS/ArmA3 Error Formulating Crash Report: PC register does not match crashing frame (0x0 vs 0x10011E9BB) Thread 0:: E.runloop Dispatch queue: com.apple.main-thread 0 ??? 0x7ff895c16a84 ??? 1 libsystem_kernel.dylib 0x7ff8059d9e0e mach_msg2_trap + 10 2 libsystem_kernel.dylib 0x7ff8059e8622 mach_msg2_internal + 84 3 libsystem_kernel.dylib 0x7ff8059e0f16 mach_msg_overwrite + 649 4 libsystem_kernel.dylib 0x7ff8059da0ff mach_msg + 19 5 CoreFoundation 0x7ff805aff9dd __CFRunLoopServiceMachPort + 143 6 CoreFoundation 0x7ff805afe3ed __CFRunLoopRun + 1393 7 CoreFoundation 0x7ff805afd84c CFRunLoopRunSpecific + 550 8 HIToolbox 0x7ff811618ec3 RunCurrentEventLoopInMode + 292 9 HIToolbox 0x7ff81161e8a4 ReceiveNextEventCommon + 646 10 HIToolbox 0x7ff81161ea42 _BlockUntilNextEventMatchingListInModeWithFilter + 66 11 AppKit 0x7ff809381b6f _DPSNextEvent + 902 12 AppKit 0x7ff809db66b4 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1290 13 gameoverlayrenderer.dylib 0x11a99b2fe 0x11a97c000 + 127742 14 ArmA3 0x100060dbd 0x100000000 + 396733 15 ArmA3 0x1002e8cb0 0x100000000 + 3050672 16 CoreFoundation 0x7ff805af4d5e CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 137 17 CoreFoundation 0x7ff805b81254 ___CFXRegistrationPost_block_invoke + 86 18 CoreFoundation 0x7ff805b811aa _CFXRegistrationPost + 528 19 CoreFoundation 0x7ff805ac4bde _CFXNotificationPost + 817 20 Foundation 0x7ff806a3c08b -[NSNotificationCenter postNotificationName:object:userInfo:] + 82 21 AppKit 0x7ff80938b59f -[NSApplication _postDidFinishNotification] + 311 22 AppKit 0x7ff80938b2e4 -[NSApplication _
1
0
163
Oct ’24
Are uninstall routines ever run for normal macOS app removal?
If you "uninstall" an app from your Mac using the standard "uninstall" methodologies, does macOS ever run an uninstaller in the background to clean up files and/or folders outside the app's .app folder? The standard "uninstall" methodologies that I know about are: trashing an application's .app folder, then emptying the trash long-clicking on an app in Launchpad, then clicking on its X while it jiggles Are there any other standard methodologies to "uninstall" a macOS app? Does any of the methodologies run any uninstall routine other than just deleting the .app folder from the file system (like maybe removing a folder under ~/Library/Caches)? Are there any problems with running rm -rf <path-to-.app-folder> instead of trashing the app folder/Lauchpad jiggling to death the app? Are there any differences between uninstall routines for apps installed from the Mac App Store versus apps installed by other means?
3
0
201
Oct ’24
Updating SKAdNetwork Certificates for AdAttributionKit Compatibility
We are trying to test AdAttributionKit integration and receive a postback in the testing environment with our existing SKAdNetwork identifier and SKAdNetwork certificates, that we had received after registering SKAdNetwork profile via an e-mail. The issue is that existing certificates were generated by Apple with prime192v1 algorithm, which is not supported by JWT, when we try to create token to sign AdAttribution impression. We have generated the updated private and public keys according to the documentation https://developer.apple.com/documentation/adattributionkit/registering-an-ad-network. Is it possible to update our existing SKAdNetwork certificates to the new AdAttributionKit certificates? Or do we need to do something else in order to make our SKAdNetwork certificates work with AdAttributionKit?
0
0
126
Oct ’24
Speech Recognition Problem in iOS 18.0
It looks like Apple has added some new API(s) to SFSpeechRecognition My app, which is currently listed on App Store does feature speech recognition. Yet, trying to use it under iOS 18.0 throws errors: -[SFSpeechRecognitionTask localSpeechRecognitionClient:speechRecordingDidFail:]_block_invoke Ignoring subsequent local speech recording error: Error Domain=kAFAssistantErrorDomain Code=1101 "(null)" What happens is that after several words are transcribed and displayed, the next sentence results in previous words disappearance. That's probably what that portion of the error text - "Ignoring subsequent local speech recording error: Error Domain=kAFAssistantErrorDomain Code=1101 "(null)" means. The problem occurs ONLY when the app is running under iOS 18.0 Even when it's compiled in Xcode 16.0 using iOS 17.5 everything works fine. Any suggestions?
35
8
3.2k
Aug ’24
"Unknown extension process" is displayed after app updating
Hello. In iOS 17, after updating the app, when trying to "Edit Widget" from a long press on the widget, "Unknown extension process" is displayed and the widget cannot be edited. At this time, the widget becomes completely white (or completely black), and it cannot be fixed without restarting the iPhone. This issue occurs sporadically on some devices. The implementation uses AppIntentTimelineProvider. Does anyone know a solution, workaround, or the cause of this problem? Thank you.
3
2
567
Jul ’24
Unable to call code inside App Intent Extension like updateAppShortcutParameters() - Linking error
Was watching this latest WWDC 2023 video and had a question. I see about 17:20 in, they mention you can now put the shortcut provider in an app intent extension. https://developer.apple.com/videos/play/wwdc2023/10103/ This works fine by itself and I can see all my shortcuts and use siri, but as soon as I try to call into the extension from the main app in order to trigger updateAppShortcutParameters() or any other code, I get a linker error. Am I doing something obvious wrong? Note, I called it a framework, but it Is just an extension. Cant figure out how I am supposed to be calling this method. Any help is greatly appreciated! https://developer.apple.com/documentation/appintents/appshortcutsprovider/updateappshortcutparameters()?changes=_4_8 https://imgur.com/a/yDygSVJ
1
0
696
Sep ’23