I have built an iOS keyboard extension, before it is installed the system prefered language is "English" like so:
After installing the keyboard extension the system language is set to "Corsican", like so:
Corsican is being set because the bundle identifiers start with co. which maps to the ISO 639-1 language code for Corsican co. I've verified that my PrimaryLanguage is en-US, see below a section of Info.Plist. I've verified the bundle ID is the root cause by changing the bundle ID to something not starting with co and this behaviour disappears.
...
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>IsASCIICapable</key>
<false/>
<key>PrefersRightToLeft</key>
<false/>
<key>PrimaryLanguage</key>
<string>en-US</string>
<key>RequestsOpenAccess</key>
<false/>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.keyboard-service</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).KeyboardViewController</string>
</dict>
...
This seems like a bug in iOS. Any suggestions what to try?
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.
Post
Replies
Boosts
Views
Activity
This is two vidoes of my experiment.
1
https://www.icloud.com/iclouddrive/07ej0mpZrbSNBOs19Oe2aBJdA#1
2
https://www.icloud.com/iclouddrive/0374kZzcwF769LtxzsSCfkl8A#2
Havn't test on Apple Silicon Macs
Hello,
PMSessionValidatePrintSettings return always "false" on macOS
PMPrintSettings settings;
PMPrintSession session;
Boolean result;
PMCreateSession(&session);
PMSessionSetCurrentPMPrinter(session, printer);
PMCreatePrintSettings(&settings);
PMSessionDefaultPrintSettings(session, settings);
PMSetDuplex(settings, kPMDuplexTumble);
PMSessionValidatePrintSettings(session, settings, &result);
PMRelease(session);
PMRelease(settings);
if (result) NSLog (@"%@", @"changed");
else NSLog (@"%@", @"not changed");
Thanks
We are facing a serious issue affecting the Live Activity of the our app. If the app is built with Xcode 16 (16A242) the Live Activity does not appear on devices running iOS 17. The live activity does appear on devices running iOS 18 RC.
If we build the code with Xcode 15, the Live Activity appears on iOS 17 as expected.
To investigate this we also prepared a demo bare-bones project to make sure the Live Activity presence is not affected by part of the existing code. Again the issue appears even of the demo app.
Is this a known issue with Xcode16/iOS 18?
Hello there, I try to add universal links to my app but get some problems. When I started researching how I can test it I found a lot of talks about App Search API Validation Tool. But this service is not open for me, I'm always redirected to the home page. Is there something wrong with me or is this service not working at all?
The following code runs fine on iPhone with iOS < 18
However with iOS 18 (Release Candidate) it causes a crash of the extension
extension MessageFilterExtension: ILMessageFilterQueryHandling, ILMessageFilterCapabilitiesQueryHandling {
@available(iOSApplicationExtension 16.0, *)
func handle(_ capabilitiesQueryRequest: ILMessageFilterCapabilitiesQueryRequest, context: ILMessageFilterExtensionContext, completion: @escaping (ILMessageFilterCapabilitiesQueryResponse) -> Void) {
let response = ILMessageFilterCapabilitiesQueryResponse()
response.promotionalSubActions = [ILMessageFilterSubAction.promotionalOffers]
completion(response)
}
The problem specifically is the line:
response.promotionalSubActions = [ILMessageFilterSubAction.promotionalOffers]
Attempting to set a promotionalSubAction (or a transactional sub action) results in an exception with error:
'/usr/lib/swift/libswiftIdentityLookup.dylib' (no such file)`
This only occurs with iOS 18, and it doesn't occur if no subactions are set
We have a sandboxed Final Cut Pro (FCP) workflow extension that needs to control FCP to export the current video project.
When executing an AppleScript, we encounter the error: "System Events got an error: FCPExtension (Final Cut Pro) is not allowed assistive access."
This occurs despite the container app having been granted automation and accessibility permissions by the user.
What could be missing from the project to ensure the script runs without issues?
AppleScript:
shareDestination("Destination")
on shareDestination(_dest)
tell application "Final Cut Pro"
activate
end tell
tell application "System Events"
set frontmost of process "Final Cut Pro" to true
tell process "Final Cut Pro"
perform action "AXRaise" of (first window whose name contains "Final Cut Pro")
click menu bar 1
tell menu bar 1
tell item 3 of menu bar items
tell menu 1
tell menu item 12
tell menu 1
set menuItems to menu items whose title is (_dest & "…")
if length of menuItems > 0 then
set targetMenuItem to item 1 of menuItems
if enabled of targetMenuItem then
try
click targetMenuItem
on error errMsg number errNum
error errMsg
end try
else
error "Share destination is not enabled." & return & "Please try selecting an item in Final Cut Pro."
end if
else
error "Share destination not found."
end if
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end shareDestination
As soon as the script reaches set frontmost of process "Final Cut Pro" to true it launches the error.
Hi,
I am trying to migrate my custom intents to App Intents, and was running into some issues. My current intentdefinitions file and all intent handling code are in a framework that is shared with my app target. I went through the migration assistant and added the App Intents codes directly to my main app target. When I run a shortcut with the App Intent, it doesn't work ... I get some messages in the console that say:
Could not find an intent with identifier MyCustomAddContactIntent, mangledTypeName: Optional("")
I guess the old custom intents and new App Intents should both live in the same package to see each other. In this case, I'm not sure if all the existing custom intents file and all the intents handler logic should be moved into the main app bundle (and removed from framework), or should I add the new App Intents handlers into the framework (in addition to the main app)?
Also, will the custom framework even be needed or run in iOS16+?
Thanks.
I show some content in LiveActivity Dynamic Island and added a button. As buttons work with App Intent I created an Intent. When the button is clicked I get the following error
Could not find an intent with identifier MyIntent, mangledTypeName: Optional("19LiveWidgetExtension10MyIntentV")
MyIntent.swift
import Foundation
import AppIntents
struct MyIntent: LiveActivityIntent {
public init() { }
func perform() async throws -> some IntentResult {
print("click")
return .result()
}
}
MyLiveActivity.swift
...
DynamicIslandExpandedRegion(.bottom) {
HStack(alignment: .top) {
Button(intent: MyIntent()) {
Image(systemName: "bolt.fill")
}
}
.tint(.white)
.padding()
}
....
The Intent is added to all targets. Any ideas?
I have edited the default widget with Intent, but am being hit with the following errors… it runs perfectly fine if I don’t use an Intent in a static widget
Could not find an intent with identifier ConfigurationAppIntent, mangledTypeName: Optional("27trainWidgetsConfigExtension22ConfigurationAppIntentV")
associateAppIntent(forUserActivity:) Error converting INIntent to App Intent: AppIntents.PerformIntentError.intentNotFound
I think it may be something to do with Info.plist?
I was adding WidgetExtension target for my old project.
The widget target is running fine in iOS 17, In my case, widget need to support iOS 14 and above, so I updated my widget code to old style, To removing WidgetConfigurationIntent and AppIntentTimelineProvider.
import WidgetKit
import SwiftUI
struct Provider: TimelineProvider {
func placeholder(in context: Context) -> SimpleEntry {
SimpleEntry()
}
func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> Void) {
completion(SimpleEntry())
}
func getTimeline(in context: Context, completion: @escaping (Timeline<SimpleEntry>) -> Void) {
completion(Timeline(entries: [SimpleEntry()], policy: .never))
}
typealias Entry = SimpleEntry
}
struct SimpleEntry: TimelineEntry {
let date: Date = Date()
}
struct NCWidgetEntryView : View {
var entry: Provider.Entry
var body: some View {
VStack {
Text("Time:")
Text(entry.date, style: .time)
}
}
}
struct NCWidget: Widget {
let kind: String = "NCWidget"
var body: some WidgetConfiguration {
StaticConfiguration(kind: kind, provider: Provider()) { entry in
NCWidgetEntryView(entry: entry)
}
.configurationDisplayName("DisplayName")
.description("description")
}
}
In my case, the code was working fine in iOS 17 simulator, But if I try to run in iOS 15, it returns the below error
code-SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.name-pprd.NCWidgetExtension' error: Error Domain=FBSOpenApplicationServiceErrorDomain Code=5 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedDescription=The request to open "com.apple.springboard" failed., NSLocalizedFailureReason=Unexpected error type., NSUnderlyingError=0x600003570b40 {Error Domain=BSServiceConnectionErrorDomain Code=3 "XPC error received on message reply handler" UserInfo={BSErrorCodeDescription=OperationFailed, NSLocalizedFailureReason=XPC error received on message reply handler}}, BSErrorCodeDescription=InvalidResponse}." UserInfo={NSLocalizedDescription=Failed to show Widget 'com.name-pprd.NCWidgetExtension' error: Error Domain=FBSOpenApplicationServiceErrorDomain Code=5 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedDescription=The request to open "com.apple.springboard" failed., NSLocalizedFailureReason=Unexpected error type., NSUnderlyingError=0x600003570b40 {Error Domain=BSServiceConnectionErrorDomain Code=3 "XPC error received on message reply handler" UserInfo={BSErrorCodeDescription=OperationFailed, NSLocalizedFailureReason=XPC error received on message reply handler}}, BSErrorCodeDescription=InvalidResponse}., NSUnderlyingError=0x600003570bd0 {Error Domain=FBSOpenApplicationServiceErrorDomain Code=5 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedDescription=The request to open "com.apple.springboard" failed., NSLocalizedFailureReason=Unexpected error type., NSUnderlyingError=0x600003570b40 {Error Domain=BSServiceConnectionErrorDomain Code=3 "XPC error received on message reply handler" UserInfo={BSErrorCodeDescription=OperationFailed, NSLocalizedFailureReason=XPC error received on message reply handler}}, BSErrorCodeDescription=InvalidResponse}}}
Domain: DTXMessage
Code: 1
User Info: {
DVTErrorCreationDateKey = "2024-07-20 17:30:58 +0000";
}
--
System Information
macOS Version 14.5 (Build 23F79)
Xcode 15.0.1 (22266) (Build 15A507)
Timestamp: 2024-07-20T23:00:58+05:30
In widget target Minimum target is 14.0
In App target Minimum target is 13.0
I'm working on Authenticating a User Through a Web Service and using https callback.
When running the project on real device all works as expected, but when I run the same project with the same config on simulator I get this error:
Login failed: Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=1 "Application with identifier bundle_id is not associated with domain my_domain. Using HTTPS callbacks requires Associated Domains using the webcredentials service type for my_domain." UserInfo={NSLocalizedFailureReason=Application with identifier bundle_id is not associated with domain my_domain. Using HTTPS callbacks requires Associated Domains using the webcredentials service type for my_domain.}
Xcode 15.4
iOS 17.5
@available(iOS 17.4, *)
public init(url URL: URL, callback: ASWebAuthenticationSession.Callback, completionHandler: @escaping ASWebAuthenticationSession.CompletionHandler)
⬇️ ANYONE ON APPLE'S SCREEN TIME TEAM, PLEASE READ THIS ⬇️
Let's summarize the situation.
3rd-party apps with screen time access can be disabled by going to Settings > Screen Time > Apps with Screen Time Access. That's fine.
Now, if I want to make it harder to remove my restrictions, I can ask a friend to enter a Screen Time Passcode for me. Great idea!
The problem is my Screen Time Passcode isn't requested when disabling permissions for a third-party app. It's required for modifying any other Screen Time setting EXCEPT permissions for 3rd party apps.
This is frustrating. The Screen Time passcode is a great feature. Making it compatible with permissions granted through the Family Controls framework is our NUMBER ONE REQUEST from tens of thousands of users.
This feature has been requested for a long time (iOS 16, iOS 17, …):
https://forums.developer.apple.com/forums/thread/714651
https://forums.developer.apple.com/forums/thread/727291
https://discussions.apple.com/thread/255421819
FB13548526
If you're a developer working on Screen Time, share your feedback below or file one using Feedback Assistant.
It is very disappointing to see it wasn't implemented for iOS 18. I can't believe this would require tremendous work from the Screen Time team to make it happen, but it would be a significant improvement for the Family Controls Framework and a ray of sunshine for all the developers who have worked really hard to deliver high-quality apps using the Screen Time API.
Could an Apple engineer or a Screen Time team member give us any updates? Implementing this before the public release of iOS 18 would make A LOT of developers happy.
iOS 16.4 and 17.2.1
Hello, I've been developing the universal link for my mobile application and I can't actually get the app to open when the link is tapped.
I went through some trial and error.. but here's my current status:
testing my url in settings -> developer -> associated domains shows that my link should open an installed application
sysdiagnose logs show that everything looks good there:
Service: applinks
App ID: 1234abcd.com.example
Domain: example.com
User Approval: unspecified
Site/Fmwk Approval: approved
Last Checked: 2023-08-24 10:09:00 +0000
Next Check: 2023-08-18 21:00:19 +0000
The only thing that indicates an error of some kind is the console logs during install..
when filtering on swcd it shows an error for Error getting enterprise-managed associated domains data. If this device is not enterprise-managed, this is normal: Error Domain=SWCErrorDomain Code=1701 UserInfo={Line=231, Function=<private>}
I'm not sure if this is a managed device - my understanding is that managed devices allow enterprise businesses to operate the device remotely essentially (send files, run commands, etc). To my knowledge, this isn't enterprise managed device. It is listed in the devices page in my company's developer account, but we are a smaller shop, definitely not enterprise.
I added the associated domain/app link via xcode, and it generated the entitlements file for me.
<key>com.apple.developer.associated-domains.mdm-managed</key>
<true/>
switching that to false breaks the build:
Provisioning profile "iOS Team Provisioning Profile: <mydomain>.<myapp>.dev" doesn't match the entitlements file's value for the com.apple.developer.associated-domains.mdm-managed entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update.
Removing it all together builds fine but doesn't allow me to open the app with a link.
The other thing that looks off is an output in the logs filtered on swcd for Developer mode enabled: No but clearly I've enabled developer mode on the phone.
I've pasted my link into my notes app and am attempting to open it from there
If anyone can help me figure out what the disconnect is here, it would be greatly appreciated!
手表快捷指令,执行报错
Cannot send with an inactive account
iOS 17.6.1 WatchOS 10.6.1
WatchAPP安装完毕之后,未登录,可以进入执行,提示 “未登录”
WatchAPP登录后,提示 “Apple Watch无法运行快捷指令,与App通信出现问题”
I'd like to build an AppIntent where the parameters are included in the initial invocation.
First-party example "Set a timer for 10 minutes" immediately sets new timer using the parameter 10 minutes.
Is this possible via AppIntents? Or do we have to invoke with "Set a timer" then give parameters via dialog: "for how long"? with user replying "10 minutes."
My app is mostly implemented in UIKit. Will AppIntents work with UIKit? If so, which (scene or app) delegate method gets called to start the intent?
Our app uses a 24-hour DeviceActivityMonitor repeating schedule to send users notifications for every hour of screen time they spend on their phone per day. Notifications are sent from eventDidReachThreshold callbacks at 1, 2, 3, etc, hour thresholds to keep them aware of their screen time.
We have recently received an influx of emails from our users that after updating to iOS 17.6.1 their DeviceActivityMonitor notifications are saying their screen time was much higher than what is shown in DeviceActivityReport and their device's Screen Time settings.
These users have disabled "Share Across Devices" - but I suspect the DeviceActivityMonitor is still getting screen time from their other devices even though that setting is turned off.
Has anybody else noticed this, understands what is causing this, or could recommend a fix that we can tell our users to do?
I am trying to use CPVoiceControlState and include an animated image, but for the life of me I cannot figure out what sort of image it wants. I have tried animated .gif, .png, a static image, an image sequence and none seem to animate.
Here is what I am using with an animated .png:
func showLoadingTemplate() {
enum VoiceControlStates: String {
case loading = "loading"
}
let spinner = UIImage(named: "spinner")
loadingTemplate = CPVoiceControlTemplate(voiceControlStates: [
CPVoiceControlState(identifier: VoiceControlStates.loading.rawValue, titleVariants: [NSLocalizedString("Loading...", comment: "CarPlay: Loading")], image: spinner, repeats: true)
])
loadingTemplate?.activateVoiceControlState(withIdentifier: VoiceControlStates.loading.rawValue)
if let loading = loadingTemplate {
currentInterfaceController?.presentTemplate(loading, animated: true, completion: { (result: Bool, error: Error?) in
})
}
}
This shows the image but it isn't animating.
Can anyone let me know what sort of image needs to be used in order to get it to animate? I have seen animated images working in Waze and Google Maps so if must be possible.