Post

Replies

Boosts

Views

Activity

Accented application name is not recognized in App Shortcuts phrases
Hello, I am trying to set up App Shortcuts with App Intents in my app, which has an accent (é) in the name. It seems that with an accented application name (e.g. "Démo"), shortcuts phrases are not recognized by Siri or with the "App Shortcuts Preview" tool in Xcode. public struct DemoAppShortcuts: AppShortcutsProvider { public static var appShortcuts: [AppShortcut] { AppShortcut( intent: OpenDemoIntent(), phrases: [ "Find the tests in \(.applicationName)", ], shortTitle: "Find tests", systemImageName: "location" ) } } With Siri, when saying the phrase "Find the tests in Démo", the shortcut is not launched I tried with the "App Shortcuts Preview" tool in Xcode, it does not match any Intent. (see screenshot) I set up App Name synonyms as a workaround but it seems to not always work. Has anyone encountered this problem ? Is there any other workaround ? Is this a bug with iOS 27 / Xcode 27 ? I filed a feedback FB23791964 with an Xcode Project
4
0
268
2w
SwiftData query returns "private" string in WidgetExtension
Hello, I am trying to set up Widgets in my app. I want to fetch my data in the SwiftData container that is shared between my app and my WidgetExtension with App Group. let modelContext = ModelContext(modelContainer) let predicate = #Predicate<Test>{ return $0.attribute == true } return try modelContext.fetch(FetchDescriptor (predicate: predicate, sortBy: [SortDescriptor(\Test.name)])) When this code is run in my WidgetExtension, returned objects attributes values are replaced with "" string. In the logs, Swift Data writes Query returned unrequested identifiers that have been dropped: <private> Any idea what I might be doing wrong to share my SwiftData between my App and my Widget? App Groups capability has been added to both apps and extension with the same identifier. Thank you
2
0
257
2w
iOS 18 new ControlWidgetButton custom image/icon/symbol not displayed
Hello, I am trying to create a custom control with the new WidgetKit control widget APIs. In my custom control, I want to display a custom image, in fact a custom symbol. The custom symbol is not displayed with latest iOS 18 Seed 7 (22A5346a). Only system symbols are displayed. I don't find any information about it in the WidgetKit Apple Developer Documentation. ControlWidgetButton(action: MyIntent()){ Label(title: { Text("My Custom Control") }, icon: { Image("mycustomsymbol") //NOT DISPLAYED // Image(systemName: "rectangle.portrait.inset.filled") IS DISPLAYED }) } There was no issue with custom symbols in beta 4. Now since beta 5, custom symbols are not displayed. I wonder if this is a bug or this is intended. Can you help me ? I filed a feedback FB14888220 Thank you
5
2
1.3k
Nov ’24
SwiftUI : NavigationStack in new iOS 18 TabView pushes twice when path in parameter
Hello, With iOS 18, when NavigationStack is in new TabView, with path parameter containing current navigation state is set, the navigation destination view is pushed twice. See below with example that pushes twice on iOS 18 but is correct on iOS 17 @MainActor class NavigationModel: ObservableObject { static let shared = NavigationModel() @Published var selectedTab: String @Published var homePath: [Route] @Published var testPath: [Route] } struct ContentView: View { @StateObject private var navigationModel: NavigationModel = NavigationModel.shared var body: some View { TabView(selection: $navigationModel.selectedTab){ HomeView() .tabItem { Label("Home", systemImage: "house") } .tag("home") TestView() .tabItem { Label("Test", systemImage: "circle") } .tag("test") } } } struct HomeView: View { @StateObject private var navigationModel: NavigationModel = NavigationModel.shared var body: some View { NavigationStack(path: $navigationModel.homePath){ VStack{ Text("home") NavigationLink(value: Route.test1("test1")){ Text("Go to test1") } } .navigationDestination(for: Route.self){ route in NavigationModelBuilder.findFinalDestination(route:route) } } } } I don't what causes the issue because it works well on iOS 16 and iOS 17. I think the path is somehow reset but I don't why (maybe by the TabView ?) Note that the bug only occurs with TabView. Don't really know if it is a TabView bug or if it is on my side. I filed a feedback with sample project FB14312064
34
11
7.4k
Oct ’24
Accented application name is not recognized in App Shortcuts phrases
Hello, I am trying to set up App Shortcuts with App Intents in my app, which has an accent (é) in the name. It seems that with an accented application name (e.g. "Démo"), shortcuts phrases are not recognized by Siri or with the "App Shortcuts Preview" tool in Xcode. public struct DemoAppShortcuts: AppShortcutsProvider { public static var appShortcuts: [AppShortcut] { AppShortcut( intent: OpenDemoIntent(), phrases: [ "Find the tests in \(.applicationName)", ], shortTitle: "Find tests", systemImageName: "location" ) } } With Siri, when saying the phrase "Find the tests in Démo", the shortcut is not launched I tried with the "App Shortcuts Preview" tool in Xcode, it does not match any Intent. (see screenshot) I set up App Name synonyms as a workaround but it seems to not always work. Has anyone encountered this problem ? Is there any other workaround ? Is this a bug with iOS 27 / Xcode 27 ? I filed a feedback FB23791964 with an Xcode Project
Replies
4
Boosts
0
Views
268
Activity
2w
SwiftData query returns "private" string in WidgetExtension
Hello, I am trying to set up Widgets in my app. I want to fetch my data in the SwiftData container that is shared between my app and my WidgetExtension with App Group. let modelContext = ModelContext(modelContainer) let predicate = #Predicate<Test>{ return $0.attribute == true } return try modelContext.fetch(FetchDescriptor (predicate: predicate, sortBy: [SortDescriptor(\Test.name)])) When this code is run in my WidgetExtension, returned objects attributes values are replaced with "" string. In the logs, Swift Data writes Query returned unrequested identifiers that have been dropped: <private> Any idea what I might be doing wrong to share my SwiftData between my App and my Widget? App Groups capability has been added to both apps and extension with the same identifier. Thank you
Replies
2
Boosts
0
Views
257
Activity
2w
iOS 18 new ControlWidgetButton custom image/icon/symbol not displayed
Hello, I am trying to create a custom control with the new WidgetKit control widget APIs. In my custom control, I want to display a custom image, in fact a custom symbol. The custom symbol is not displayed with latest iOS 18 Seed 7 (22A5346a). Only system symbols are displayed. I don't find any information about it in the WidgetKit Apple Developer Documentation. ControlWidgetButton(action: MyIntent()){ Label(title: { Text("My Custom Control") }, icon: { Image("mycustomsymbol") //NOT DISPLAYED // Image(systemName: "rectangle.portrait.inset.filled") IS DISPLAYED }) } There was no issue with custom symbols in beta 4. Now since beta 5, custom symbols are not displayed. I wonder if this is a bug or this is intended. Can you help me ? I filed a feedback FB14888220 Thank you
Replies
5
Boosts
2
Views
1.3k
Activity
Nov ’24
SwiftUI : NavigationStack in new iOS 18 TabView pushes twice when path in parameter
Hello, With iOS 18, when NavigationStack is in new TabView, with path parameter containing current navigation state is set, the navigation destination view is pushed twice. See below with example that pushes twice on iOS 18 but is correct on iOS 17 @MainActor class NavigationModel: ObservableObject { static let shared = NavigationModel() @Published var selectedTab: String @Published var homePath: [Route] @Published var testPath: [Route] } struct ContentView: View { @StateObject private var navigationModel: NavigationModel = NavigationModel.shared var body: some View { TabView(selection: $navigationModel.selectedTab){ HomeView() .tabItem { Label("Home", systemImage: "house") } .tag("home") TestView() .tabItem { Label("Test", systemImage: "circle") } .tag("test") } } } struct HomeView: View { @StateObject private var navigationModel: NavigationModel = NavigationModel.shared var body: some View { NavigationStack(path: $navigationModel.homePath){ VStack{ Text("home") NavigationLink(value: Route.test1("test1")){ Text("Go to test1") } } .navigationDestination(for: Route.self){ route in NavigationModelBuilder.findFinalDestination(route:route) } } } } I don't what causes the issue because it works well on iOS 16 and iOS 17. I think the path is somehow reset but I don't why (maybe by the TabView ?) Note that the bug only occurs with TabView. Don't really know if it is a TabView bug or if it is on my side. I filed a feedback with sample project FB14312064
Replies
34
Boosts
11
Views
7.4k
Activity
Oct ’24