I'm trying to develop a widget, I've been using a custom font. If I add the widget to the home screen maybe 70% of the time it will load, then randomly it will just start to fail and continually crash, just flashing white.
If I add multiple instances of the widget to my home screen then it will just crash 100% of the time. Both widget will just sit flashing and continually crash.
In the crash logs on my device I can see SwiftUI is crashing, on something relating to fonts:
0 SwiftUI 0x00000001e5c52f5c CodablePlatformFont.init+ 6733660
If I take the custom font out of the widget then it will load (eventually after resetting the device, widgets are sooo buggy) and I can have multiple instances.
I'm not sure if I am doing something wrong trying to use the custom font. I created a new project and included the same custom font and loaded it the same way (just adding it to the bundle and in the info.plist) and that does not seem to crash.
Just wondering if this is a known issue with custom fonts, if anyone has a workaround to stop it happening.
Here is a snippet of the crash stack:
Date/Time:					 2020-08-21 13:26:32.7104 -0700
Launch Time:				 2020-08-21 13:26:32.2918 -0700
OS Version:					iPhone OS 14.0 (18A5351d)
Release Type:				Beta
Baseband Version:		3.50.05
Report Version:			104
Exception Type:	EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001e5c52f5c
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [8244]
Triggered by Thread:	0
Thread 0 name:	Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0	 SwiftUI											 0x00000001e5c52f5c CodablePlatformFont.init+ 6733660 (from:) + 2744
1	 SwiftUI											 0x00000001e5c52c54 CodablePlatformFont.init+ 6732884 (from:) + 1968
2	 SwiftUI											 0x00000001e5c52f88 protocol witness for Decodable.init+ 6733704 (from:) in conformance CodablePlatformFont + 20
3	 libswiftCore.dylib						 0x00000001b6feff80 dispatch thunk of Decodable.init+ 2957184 (from:) + 16
4	 libswiftFoundation.dylib			 0x00000001e3e1dd0c __PlistDecoder.unbox<A>+ 343308 (_:as:) + 372
5	 libswiftFoundation.dylib			 0x00000001e3e28860 _PlistKeyedDecodingContainer.decode<A>+ 387168 (_:forKey:) + 660
6	 libswiftFoundation.dylib			 0x00000001e3e2ac94 protocol witness for KeyedDecodingContainerProtocol.decode<A>+ 396436 (_:forKey:) in conformance _PlistKeyedDecodingContainer<A> + 48
7	 libswiftFoundation.dylib			 0x00000001e3e2a9f4 protocol witness for KeyedDecodingContainerProtocol.decode<A>+ 395764 (_:forKey:) in conformance _PlistKeyedDecodingContainer<A> + 20
8	 libswiftCore.dylib						 0x00000001b6d722cc _KeyedDecodingContainerBox.decode<A, B>+ 344780 (_:forKey:) + 296
9	 libswiftCore.dylib						 0x00000001b6d659e4 KeyedDecodingContainer.decode<A>+ 293348 (_:forKey:) + 40
10	SwiftUI											 0x00000001e5c4f5c8 CodableAttributes.init+ 6718920 (from:) + 832
11	SwiftUI											 0x00000001e5c503c4 protocol witness for Decodable.init+ 6722500 (from:) in conformance CodableAttributes + 20
12	libswiftCore.dylib						 0x00000001b6feff80 dispatch thunk of Decodable.init+ 2957184 (from:) + 16
13	libswiftFoundation.dylib			 0x00000001e3e1dd0c __PlistDecoder.unbox<A>+ 343308 (_:as:) + 372
14	libswiftFoundation.dylib			 0x00000001e3e2b32c _PlistUnkeyedDecodingContainer.decode<A>+ 398124 (_:) + 776
15	libswiftFoundation.dylib			 0x00000001e3e2d150 protocol witness for UnkeyedDecodingContainer.decode<A>+ 405840 (_:) in conformance _PlistUnkeyedDecodingContainer + 12
16	libswiftCore.dylib						 0x00000001b6d7cbd0 Array<A>.init+ 388048 (from:) + 332
17	libswiftCore.dylib						 0x00000001b6d7d178 protocol witness for Decodable.init+ 389496 (from:) in conformance <A> [A] + 28
18	libswiftCore.dylib						 0x00000001b6d7cc8c protocol witness for Decodable.init+ 388236 (from:) in conformance <A> [A] + 20
19	libswiftCore.dylib						 0x00000001b6feff80 dispatch thunk of Decodable.init+ 2957184 (from:) + 16
20	libswiftFoundation.dylib			 0x00000001e3e1dd0c __PlistDecoder.unbox<A>+ 343308 (_:as:) + 372
21	libswiftFoundation.dylib			 0x00000001e3e28860 _PlistKeyedDecodingContainer.decode<A>+ 387168 (_:forKey:) + 660
NOTE: I am using the beta5 build
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
I am trying to test my subscription upgrade/downgrade path on a device. I added a test user to the sandbox section of Settings - App Store and can purchase subscriptions using that test user no problem in my app.
However, if I click on "Manage" on the sandbox user to see the list of subscriptions, when I try to upgrade/downgrade the purchase UI that iOS shows tries to use my actual personal account instead of the sandbox user, so I can't complete the transaction.
Looks like a bug in the sandbox testing flow in iOS, but any way around it? Right now I just simulate updates from apple on my backend to make sure my app behaves as expected, but I would like to actually get some "real" data from Apple.
Hi - I have an auto-renew subscription, for some reason when the user looks at their subscriptions in the iOS subscription list the subscription shows the productId as the name e.g. com.company.app.subscriptonName not the localized string e.g. "Foo Monthly Subscription".
I have other subscriptions and they all works as expected and show the localized name.
The one that is showing the productId is configured the same as the others as far as I can tell, any reason why this is happening and how to fix it?
Thanks.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
In-App Purchase
App Store Connect
StoreKit
Subscriptions
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
Does WeatherKit work for users in China? Some of our APIs to fetch weather data from other sources have been blocked in China, we are hoping WeatherKit will work as a replacement for them (we are using the Swift APIs to integrate with WeatherKit).
Hopefully calling WeatherKit using the Swift APIs inside China from an iOS device will return data successfully and not fail.
Thanks.
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
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
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
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
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.
Is there a SceneKit equivalent of the HoverEffectComponent used in RealityKit to highlight an entity as the user looks around a scene in a VisionOS app?
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?
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.
If you create a custom shader you get access to a collection of uniform values, one is the uniforms::time() parameter which is defined as "the number of seconds that have elapsed since RealityKit began rendering
the current scene" in this doc: https://developer.apple.com/metal/Metal-RealityKit-APIs.pdf
Is there some way to get this value from Swift code? I want to animate a value in my shader based on the time so I need to get the starting time value so I can interpolate the animation offset from that point. If I create a System in the update() function I get a SceneUpdateContext instance and that has a deltaTime property but not an elapsedTime property which I would assume would map to the shader time() value.
In my app I added an AppIcon in the Assets.xcassets folder. I added a any/dark/tinted version of the app icon, in 1024x1024 resolution as a HEIC file, specifying a "single size" iOS option.
When I build and run the app in xcode16 beta on iOS18 the icon works as expected, but when I run the same app on iOS17 the icon just shows up as a black rectangle.
How do I get the app icon to work correctly on both iOS18 and iOS17?