Post

Replies

Boosts

Views

Activity

Reply to WidgetCenter.shared.reloadAllTimelines() only works when app is in the foreground
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?
Oct ’24
Reply to How do you request a review in a volumetric app?
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)
Sep ’24
Reply to No ObservableObject of type AuthViewModel found, but only on Mac
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)
Jun ’24
Reply to Xcode Cloud Archive - visionOS fails with Info.plist errors?
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.
May ’24
Reply to WeatherKit always fails with 404 for specific lat/long/dates with forecastDaily
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 }
Mar ’24
Reply to Xcode Cloud git push does not trigger a build at all?
For the last 48h hours I have tried to get it to work with no success (including disconnecting, deleting all Xcode Cloud data etc. and starting from scratch). Whereas yesterday evening it did not work, today it miraculously started to work after a push. One thing I have noticed: previously, when I was starting a workflow manually, I had to select "All" rather than "Mine" - see picture. Now the main branch is showing up as "Mine".
Feb ’24
Reply to Bounce a virtual object off real world wall?
While I am able to get ModelEntities generated programmatically to collide with the real world environment, the moment I replace them with a scene built with Reality Composer, the same code results in the the loaded entities passing through all real world objects and walls. I have not found a respective setting in Reality Composer - in Scene Physics, the current version only allows to set "Objects collide with" to "Plane" or "Nothing" , whereas older versions seemed to offer "Collides". I wonder if this feature got removed. I saw that in 2020, the preliminary_collidesWithEnvironment option has been added to USD, which kind of indicates that we should be able to set it in Reality Composer, but no luck so far.
Aug ’23