Thanks for the clarification. So looks like the solution would be to use an AppEnum with the AppShortcut and potentially have another AppIntent with a Date parameter not exposed as an AppShortcut for use in automations I guess?
Post
Replies
Boosts
Views
Activity
Thanks for looking into this. I do have AppShortcuts.xcstrings in my project already (project default language is English, localization for German).
The phrases do work in the simulator and on device in both languages, but I still get "No Matching Intent" in the latest Xcode Version 16.2 (16C5032a) when trying to use App Shortcuts Preview.
I do have a localized app name (which seems to cause an issue in SiriTipView), so maybe this is related?
@darkpaw the following code is giving me the above error:
struct GetIntent: ForegroundContinuableIntent {
...
@Parameter
var date: Date?
...
}
...
class MyShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: GetIntent(),
phrases: [
"Get \(.applicationName) for \(.date)"
],
shortTitle: "Get",
systemImageName: "calendar")
}
}
Hi @philippeboudreau - weird, for me the phrase is actually localized but SiriTipView inserts the non-localized app name. This results in a phrase which won't work. Invoking the localized phrase with the localized app name works with Siri.
You wrote AppShortcuts.strings - I am using the new AppShortcuts.xcstrings. Maybe this matters?
Now they did show up - not sure why 😂
Thanks, done: FB15518167 (Unit Tests with local notifications time out on Xcode Cloud)
Same problem on iOS 18.0.1 and Xcode 16... FB15508274
My timeline covers 10 days, but if I get new data in my background task which runs overnight, I'd like to reload the timeline.
I was able to verify that code before and after reloadAllTimelines() successfully executes in the background and all my data is updated, but widgets timelines are not ( I share a subset of my data with the Widgets using an App Group and UserDefaults).
Starting the background task in the debugger always works and updates both data and widgets.
Has anybody experimented with shorter timelines, and/or TimelineReloadPolicy.after(), or found any other workarounds yet?
Same thing happens with \.requestReview. I've tried using \.openWindow to open a non-volumetric window. That kind of works. However, dismissing the window immediately crashes, dismissing the window later also closes the review prompt, and there seems to be no way to sense if the user has dismissed the review prompt. So does not seem to be a good workaround. Filed FB15163571 (reviewRequest crashes with volumetric windows)
I have tried different permutation of the suggestions here, but for me neither Button nor Toggle display tooltips on visionOS 2 beta. .help also does not work, unfortunately.
Did anyone got them to work on that platform in a toolbar (mine is attached to a Volume)?
RealityView {
...
}
.toolbar {
ToolbarItemGroup {
...
}
}
Still happens with Xcode 16 beta 3
@bgoncal thanks for posting this. Finally got to change the base SDK and it worked! That said, I am bit puzzled why the iOS built without errors after this change, while visionOS fails the other way around. Maybe someone from Apple Engineering can clarify?
I had a very similar odd issue with my app failing only in macOS with compile time error in Xcode 15.4:
Thread 1: Fatal error: No Observable object of type MyClass found. A View.environmentObject(_:) for MyClass may be missing as an ancestor of this view.
It seems that like you, I had to reinject the object in the view hierarchy - apparently because the view in fullScreenCover would otherwise not inherit the view when running on macOS
var body: some View {
TabView {
...
}
.fullScreenCover(isPresented: $shouldShowMyView) {
MyView()
.environment(myClassInstance)
}
}
Your post helped me resolve the issue - thank you!
FB13851806 (.fullScreenCover closure content does not inherit environement)
I have been able to also reproduce the issue with a Xcode 15.3 template project after adding Apple Vision as a supported destination, configuring Xcode Cloud and adding a TestFlight post-action (without the post-action, the archives succeed). Submitted FB13774427 (Xcode Cloud visionOS archive action fails for iOS template project with Apple Vision added as supported destination.) as this might be a bug. Anybody successfully building these visionOS/iOS hybrid apps with current version Xcode Cloud after including a TestFlight post-action?
The following email references ITMS error numbers:
TMS-90508: Invalid Info.plist value - The value for the key 'DTPlatformName' in bundle DualUse.app is invalid.
ITMS-90039: Type Mismatch - The value for the Info.plist key CFBundleIcons.CFBundlePrimaryIcon is not of the required type for that key. See the Information Property List Key Reference at https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009248-SW1
ITMS-90068: This bundle is invalid - The value provided for the key MinimumOSVersion '17.4' is not acceptable.
ITMS-90512: Invalid sdk value - The value provided for the sdk portion of LC_BUILD_VERSION in DualUse.app/DualUse is 17.4 which is greater than the maximum allowed value of 1.2.
@rkhamilton I noticed today that issues in Berlin I had reported and the issues in your code seem to have been fixed (I wrote some Unit Tests which now fail b/c "Expected failure but none recorded" :) The Apple Park issue still there but maybe will also get fixed soon.
Thanks for sharing! I have seemingly ran into the same issue, with - of all places - Apple Park, Cupertino... The following code fails with status 404. It seems that trying to get any history before that date fails too, whereas getting the history after that date succeeds.
settings.startDate = Calendar.current.date(from: .init(
timeZone: .init(identifier: "America/Los_Angeles"),
year: 2023,
month: 9,
day: 27,
hour: 0,
minute: 0,
second: 0
))!
settings.endDate = Calendar.current.date(from: .init(
timeZone: .init(identifier: "America/Los_Angeles"),
year: 2023,
month: 9,
day: 28,
hour: 0,
minute: 0,
second: 0
))!
settings.locationLatitude = 37.334886
settings.locationLongitude = -122.008988
let location = CLLocation(latitude: settings.locationLatitude, longitude: settings.locationLongitude)
do {
let dayWeather = try await WeatherService.shared.weather(
for: location,
including: .daily(startDate: settings.startDate,
endDate: settings.endDate))
print("Received \(dayWeather.count) DayWeather object(s).")
} catch {
print("WeatherKit Error: \(error.localizedDescription)")
throw error
}