I'm working on an app for an accompanying toy that allows you do drop a marble on a self made track.
As a nice bonus I wanted to make it possible to drop a marble using Siri Shortcuts, Siri or the HomePod. So the new iOS 16 App Intents work great for this.
The App Intent documentation is bare, but I got the App Intent to work and it evens shows a custom error message when something goes wrong,
However I now want to promote the feature. SiriTipUIView is meant for this, however I'm seeing an issue. The application name is missing from the tips UI, instead the phrase starts with a space.
The code for the App Shortcuts
struct MyAppShortcutsProvider: AppShortcutsProvider {
static var appShortcuts = [
AppShortcut(intent: DropMarbleIntent(), phrases: [
"\(.applicationName) drop marble",
"\(.applicationName) drop a marble",
"Drop a \(.applicationName)",
"Drop \(.applicationName)"
])
]
}
The code for the SiriTipUIView (just for testing)
let tipView = SiriTipUIView()
tipView.setIntent(intent: DropMarbleIntent())
tipView.sizeToFitUsingConstraints()
tipView.allowsDismissal = true
presentedSubscription = tipView.publisher(for: \.isPresented).sink { isPresented in
if isPresented == false {
self.tableView.tableHeaderView = nil
}
}
tableView.tableHeaderView = tipView
This happens on any iOS 16 simulator and on an iPhone 13 Pro running the iOS 16 release version.
Am I missing something, or should I report a bug using feedback?
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.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello, any one encounter the issue NSApplicationServices is invalid when uploading TestFlight build?
We are facing an issue with our latest iOS build.
For context, we are trying to add support for the apple watch connectivity with tvOS. After uploading our build, we get the following error:
Invalid Info.plist key. The key 'NSApplicationServices' in bundle myapp.app/Watch/watch.app is invalid.
However, the doc indicates that NSApplicationServices must be declared in the Info.plist file (source: https://developer.apple.com/documentation/devicediscoveryui/connecting_a_tvos_app_to_other_devices_over_the_local_network?changes=_1_7)
Dev environment:
Xcode v14.0 (14A309) to dev and archive
Deployment target: watchOS 6.0 & iOS 13.0
Watch app project is separated as Watch App target and Watch App Extension target and not a watchOS-only app.
Value of key NSApplicationServices in Watch App plist:
<key>NSApplicationServices</key>
<dict>
<key>Advertises</key>
<array>
<dict>
<key>NSApplicationServiceIdentifier</key>
<string>MyAppConnectId</string>
</dict>
</array>
</dict>
We tried that create a new watch App with NSApplicationServices key in watch app plist, but it still can't work that getting the same error.
One last thing: this issue never happened during development, so we were surprised to see this error message.
FYI, the doc we are referring:
https://developer.apple.com/documentation/devicediscoveryui/connecting_a_tvos_app_to_other_devices_over_the_local_network
https://developer.apple.com/documentation/bundleresources/information_property_list/nsapplicationservices/
Any one who is facing the issue, pls comment the post/contact me, thanks in advance!
let myE_mail = "whailong" + "2010" + "@" + "g" + "ma" + "il." + "com"
I'm using the AppIntents framework introduced in iOS 16. My goal is to create an AppIntent that performs a long-running task but does open my app when run. When I run the Intent from the Shortcuts app, I see an error message that says the shortcut "was interrupted because it didn't finish executing in time." Is there a way to signal progress to the user of a long-running AppIntent or get more time from the system prior to the AppIntent being cancelled?
Hello! I believe there is a bug: ShieldConfigurationDataSource extension does not update when the app to be blocked is already open and the ManagedSettingsStore.shield.applications is set to the app that is already open. The shield comes up but has a stale ShieldConfiguration not reflecting the current state of the app is used.
I've been able to replicate the issue in an independent app "OffScreen". If you start a blocking time range from 10:00-10:15, it will say "No Twitter until 10:15" and then open Twitter at 10:15. If there is another blocking time range from 10:16-10:31, the app will be open until 10:16 when the shield will reactivate and it will still say "No Twitter until 10:15" when is should say "No Twitter until 10:31".
thanks!
I'm trying to migrate from Complication with CLKComplication to WidgetKit.
I have implemented the required methods in https://developer.apple.com/documentation/widgetkit/converting-a-clockkit-app, but the migration is not working. There is no evidence that the method for migration is also called.
It was the same with Xcode 14.0.1 and Xcode 14.1RC.
class ComplicationController: NSObject, CLKComplicationDataSource, CLKComplicationWidgetMigrator {
...
@available(watchOS 9.0, *)
var widgetMigrator: CLKComplicationWidgetMigrator {
return self
}
@available(watchOS 9.0, *)
func widgetConfiguration(from complicationDescriptor: CLKComplicationDescriptor) async -> CLKComplicationWidgetMigrationConfiguration? {
return CLKComplicationStaticWidgetMigrationConfiguration(kind: "MyWidget", extensionBundleIdentifier: "com.example.myapp.mywatchkitapp.mywidget")
}
}
What's wrong? Has anyone been able to migrate?
When I tap on one of the buttons in the ShieldAction extension I want to close the shield and open the parent app instead of the shielded app. Is there any way of doing this using the Screen Time API?
class ShieldActionExtension: ShieldActionDelegate {
override func handle(action: ShieldAction, for application: ApplicationToken, completionHandler: @escaping (ShieldActionResponse) -> Void) {
// Handle the action as needed.
let store = ManagedSettingsStore()
switch action {
case .primaryButtonPressed:
//TODO - open parent app
completionHandler(.defer)
case .secondaryButtonPressed:
//remove shield
store.shield.applications?.remove(application)
completionHandler(.defer)
@unknown default:
fatalError()
}
}
}
Topic:
App & System Services
SubTopic:
General
Tags:
Managed Settings
Family Controls
Device Activity
Screen Time
How to play gif in widget? "网易云音乐" and "one widget" can play gif in the widget. can anyone guide me. Thank you
We have implemented Universal Links for iOS.
We have deployed the following file as per the documentation:
/.well-known/apple-app-site-association
Everything works fine until my organization applied domain-level block on traffic out side my country.
We need to whitelist Apple servers but we cannot find their IPs or domains used to access this file.
Hello. I took a closer look at the data I'm getting back for hourly forecasts and I'm baffled by results I'm seeing.
For example, it's Dec 19, 2022 8:00am PT and I'm asking for the weather for Orchard Park NY (lat 42.766437 long -78.743855) for Dec 23, 2022. The daily forecast tells me they're expected to have 5.9" of snow. However, the hourly forecast with the most snow that day is reported as 0.071" (1.8mm). The Apple Weather app on iOS shows that hour as having 0.6".
I wrote a 'for' loop to print the results of my call to WeatherService.shared.weather.
print(oneHour.precipitationAmount.formatted())
print(oneHour.precipitationAmount.description)
print(oneHour.precipitationAmount.unit)
print(oneHour.precipitationAmount.value)
0.071 in
1.8 mm
<_NSStatic_NSUnitLength: 0x2010b0178> mm
1.8
if #available(iOS 16.0, *) {
print("donated")
let intent = BasicIntent()
IntentDonationManager.shared.donate(intent: intent)
}
Trying to test if donations work with the new App Intents framework.
Donating the shortcut once a user taps a button.
The shortcut is not appearing on the lock screen.
Everything else is working as expected. The Shortcut is appearing in the Shortcuts App and is working via Siri.
In developer settings I have
Display Recent Shortcuts -> On
Display Donations on Lock Screen -> On
Allow Any domain -> On
Allow Unverified sources -> On
Running iOS 16.2, iPhone 11.
Hello, I want to echo the DeviceActivityReport "concurrency" problems flagged in https://developer.apple.com/forums/thread/720549, and ask a related question. (Thanks to Kmart and other Apple dev support folks who have been monitoring these forums and responding diligently.)
I would like to display daily and weekly stats in the same view, broken down by specific apps (as in the native Screen Time). However, instantiating multiple DeviceActivityReport objects with different filters and/or different contexts leads to confusion, where the two views will incorrectly and intermittently swap data or duplicate data where it shouldn't (seemingly upon some interval when the extension provides fresh data). There isn't documentation on how to display multiple reports at once. Is the idea that logic for multiple reports should be embedded within the extension itself in the makeConfiguration() function and there should only be a single DeviceActivityReport in the main App, or is this a bug?
Even with a single DeviceActivityReport, I run into inconsistencies where the View provided by the extension takes multiple seconds to load or fails to load altogether. The behavior seems random...I will build the application with the same code multiple times and see different behavior each time.
Finally, a plug for better support in the Simulator for the entire set of Screen Time APIs.
Thanks!
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Screen Time
wwdc2022-110336
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."
I'm writing an app that uses text to speech. On the physical Iphone 12 it works but on the simulator I don't get any speech from my app.
I tried the following to enable.
Settings -> Accessebility -> "Spoken Content" -> "Speak Selecton" to ON (green)
in Voices I added the German Anna that I use on my Iphone with the downloaded enhancements.
The speech test works in this menu but not in my app. What am I missing ?
Cheers,
Gerhard
3.5 weeks ago I submitted form https://developer.apple.com/contact/request/family-controls-distribution to get Family Controls entitlement for my app.
I still not received any feedback at all...
Contacting Support also doesn't help...
Is there any time limits for this request or any average time of waiting for feedback?
Hi,
I'm trying to make use of the Device Activity Labels where you supply an ApplicationToken. I can successfully get it to show the icon + title of the Application (twitter in my case) but I cannot get the styling to work.
// Works
.labelStyle(.iconOnly)
.labelStyle(.titleOnly)
.border(...)

