Post

Replies

Boosts

Views

Activity

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})
Aug ’22
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.
Feb ’23
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?
Oct ’23