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

Failed to generate TargetContentIdentifier for criteria
I have implemented ShowInAppSearchResultsIntent and AppShortcutsProvider. But on iOS 18.1+ getting and error in console :- Failed to generate TargetContentIdentifier for criteria. In iOS 18.0 it's working fine. The code I have implemented @AssistantIntent(schema: .system.search) struct SearchIntent: ShowInAppSearchResultsIntent { // static let title: LocalizedStringResource = "Search in Cineverse for" static let searchScopes: [StringSearchScope] = [.general] @Parameter(requestValueDialog: IntentDialog("What would you like to search for?")) var criteria: StringSearchCriteria @MainActor func perform() async throws -> some IntentResult { let searchString = criteria.term print("Searching for \(searchString)") return .result() } } class AppShortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: SearchIntent(), phrases: [ "using \(.applicationName) search for", "search on \(.applicationName) app" ], shortTitle: "Search Movie", systemImageName: "magnifyingglass" ) } }
0
0
107
5d
How to Dynamically Obtain Device Models for App Store Users?
I'm currently pulling device-specific data for my app, and I'm manually listing 150 models like this: device_models = [ "iPhone1_1", "iPhone1_2", "iPhone2_1", ... "iPad16_6"] Is there an API endpoint or an automated method to dynamically retrieve a complete list of device models? I'm specifically looking to connect this with the performance metrics API to monitor launch times per device type. Any suggestions on how to streamline or automate this list would be greatly appreciated. Thanks!
2
0
110
5d
How to navigate user to specific device settings programatically?
We have a requirement where we have to navigate user to specific section (Passwords) in device settings on tap of a button. I've seen other popular apps doing it & also seen some solutions where people provided an option of using "App-prefs". But as per documentation, this is a private API. What is the solution here if I want to open specific section in device settings without taking a chance of my app getting rejected while submission process?
2
0
61
1w
PTT Bluetooth transmission does not work as expected
Hello, I've been working to implement PTT in the way recommended by the documentation. The main issue is that the bluetooth methods are opaque, so I cannot solve for what I need. The result will be that I will have to resort to hacky approaches that the PTT framework seems to be intended to solve (playing silent clips, playing custom notification sounds, having long running background audio sessions). I am testing with Anker soundcore mini as well as airpod pro. Here's the issue: there are 2 very different behaviours depending on whether I'm using a call/fullDuplex session and a halfDuplex session. halfDuplex Anchor mini Current behaviour long press activates siri pressing again after siri is active, starts transmission long press activates siri again pressing again after siri is active, stops transmission pause/play routes to the ongoing media session and plays music Expected behaviour play/pause should map to transmit/stopTransmit IF I have to use long press, it should at least not trigger siri AirPod pro Current behaviour long press changes noise cancellation pause/play routes to the ongoing media session and plays music Expected behaviour play/pause should map to transmit/stopTransmit fullDuplex/call Anchor mini: Current behaviour long press activates siri pressing again after siri is active, starts transmission long press activates siri again pressing again after siri is active, stops transmission pause/play routes to the ongoing media session and plays music Expected behaviour play/pause should map to transmit/stopTransmit IF I have to use long press, it should at least not trigger siri AirPod pro Current behaviour long press changes noise cancellation pause/play maps to mute/unmute (even if media is playing) Expected behaviour This makes sense for call behaviour, I wish it worked this well for PTT The intention here is to be able to fully interact with a channel hands-free. The current API seems to make that impossible. Is that by design? Reading all the docs seems to suggest its intended for transmit/stopTransmit to be doable just with the play/pause buttons, but even apple hardware seems to not support that.
0
0
110
1w
macOS keeps showing "[App] would like to access data from other apps" warning even if accepting it each time
It seems that whenever I scan the contents of ~/Library/Containers with my app, I get the warning [App] would like to access data from other apps, regardless of how often I have already allowed it. When the warning appears, the last scanned file is ~/Library/Containers/com.apple.CloudPhotosConfiguration/Data. My sample code: let openPanel = NSOpenPanel() openPanel.canChooseDirectories = true openPanel.runModal() let url = openPanel.urls[0] let enumerator = FileManager.default.enumerator(at: url, includingPropertiesForKeys: nil) while let url = enumerator?.nextObject() as? URL { print(url.path) } Is it expected that one has to allow this warning every time the app is run?
9
0
3.6k
Nov ’23
Modifying shellExitAction value in terminal profile
I would like to change the Mac OS terminal settings, shellExitAction value from the default to others value example 0 or 1. I know we can use the defaults command to edit the property list of the terminal. But the value for shellExitAction is nested in the Window Settings value. How to defaults write com.apple.terminal "Window Settings" -string 'Basic { shellExitAction = 2 }; ' correctly? The above I tried is not working and the value does not change.
3
0
75
5d
"UID -2" in btmdump output
Within the output of command "sudo sfltool dumpbtm", in addition to records for UID 0/501/502/..., at the top of the output, there are also records for "UID -2" listed. ======================== Records for UID -2 : FFFFEEEE-DDDD-CCCC-BBBB-AAAAFFFFFFFE ======================== ServiceManagement migrated: true SharedFileList migrated: false LaunchServices registered: false Items: #1: UUID: FC60A3EA-E4B0-4D8C-BA07-1C6E2DF3AA52 Name: (null) Developer Name: (null) Type: developer (0x20) Flags: [ ] (0) Disposition: [disabled, allowed, visible, not notified] (0x2) Identifier: Unknown Developer URL: (null) Generation: 0 Embedded Item Identifiers: #1: 16.com.microsoft.teams.TeamsUpdaterDaemon But a uid with -2 should be invalid, and the guid "FFFFEEEE-DDDD-CCCC-BBBB-AAAAFFFFFFFE" followed looks also strange.
2
0
116
1w
MacCatalyst - How to share Userdefaults between widget and app
Hi, Firstly: The whole question is about MacCatalyst (in IOS it works as intended) In my Maccatalyst app I want to share Userdefaults between app and widget. I have added an app group to the widget and the app and have set up Userdefauls accordingly. Here is the problem: Xcode claims that the app group should start with "group.***" because Catalyst is based on iOS. If I do so, my Catalyst app rises the "App wants to access data from other apps" requester on EVERY launch. So, I can't use it in production. Even if I would accept the requester, the widget isn't able to access the defaults at all because it does not rise that requester, but silently ignores the access. In contrast, if I setup the app group name with our TeamID (instead of group.*) then the requester vanishes, but Xcode does not accept it, issuing a warning and displaying the app group in red. I don't think this is advisable 'state' for production code. Even then widget can't see the data either. What is the recommended way of sharing Userdefaults between Catalyst app and Catalyst Widget (not the iOS widget which displays the "open on iPhone warning" when clicked) on macOS ? Thanks
3
0
144
1w
continue UserActivity in AppDelegate not working after firing completion(INSendPaymentIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity ))
func handle(intent: INSendPaymentIntent, completion: @escaping (INSendPaymentIntentResponse) -> Void) { if let _ = intent.payee, let currencyAmount = intent.currencyAmount { let userActivity = NSUserActivity(activityType: "com.rapipay.nye.test.failure") userActivity.userInfo = ["amount": Int(truncating: currencyAmount.amount!)] completion(INSendPaymentIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity )) return } } func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([any UIUserActivityRestoring]?) -> Void) -> Bool { print("ddddd") return true } this code is perfectly working on simulator and even i fi user userActivity as nil, continue userActivity is called, but on device it is not called Siri is working, asking for name and amount and handler is also called and opens app but does not pass intent or userActivity
5
0
204
3w
Get Text From AppEntity not work
https://medium.com/@giulio.caggegi/use-app-intents-with-ios-16-90a341ccbc94 I create a demo according this article, and add the App Intents in Shortcuts App , then add a Scripting "Get text from ***" , but the result is Empty, how could I modify the AppEntity or add which attribute, so the Scripting "Get text from ***" can get text from the App Intents?
4
0
184
Oct ’24
iOS did not update all widgets of an app when the user press a button on a widget
Hello, I have an app in AppStore "Counter Widget". https://apps.apple.com/app/id1522170621 It allows you to add a widget to your homescreen/lockscreen to count anything. Everything works fine except for one scenario. iOS 18+ I create 2 or more widgets for one counter. For example, medium and small widgets. I click on the widget button to increase or decrease the value. The button in the widget uses Button(intent: AppIntent) to update the value and calls WidgetCenter.shared.reloadAllTimelines() to update the second widget for the same counter. For iOS 18 in this particular scenario, you don't even have to call the WidgetCenter.shared.reloadAllTimelines(). iOS already knows that there is a widget with the same INIntent settings and will update it itself. Both widgets are updated and show the new value. Everything is correct. Now on the homescreen I open the widget configuration for one of the widgets to change the INIntent for the widget. For example, i change the background to wallpaper. This is just a skin for the widget, and the widget is associated with the same counter value as before. As in (2), I click the widget button to increase or decrease the value. But now only one widget is updated. iOS ignores my call to WidgetCenter.shared.reloadAllTimelines() and does not update the second widget connected to the same counter. As I found, iOS, when I call WidgetCenter.shared.reloadAllTimelines() from the widget itself, updates other widgets only if INIntent is absolutely equal for them. Overriding isEqual for them did not help. That is, I cannot specify which fields from my INIntent can be ignored during such an update and consider that widgets are equal and need to be updated. Obviously iOS make this compare outside my code. The main problem is that when the user adds a widget to the lock screen and increases and decreases the value there. After that, he opens the home screen and the widget there is not synchronized with the value from the widget on the lock screen. How to solve this problem?
3
0
133
1w
iOS 18 启动崩溃 main_executable_path_missing
Triggered by Thread: 0 Thread 0 Crashed: 0 dyld 0x1a87922b0 lsl::PreallocatedAllocatorLayout<278528ull>::init(char const**, char const**, void*) + 436 1 dyld 0x1a878ba38 start + 1960 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x2010003030100000 x1: 0x0000000fffffc0d0 x2: 0x0000000000000004 x3: 0x00000001a87607a9 x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x2010003030100000 x9: 0x2010003030100000 x10: 0x000000016d923dfd x11: 0x00000001a87ccf30 x12: 0x0000000000000050 x13: 0x0000000000000044 x14: 0x0000000000052010 x15: 0x0000000000000000 x16: 0x0000000000000000 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x00000001801d0000 x20: 0x000000016d923b50 x21: 0x000000016d923af8 x22: 0x00000001e6184050 x23: 0x000000016d9237d8 x24: 0x0000000fffffc10c x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x0000000000000000 fp: 0x000000016d923870 lr: 0xb0228001a8792130 sp: 0x000000016d9237d0 pc: 0x00000001a87922b0 cpsr: 0x60001000 far: 0x00000001e61840e0 esr: 0x92000047 (Data Abort) byte write Translation fault Binary Images: 0x1a8758000 - 0x1a87db693 dyld arm64e <77c1eed22ed7396aba34e770120d81d4> /usr/lib/dyld 0x1024dc000 - 0x10594ffff 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 crash.log
13
4
914
Sep ’24
Bug with Transferable + AppEntity
Hello all, I'm finding myself with a compile error when trying to use a defined UTType for Transferable conformance when the type is also an AppEntity. The compiler error is Could not determine the identifier of `.todo`. Please use a UTType defined by the UniformTypeIdentifiers framework However, said compiler error only shows up after adding AppEntity conformance. So, in order to reproduce: Create any type, conform to Codable struct Todo: Codable { var id: UUID var title: String var completed: Bool } Create a UTType extension for the new type extension UTType { public static let todo: UTType = UTType(exportedAs: "org.nameghino.types.todo") } Add Transferable conformance extension Todo: Transferable { static var transferRepresentation: some TransferRepresentation { CodableRepresentation(contentType: .todo) ProxyRepresentation(exporting: \.title) } } At this point, the code compiles correctly on Xcode 16.2 beta 2 (16C5013f) Add AppEntity conformance extension Todo: AppEntity { static var typeDisplayRepresentation: TypeDisplayRepresentation = "todo_title" static var defaultQuery = Todo.Query() var displayRepresentation: DisplayRepresentation { DisplayRepresentation(title: "\(title)") } struct Query: EntityQuery { typealias Entity = Todo init() {} func entities(for identifiers: [UUID]) async throws -> [Todo] { return [] } func suggestedEntities() async throws -> [Entity] { return [] } } } Now the code is not compiling with the aforementioned error.
0
0
90
1w
We were unable to review the app because it crashed on launch.
Hello, our app gets rejected as it crashes on launch. According to the logs, it happens because the app attempts to access private-sensitive data. We don't collect any of personal data, so it is probably done by Google Firebase embedded in the app (Core, Firestore, Auth). Maybe you have met similar cases and know any of Firebase settings that disable attempts of accessing privacy-sensitive data? We already set FirebaseDataCollectionDefaultEnabled to NO in info.plist, but it still not enough. Maybe error in facebook sdk? Before that it was written that there was an error when starting the ipad air 5 Log1 Log2 Log3
0
0
90
1w
Error: com.apple.AuthenticationServices.Authorization Error Code 1000
I am getting this error when trying to run the app on an actual IOS device using testFlight. It works well on simulators. I am using expo to build my app. I have done the following: Added Sign in with Apple in Xcode for all the profiles ( i.e. debug and release) Set expo.ios.usesAppleSignIn to true in my app.json ( I think due to this I see Synced capabilities: Enabled: Sign In with Apple while building my app using eas build. ) Make sure that the provision profile has Sign in with App capability. What I am not able to understand is how option provided in provision profile works. Expo creates the profile with type "App Store". I think this is because I am building the expo app with production profile. Does this have to take anything with it? Does the profile with type "App Store" not work when I am testing the app using testFlight? I am so confused right now. Can someone help me figure out the actual issue? I have seen almost all the posts regarding this error. None of those helped! Thanks in advance!
0
0
52
1w
iOS 18.1 crash main_executable_path_missing
Incident Identifier: 81AB2E74-1895-4DA4-9362-AE9E20B13847 Distributor ID: com.apple.AppStore Hardware Model: iPhone16,2 Process: Uplus [16285] Path: /private/var/containers/Bundle/Application/F737D7AC-B933-4204-926C-9149AD377F4B/Uplus.app/Uplus Identifier: com.haier.uhome.Uplus Version: 9.0.0 (2024091802) AppStoreTools: 16A242b AppVariant: 1:iPhone16,2:18 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.haier.uhome.Uplus [4813] Date/Time: 2024-10-29 11:43:30.8727 +0800 Launch Time: 2024-10-29 11:43:30.8707 +0800 OS Version: iPhone OS 18.1 (22B5045g) Release Type: Beta Baseband Version: 2.20.02 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGKILL) Exception Subtype: KERN_PROTECTION_FAILURE at 0x00000001e95280e0 Exception Codes: 0x0000000000000002, 0x00000001e95280e0 VM Region Info: 0x1e95280e0 is in 0x1e9528050-0x1e956c050; bytes after start: 144 bytes before end: 278383 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL mapped file 1e9528000-1e9528050 [ 80] r--/rw- SM=COW Object_id=f1de19db ---> __TPRO_CONST 1e9528050-1e956c050 [ 272K] r--/rw- SM=COW /usr/lib/dyld mapped file 1e956c050-1e9570000 [ 16K] r--/rw- SM=COW Object_id=f1de19db Termination Reason: <0x2A> 2 Triggered by Thread: 0 Thread 0 Crashed: 0 dyld 0x00000001ac079500 0x1ac03f000 + 238848 1 dyld 0x00000001ac072bcc 0x1ac03f000 + 211916 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x2010003030100000 x1: 0x0000000fffffc0d0 x2: 0x0000000000000004 x3: 0x00000001ac047829 x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x2010003030100000 x9: 0x2010003030100000 x10: 0x000000016b917dfd x11: 0x00000001ac0b4240 x12: 0x0000000000000050 x13: 0x0000000000000044 x14: 0x0000000000052010 x15: 0x0000000000000000 x16: 0x0000000000000000 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000182bb0000 x20: 0x000000016b917b50 x21: 0x000000016b917af8 x22: 0x00000001e9528050 x23: 0x000000016b9177d8 x24: 0x0000000fffffc10c x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x0000000000000000 fp: 0x000000016b917870 lr: 0x84028001ac079380 sp: 0x000000016b9177d0 pc: 0x00000001ac079500 cpsr: 0x60001000 esr: 0x92000047 (Data Abort) byte write Translation fault Binary Images: 0x1044e8000 - 0x10795bfff main_executable_path_missing arm64 /main_executable_path_missing 0x1ac03f000 - 0x1ac0c29a3 dyld arm64e /usr/lib/dyld EOF 18.1.crash
1
0
153
1w
macos Objective-C openURL failed
error: Error Domain=NSCocoaErrorDomain Code=256 "The application “Google Chrome” could not be launched because a miscellaneous error occurred." UserInfo={NSURL=file:///Applications/Google%20Chrome.app/, NSLocalizedDescription=The application “Google Chrome” could not be launched because a miscellaneous error occurred., NSUnderlyingError=0x6000038376c0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x6000038349f0 {Error Domain=OSLaunchdErrorDomain Code=112 "Could not find specified domain" UserInfo={NSLocalizedFailureReason=Could not find specified domain}}}}}
1
0
62
1w