Post

Replies

Boosts

Views

Activity

Can @Query and ModelActor co-exist? How?
Context: The SwiftUI @Query macro has an internal modelContext. The ModelActor also has a modelContext, from which the data should be read/written. Issue: When writing to @Model data fetched with @Query macro using a ModelActor, it will crash in the most not-obvious ways. Also, fetching @Model with ModelActor will result in errors in Swift 6 since @Model aren't sendable. Problem to Solve: - How to write a good amount of data to SwiftData/CoreData without blocking the UI thread? Would the recommendation from the Apple team be that a large amount of data should be read/written with ModelActor and a small amount should be done with the @Query's internal modelContext ?
1
0
53
1w
Persist OSLog in "Analytics & Improvements"
Hello Apple support, We are trying to figure out how to persist the activity logs and retrieve it. It seems the obvious place to find them is "Analytics & Improvements" in settings. How are the .ips log generated? (OSLog?) What are the conditions for the iOS to store the logs? We are aware of this post, but no info on the storage of logs
4
0
560
Dec ’24
Xcodecloud Xcodebuild Failed With Exit Code 70
I'm running on xcode 16, the project archives just fine on the local machine. However, with xcodecloud. It's running into exist code 70 on the following command xcodebuild -exportArchive -archivePath ..... #output Showing All Errors Only Build Archive Export archive for ad-hoc distribution Command exited with non-zero exit-code: 70 Command exited with non-zero exit-code: 70 Export archive for development distribution Command exited with non-zero exit-code: 70 Command exited with non-zero exit-code: 70 Export archive for app-store distribution Command exited with non-zero exit-code: 70 Command exited with non-zero exit-code: 70
6
1
2.6k
Oct ’24
Using AppleId appleIdToken in two different sub-systems
Hello Apple ID support, When a user successfully login with Apple, the apple OAuth will produce a appleIdToken. From my understanding this token is best to not leave the user device. I have two sub-system that can take a appleIdToken and manages the token-refresh separately. In short: Apple -> appleIdToken sub-SystemA(appleIdToken) and sub-systemB(appleIdToken) sub-SystemA and sub-systemB has two separate token management/refresh The question: Is this allowed by the Apple identify server? Is the usecase of supplying appleIdToken to sub-SystemA and sub-systemB valid?
2
0
683
Mar ’24
CLMonitor is Not Working and No way to debug!
CLMonitor WWDC video, it says the same name can be reused await CLMonitor("greeting") but the production iOS 17 API actually crashes. Is this the correct behaviour? (See screenshot 1) for try await events in monitor.events should work in from the WWDC video, but the production iOS 17 API does not work and need to insert await after in keyword. Also, never received any events from the monitor (See screenshot 2) WWDC Video: https://developer.apple.com/wwdc23/10147
0
4
728
Feb ’24
Sort on the @relationship property wrapper
Hello Developer Support, Let's say I have the following models. Is there a way to have dataSet pre-sorted by swiftData? @Model Struct Capture { let someInfo: String @Relationship(.unique, deleteRule: .cascade) // some way of sorting by CoolPoint.date let dataSet: [CoolPoint] } @Model struct CoolPoint { let point: Int let date: Date }
0
1
667
Jan ’24
AVCaptureMultiCamSession Runtime Error with External headphone
Hi Apple support, I'm using AVMultiCamPip as a project starting base and I have the following setup(sample[1]). It connects without headphones but generate a runtime error(sample[1]) with headphones. I'm running on iPhone Xs with iOS 14.3 The source code I'm using is the sample AVMultiCamPip code. How should I config the external headphone mic to prevent the runtime error to occur? sample[1] 2021-01-23 11:10:54.216702-0500 AVMultiCamPiP[3760:649414] Metal GPU Frame Capture Enabled 2021-01-23 11:10:54.218037-0500 AVMultiCamPiP[3760:649414] Metal API Validation Enabled (lldb) po (notification.object as! AVCaptureMultiCamSession).connections ▿ 6 elements &#9;- 0 : <AVCaptureConnection: 0x282092f80 (AVCaptureDeviceInput: 0x282081280 Back Camera) -> (AVCaptureVideoDataOutput: 0x2820f7840) [type:vide][enabled:1][active:1]> &#9;- 1 : <AVCaptureConnection: 0x282082ba0 (AVCaptureDeviceInput: 0x282081280 Back Camera) -> (AVCaptureVideoPreviewLayer: 0x2820e8060) [type:vide][enabled:1][active:1]> &#9;- 2 : <AVCaptureConnection: 0x282085220 (AVCaptureDeviceInput: 0x282081920 Front Camera) -> (AVCaptureVideoDataOutput: 0x2820f7a80) [type:vide][enabled:1][active:1]> &#9;- 3 : <AVCaptureConnection: 0x2820939e0 (AVCaptureDeviceInput: 0x282081920 Front Camera) -> (AVCaptureVideoPreviewLayer: 0x2820e8200) [type:vide][enabled:1][active:1]> &#9;- 4 : <AVCaptureConnection: 0x28208d460 (AVCaptureDeviceInput: 0x2820843e0 Headphones) -> (AVCaptureAudioDataOutput: 0x2820f7ba0) [type:soun][enabled:1][active:1]> &#9;- 5 : <AVCaptureConnection: 0x28208e480 (AVCaptureDeviceInput: 0x2820843e0 Headphones) -> (AVCaptureAudioDataOutput: 0x2820f7d20) [type:soun][enabled:1][active:1]> (lldb) po (notification.object as! AVCaptureMultiCamSession).hardwareCost 0.58957714 (lldb) po (notification.object as! AVCaptureMultiCamSession).systemPressureCost 0.81041515 (lldb) po (notification.object as! AVCaptureMultiCamSession).outputs ▿ 4 elements &#9;- 0 : <AVCaptureVideoDataOutput: 0x2820f7840> &#9;- 1 : <AVCaptureVideoDataOutput: 0x2820f7a80> &#9;- 2 : <AVCaptureAudioDataOutput: 0x2820f7ba0> &#9;- 3 : <AVCaptureAudioDataOutput: 0x2820f7d20> (lldb) po (notification.object as! AVCaptureMultiCamSession).inputs ▿ 3 elements &#9;- 0 : <AVCaptureDeviceInput: 0x282081280 [Back Camera]> &#9;- 1 : <AVCaptureDeviceInput: 0x282081920 [Front Camera]> &#9;- 2 : <AVCaptureDeviceInput: 0x2820843e0 [Headphones]> (lldb) po notification.userInfo ▿ Optional<Dictionary<AnyHashable, Any>> &#9;▿ some : 1 element &#9;&#9;▿ 0 : 2 elements &#9;&#9;&#9;▿ key : AnyHashable("AVCaptureSessionErrorKey") &#9;&#9;&#9;&#9;- value : "AVCaptureSessionErrorKey" &#9;&#9;&#9;- value : Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12780), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x282e81200 {Error Domain=NSOSStatusErrorDomain Code=-12780 "(null)"}} (lldb)
1
0
1.2k
Jan ’21