Posts

Post not yet marked as solved
2 Replies
3.1k Views
After updating our app some of our users are seeing that their widget has gone blank, the whole widget it just white. The only way to make the widget render again is to reboot the phone. This seems to be happening randomly and mainly on iOS17. Looking on the web, seems like other people are also having this issue so hopefully Apple will make a fix at some point but I'm wondering if other people have had this issue and figured out a workaround to stop it happening? Thanks.
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
0 Replies
253 Views
I see this warning a lot in console.log when my widgets update, is it just noise or is there something I could be doing wrong in my widgets. I don't do anything explicitly with the runloop in my code, it's just regular SwiftUI to render a widget.
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
1 Replies
246 Views
I'm trying to load a localized string with a specific Locale, for example: String(localized: "someKey", locale: Locale(identifier: "fr")) However the locale I pass in is being ignored, no matter what I set it to the string returns a value using the Locale.current value not the parameter I pass in. Am I doing something wrong, is there some way to specify a certain locale?
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
8 Replies
3k Views
When I run my widget from xcode I see getTimeline is called twice for some reason. It's called the first time, then after it returns a timeline it's called again. The logs have the following message: "-[EXSwiftUI_Subsystem beginUsing:withBundle:] unexpectedly called multiple times." It takes about 0.5 seconds for the first getTimeline call to return so it doesn't seem like the OS should try to call this method again so quickly (my timeline entries all have times in the future so they shouldn't request the widget to load immediately) Is this a bug, or expected? Seems to happen every time I run the widget.
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
2 Replies
859 Views
Is it possible to tell in your code if the app was launched from an app intent action in a widget. In my SwiftUI code it has something like Button(intent: MyIntent()) I want to be able to tell when the user has clicked on the button to launch the app, because I need some different setup code to run before the intent perform method is called. Thanks
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
0 Replies
465 Views
Is there any information on what the AudioPlaybackIntent does? The documentation doesn't give any information on it: https://developer.apple.com/documentation/appintents/audioplaybackintent I have an audio app and I want to add a play/pause button to our widget for iOS17, I'm assuming I need to use an AudioPlaybackIntent but there is no documentation on what it does. Thanks.
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
2 Replies
1.5k Views
I'm not sure which combination of iOS/XCode/Mac OS is causing this issue, but all of a sudden when I try to run our SceneKit app and the "Scheme -> Diagnostics -> Metal -> API Validation" setting is turned off the scene won't render and the console is just full of the following errors: Execution of the command buffer was aborted due to an error during execution. Invalid Resource (00000009:kIOGPUCommandBufferCallbackErrorInvalidResource) [SceneKit] Error: Main command buffer execution failed with status 5, error: Error Domain=MTLCommandBufferErrorDomain Code=9 "Invalid Resource (00000009:kIOGPUCommandBufferCallbackErrorInvalidResource)"  ) If you run the app outside of xcode it's fine, also enabling the "API Validation" option stops the issue. One of my schemes has this option disabled since the project began and never had an issue before. Just throwing this out there incase someone else has spent hours of their life trying to figure out why this is not working for them. Also you can just create a new SceneKit project and turn that diagnostic option off and the app won't render anything.
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
2 Replies
960 Views
Why does the documentation say this field returns the intensity of precipitation in UnitSpeed, this seems confusing. Shouldn't the amount of precipitation be an amount like inch/hr, mm/hr why would the value be in speed? The old dark sky documentation for this field shows the units were returned in inches/hour
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
1 Replies
1.2k Views
I'm seeing a decent number of crash reports from our app where SceneKit is crashing internally relating to SCNPhysicsField. The stack looks like: objc_msgSend -[SCNPhysicsField _removeOwner] -[SCNNode dealloc] AutoreleasePoolPage::releaseUntil(objc_object**) -[UIApplication _run] UIApplicationMain main start It must be that I am removing a node that has a physics field on it and it randomly crashes. Probably threading related? Anyone know if there is a workaround, maybe setting physicsField to nil first before trying to remove the node? Thanks
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
0 Replies
492 Views
The docs for this property say: "Apps that play long-form audio, such as music or audio books, can use this policy to play to the same output as the built-in Music and Podcast apps. Long-form audio apps should also use the Media Player framework to add support for remote control events and to provide Now Playing information." That doesn't really say what the benefit is for adding this option or what are the drawbacks? Does somebody have some more information on when you should use this policy and potential issues it might cause? We are working on a music app that will play music in the background so it sounds like we should add this policy, but I can't find any information about why you should. Thanks
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
1 Replies
656 Views
Is it possible to retrieve the sleep schedule wakeup and bedtime times using HealthKit? I can retrieve sleep analysis values, but I don't want the detailed data just the wake up and bedtime times the user has possibly specified in the health app, I can't see any way to retrieve those values. Thanks.
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
0 Replies
1.3k Views
I am using AVAudioEngine, I have a stereo wav file that I want to use with an AVAudioEnvironmentNode but it requires the input source is mono otherwise it will not spatialize the sounds. Is there some way I can convert the stereo input to mono dynamically, maybe using an avaudiomixernode or something else? It looks like maybe I can use AVAudioConverter to convert the original buffer, but I want to be able to just add a node in the AVAudioEngine graph that can convert it to mono if that is possible, rather than having to convert the input buffer explicitly. So something like: WAV -> AVAudioPlayerNode -> Stereo to mono node -> AVAudioEnvironmentNode
Posted
by markdaws.
Last updated
.
Post not yet marked as solved
2 Replies
1.6k Views
If you use the iOS16 Swift WeatherKit API you can get the weather data attribution logo doing something like: // Skipping full syntax for example let attribution = WeatherService.shared.attribution // A URL to an image you can show along with the weather data attribution.combinedMarkLightURL What about if you are not using the iOS16 WeatherKit wrappers e.g. you are using the REST API on your own server to return data. The API docs show a providerLogo/providerName parameter in the metadata returned from the service, but they don't seem to be populated right now. Is it ok just to use a unicode Apple logo to make a string instead like:  Weather Also in the API there is a metadata object returned in each dataset e.g. current, daily, hourly which each has an attributionURL field, will all those values always be the same or we might have to display multiple URLs for data sources, the Swift example seems to just have one attribution object.
Posted
by markdaws.
Last updated
.
Post marked as solved
1 Replies
880 Views
How do you change the monthly plan? I don't see anywhere in the developer accounts pages to do it or in app store connect. The only things I see in developer accounts is a services list with a weatherkit item, but it just shows usage numbers, no option to upgrade to a different plan.
Posted
by markdaws.
Last updated
.