Has there been any progress with this issue?
I'm experimenting with an app that uses CloudKit to connect a user's devices and I'm seeing surprisingly high iCloud storage usage when checking in Settings on the device.
This makes me wonder if I have a hidden bug that is leaking data/records to iCloud. Debugging this feels a bit cumbersome because it involves many record types and zones.
Post
Replies
Boosts
Views
Activity
I'm getting the same error code when trying to decode HEVC/H.265 NAL units from a 4K camera. The NALUs are around 300kB and I have to reassemble them from fragments in multiple RTP packets.
Did you (or somebody) ever find a solution to this problem?
...Or what is the recommended way to implement interfaces like the 🍎tv app (and many others) use? UIKit?
A SwiftUI Button with .card style does not tilt like I'm used to see in tvOS. It just hovers and then shifts a little bit in the screen plane (no tilting). When wrapping it inside a NavigationLink it gets even worse with an additional gray box around the button.
Has anybody successfully used SwiftUI for tvOS apps?
The comments section below this post contains quite some helpful information from Apple about how background push notifications work. E.g.:
Once the device-wide battery or data budgets have been exhausted, no more background push notifications will be delivered until the budgets are reset. The budgets are reset every 24 hours, (...)
In my case I only need silent push notifications instead of background push notifications because in my use case the app is already running on the receiving device. However, the distinction between silent and background is only happening on the receiving device and not on sender's side (CloudKit in my case). While developing, I did not spend much attention on what is happening when the app is not running while such notifications arrive. In fact it began doing some heavy work as if it was started by the user.
So, when i was testing silent push notifications between two devices with my app running, all other devices on the same iCloud account were receiving the same notifications in the background and unintentionally exhausted their budgets. I guess that was at least partially the reason for the issues I had.
Now I believe this address space issue is also the reason for the out-of-memory errors I’m seeing with my Swift code but I’m lacking good ideas on how to properly fix them.
I’m receiving video frames from IP cameras with FFMPEG (avformat), convert them to CVPixelBuffer using CVPixelBufferCreateWithPlanarBytes(…), then to CGImage using VTCreateCGImageFromCVPixelBuffer(…), and finally to UIImage. I keep a buffer of the latest 100-200 images for various things and discard or save the older ones.
At first, the memory usage was just rising quickly until a crash. Then I‘ve put an autoreleasepool{…} inside the loop around the frame-receiving code which kept the memory usage stable at around ~1.4 GB (with 1920x1080 video). But this still occasionally led to an out-of-memory crash. Yet, those crashes do not go away when further reducing the maximum memory usage to around 800 MB (by creating the UIImages from JPEG-compressed image Data instead of raw pixel buffers).
When I add code to catch those out-of-memory exceptions, cancel the work on that frame and just continue with the next one, I observe that it only happens for a few frames in a row and then continues without issues for a while until the exceptions come again. I do not see substantial peaks in memory usage in the debugger. (I use Xcode on my Mac to run the app on a 4K Apple TV with tvOS 15.5.1.)
Is this really an address space issue? And how would I handle it properly then?
Hi, I ran into the same issue on a Series 4 watch with watchOS 8.3 and I'm pretty sure it's an error in watchOS because the Series 4 does not have the gyro (which is required by device motion). Also, the isGyroAvailable property is false.
The documentation of isDeviceMotionAvailable even states:
The device-motion service is available if a device has both an accelerometer and a gyroscope. Because all devices have accelerometers, this property is functionally equivalent to isGyroAvailable.
Installing the current iOS 15.4 beta solved the issue for me (see also this thread).
I'm having this issue only since updating to iOS 15.3. On 15.2.1 I didn't have such issues.
My app can receive one (or a few) silent push notifications after a reboot (launching the app from Xcode), but after that there are no more notifications delivered to my app.
In the logs I see
com.apple.pushLaunch.MY.APP.ID:BC0525:[
{name: ApplicationPolicy, policyWeight: 50.000, response: {Decision: Absolutely Must Proceed, Score: 1.00, Rationale: [{[appIsForeground]: Required:1.00, Observed:1.00},]}}
{name: CPUUsagePolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{[Max allowed CPU Usage level]: Required:50.00, Observed:95.00},]}}
{name: DataBudgetPolicy, policyWeight: 1.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{remainingBudget == 546133.3333333358 AND projectedUsage == 5242880 AND percentage == 0.1}]}}
{name: NetworkQualityPolicy, policyWeight: 11.400, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{[wifiQuality]: Required:50.00, Observed:0.00},{[cellQuality]: Required:50.00, Observed:0.00},{[networkPathAvailability]: Required:1.00, Observed:1.00},]}}
], FinalDecision: Absolutely Must Proceed}
shortly before receiving the call to didReceiveRemoteNotification.
But a few seconds later there is a log like this one:
com.apple.pushLaunch.MY.APP.ID:A018AC:[
{name: ApplicationPolicy, policyWeight: 50.000, response: {Decision: Absolutely Must Not Proceed, Score: 0.00, Rationale: [{[pushDisallowed]: Required:0.00, Observed:1.00},]}}
{name: CPUUsagePolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{[Max allowed CPU Usage level]: Required:50.00, Observed:95.00},]}}
{name: DataBudgetPolicy, policyWeight: 1.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{remainingBudget == 546133.3333333358 AND projectedUsage == 5242880 AND percentage == 0.1}]}}
], FinalDecision: Absolutely Must Not Proceed}
Why pushDisallowed??
I'm having this same issue with one of my queries now, without changing any code. The other queries in the same app still work normally, except once that failing query is called, then I get a "This operation has been rate limited due to an earlier error" error on all queries for some time.
The developer documentation clearly states "503" is an internal error of CloudKit (https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/ErrorCodes.html) and we should just try again :D.
I ran into the same problem with DragGesture.
Even worse, when I slide in the Control Center or the notifications, my app's onChanged(_:) action block gets called, but never the one of onEnded(_:), leaving my app in an ill state.
Did you find any workaround already?