Post

Replies

Boosts

Views

Activity

Reply to WidgetConfiguration with AppEnum and When clausole on AppIntent
Update: As a last resort, I tried a totally different approach involving the use of a custom AppEntity type, like follow: struct WidgetMode: AppEntity, Equatable { var id: Int static var defaultQuery = WidgetQuery() static var typeDisplayRepresentation: TypeDisplayRepresentation = TypeDisplayRepresentation(name: LocalizedStringResource("Mode")) var displayRepresentation: DisplayRepresentation { switch id { case 0: return DisplayRepresentation(title: LocalizedStringResource("Favorites")) case 1: return DisplayRepresentation(title: LocalizedStringResource("Recents")) case 2: return DisplayRepresentation(title: LocalizedStringResource("Categories")) case 3: return DisplayRepresentation(title: LocalizedStringResource("Collections")) default: return DisplayRepresentation(title: LocalizedStringResource("Unknown")) } } } struct WidgetQuery: EntityQuery { func entities(for identifiers: [Int]) async throws -> [WidgetMode] { [0, 1, 2, 3].map({ WidgetMode(id: $0)}) } func suggestedEntities() async throws -> [WidgetMode] { [0, 1, 2, 3].map({ WidgetMode(id: $0)}) } } struct ConfigurationAppIntent: WidgetConfigurationIntent { static var title: LocalizedStringResource = "Configuration" static var description = IntentDescription("Choose what to show") @Parameter(title: LocalizedStringResource("Show")) var widgetMode: WidgetMode @Parameter (title: "Category") var category: CategoryDetail? static var parameterSummary: some ParameterSummary { When(\.$widgetMode, .equalTo, WidgetMode(id: 2)) { Summary { \.$widgetMode \.$category } } otherwise: { Summary { \.$widgetMode } } } } But result is always the same: the widget changes the widgetMode option according to the AppEntity custom type, but the When clausole is never honoured. Please, anyone can help us into the right direction? Is it a bug on iOS17?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’23
Reply to ASWebAuthenticationSession with Universal link never dismiss the sign-in screen
UniversalLink and redirectURI are different things. OAuth standard protocol assumes that once the authentication part on the ASWebAuthenticationSession panel is completed successfully, the backend will redirect you to the URI indicated into the redirectURI parameter you used to instruct the request for the ASWebAuthenticationSession. If this doesn't happen for any reason (like a 302 on the redirectURI), then the ASWebAuthenticationSession isn't completed and your call back is never called.
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’23
Reply to Xcode 14 Beta 3 is constantly getting an error with WeatherKit
Same issue is still present in b5. No way to get a valid result. Everything is correctly configured and with b2 we was able to get results on sim, running Xcode14b2. Now we receive always the following 2022-08-10 23:25:32.849941+0200 Where To[42790:8192039] [WeatherService] Encountered an error when fetching weather data subset; location=<+41.91643209,+12.52443409> +/- 0.00m (speed -1.00 mps / course -1.00) @ 10/08/22, 23:25:29 Ora legale dell’Europa centrale, error=xpcConnectionFailed(Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.weatherkit.authservice" UserInfo={NSDebugDescription=connection to service named com.apple.weatherkit.authservice})
Topic: App & System Services SubTopic: General Tags:
Aug ’22
Reply to Not seeing any recent crash reports although there should be some
Same, happening from today. My FB16621165
Replies
Boosts
Views
Activity
Feb ’25
Reply to Why is willPresentNotification called twice here?
Running Xcode 16.1 (16B40) and everything is fixed now.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Does HealthKit in iOS 17 provide any APIs related to mood tracking?
Any news on that? Seems that still on iOS18b3 those informations are not available, yet.
Replies
Boosts
Views
Activity
Jul ’24
Reply to AsyncImage - Cancelled Loading before View is Visible
Can anyone confirm that the problem is still present on iOS17.2 / Xcode15.1?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to WidgetConfiguration with AppEnum and When clausole on AppIntent
Update: As a last resort, I tried a totally different approach involving the use of a custom AppEntity type, like follow: struct WidgetMode: AppEntity, Equatable { var id: Int static var defaultQuery = WidgetQuery() static var typeDisplayRepresentation: TypeDisplayRepresentation = TypeDisplayRepresentation(name: LocalizedStringResource("Mode")) var displayRepresentation: DisplayRepresentation { switch id { case 0: return DisplayRepresentation(title: LocalizedStringResource("Favorites")) case 1: return DisplayRepresentation(title: LocalizedStringResource("Recents")) case 2: return DisplayRepresentation(title: LocalizedStringResource("Categories")) case 3: return DisplayRepresentation(title: LocalizedStringResource("Collections")) default: return DisplayRepresentation(title: LocalizedStringResource("Unknown")) } } } struct WidgetQuery: EntityQuery { func entities(for identifiers: [Int]) async throws -> [WidgetMode] { [0, 1, 2, 3].map({ WidgetMode(id: $0)}) } func suggestedEntities() async throws -> [WidgetMode] { [0, 1, 2, 3].map({ WidgetMode(id: $0)}) } } struct ConfigurationAppIntent: WidgetConfigurationIntent { static var title: LocalizedStringResource = "Configuration" static var description = IntentDescription("Choose what to show") @Parameter(title: LocalizedStringResource("Show")) var widgetMode: WidgetMode @Parameter (title: "Category") var category: CategoryDetail? static var parameterSummary: some ParameterSummary { When(\.$widgetMode, .equalTo, WidgetMode(id: 2)) { Summary { \.$widgetMode \.$category } } otherwise: { Summary { \.$widgetMode } } } } But result is always the same: the widget changes the widgetMode option according to the AppEntity custom type, but the When clausole is never honoured. Please, anyone can help us into the right direction? Is it a bug on iOS17?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Reply to SwiftUI NavigationView pops back when updating observableObject
Unfortunately, the solution proposed doesn't work in the same scenario on watchOS 9+
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to ASWebAuthenticationSession with Universal link never dismiss the sign-in screen
UniversalLink and redirectURI are different things. OAuth standard protocol assumes that once the authentication part on the ASWebAuthenticationSession panel is completed successfully, the backend will redirect you to the URI indicated into the redirectURI parameter you used to instruct the request for the ASWebAuthenticationSession. If this doesn't happen for any reason (like a 302 on the redirectURI), then the ASWebAuthenticationSession isn't completed and your call back is never called.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to Xcode 14 Beta 3 is constantly getting an error with WeatherKit
Same issue is still present in b5. No way to get a valid result. Everything is correctly configured and with b2 we was able to get results on sim, running Xcode14b2. Now we receive always the following 2022-08-10 23:25:32.849941+0200 Where To[42790:8192039] [WeatherService] Encountered an error when fetching weather data subset; location=<+41.91643209,+12.52443409> +/- 0.00m (speed -1.00 mps / course -1.00) @ 10/08/22, 23:25:29 Ora legale dell’Europa centrale, error=xpcConnectionFailed(Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.weatherkit.authservice" UserInfo={NSDebugDescription=connection to service named com.apple.weatherkit.authservice})
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to App Clips in Custom Apps for Employees
Hi there, resurrecting this thread to know if there's any change with iOS14, iOS15 that make App Clip available for App Store Connect + Apple Business Manager + MDM. Thanks in advance, -- c.
Replies
Boosts
Views
Activity
Nov ’21
Reply to How do you return a Publisher error?
Something like that, should work for your specific need. func fetchFeeds() -> AnyPublisher<Any, Error> { guard let feedsURL = feedsURL else { return Fail(error: NSError(domain: "Missing Feed URL", code: -10001, userInfo: nil)).eraseToAnyPublisher() } ... }
Replies
Boosts
Views
Activity
Oct ’21