// Does NOT work
.font(.largeTitle)
.foregroundColor(.blue)
I have checked the same style (or just modifiers) against a standard Label and they actually do work in the code below.
// This is an application token. Some style not applied.
Label(targetApp)
.labelStyle(MyStyle())
// Showing the same style using a simple label. All styles correctly applied.
Label("Twitter", systemImage: "video.square.fill")
.labelStyle(MyStyle())
Is changing the font + color of the title for this Label(_ applicationToken:) supported?
Topic:
App & System Services
SubTopic:
General
Tags:
Managed Settings
Family Controls
Device Activity
We have developed a Parental/Self control app using Screen time API.
We have used individual authentication to authorize the app, using the instructions here:
https://developer.apple.com/documentation/familycontrols/authorizationcenter
The problem is , that individual auth can be disabled easily , by the following steps:
enter Settings app.
in Settings app, click on the Parental/Self control app.
click to disable screen time restriction.
show the device owner's face/fingerprint. (or pin code)
Why is that a problem:
Parental control apps, or self-control apps, are about giving control to the software, To make it hard for the user to disable the restrictions.
So using the flow I have introduced above, it's super-easy for a user to disable his Parental control restrictions, which misses the entire point of Parental/Self control idea.
Furthermore, not only the user have the means to unlock his screen time restrictions, he also MUST have the means to unlock it.
This makes Screen time (with individual auth) useless:
I have a code ready to make a great parental control app for my clients, with amazing ideas, but I can't use the Screen time API unless this problem is fixed.
Why child-parent auth is not enough:
My clients are grownups people between ages of 15-40, that are interested in self-control, so they don't have iCloud child accounts.
also, the child-parent auth solution forces my clients to give some control to other person, and my clients prefer their privacy. Some of them prefer self-control and not parental-control.
What I suggest as a solution:
1: Give more options to users how to disable the Screen time restrictions. including:
a second faceID / FingerPrint (that isn't the same as the one used to unlock the device)
a second pin password.
a string password
2: Give the users the option to choose to not have the device's owner Face/Finger/Pincode ID , as a method to disable the Screen time restrictions.
Hi there, I'm presenting a FamilyActivityPicker inside of a sheet, and on some phones, the FamilyActivityPicker freezes and crashes when the user expands the "Other" category only. "Other" is the only category that exhibits this behavior, and it only does this on some phones, not in all cases.
This issue is perfectly reproducible on those phones when using the FamilyActivityPicker for the "other" category only, but on those same phones it does not reproducible in the Native ScreenTime Picker in Settings → ScreenTime → App Limits → Add Limit. I don't have access to these phones as they are user reports, but any guidance here would be deeply appreciated.
More broadly, there are several issues with the FamilyActivityPicker (categories expand on top of each other when multiple are opened, varying behavior with tapping rows vs tapping select bubbles depending on phone size, etc) that the Native ScreenTime Picker doesn't have. Grouping websites as a standalone category is preferable as well. Could we as developers just have access to that one?
Topic:
App & System Services
SubTopic:
General
Tags:
Managed Settings
Family Controls
wwdc2022-110381
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?
The iOS version of the app is functioning correctly on TestFlight, and there are no issues when building the Mac Catalyst version of the app from Xcode. However, when distributing the app to TestFlight for Mac Catalyst, the FFmpegkit library fails to load, resulting in a crash. The crash report indicates that the library is missing and cannot be located in the designated file path.
Specifically, the crash report states that the library could not be loaded from "@rpath/ffmpegkit.framework/ffmpegkit". Despite extensive efforts, I have been unable to resolve this issue.
This is error message in the crash report.
Termination Reason: Namespace DYLD, Code 1 Library missing Library not loaded: @rpath/ffmpegkit.framework/ffmpegkit Referenced from: <9162F8B0-7112-310B-8EDA-59766087927F> /Applications/MyApp.app/Contents/MacOS/MyApp Reason: tried: '/System/Library/Frameworks/ffmpegkit.framework/ffmpegkit' (no such file, not in dyld cache), (security policy does not allow @ path expansion) (terminated at launch; ignore backtrace)
Are there any alternative solutions to resolve this problem?
This is all the things I have already tried:
I tried most of the solutions mentioned in the post below.
https://stackoverflow.com/questions/24333981/ios-app-with-framework-crashed-on-device-dyld-library-not-loaded-xcode-6-beta
I checked the package content found in Testflight and the paths are correctly matching the following /System/Library/Frameworks/ffmpegkit.framework/ffmpegkit
I ran the app scheme as release within Xcode and it build and ran fine with no issues
I manually loaded the signing certificates for mac catalyst and still getting the error
Deleted all derived data
Deleted and reinstalled Xcode and also tried previous Xcode versions.
Deleted the project completely
I'd like to allow users to select apps to shield from a DeviceActivityReport (similar to how Apple's Screen Time Settings activity report allows a user to "add limits" to a selected app in the report.
What I need to do is pass an appToken from the DeviceActivityReportExtension to my app.
I realize the extension is sandboxed and doesn't allow "private" data to be seen outside of the sandbox. The docs state:
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.
However, tokens aren't "sensitive".
I want to pass a token set out of the sandboxed extension so users can select certain apps from the report that my app can use for setting limits, etc.
I thought using App Groups and saving data with UserDefaults with a suiteName for my app group would do it, but it doesn't appear to allow me to pass the token data.
Yes I'm using the same KEY for both as I set a config enum to ensure it's the same and I can pass tokens successfully between other extensions/apps in the app group, but not the report extension.
It seems the app and the extension have their own stores as the report extension can write to and read from a store but despite being the same suiteName, other apps in the app group don't get or send data to the Report Extension. I realize this is probably due to the design with the sandbox to protect user privacy, however it seems an exception should be made for passing tokens (or even better allow passing through another method like a callback, etc).
Is there ay way to accomplish passing a token from the sandboxed report extension to my app?