Overview

Post

Replies

Boosts

Views

Activity

Receiving main camera stream
Hello, I recently got the entitlement for the Enterprise API this week. Although adding the license and the entitlement to the project, I couldn't get any frame from the cameraFrameUpdates. Here are the logs of the authorization and the cameraFrameUpdates [cameraAccess: allowed] CameraFrameUpdates(stream: Swift.AsyncStream<ARKit.CameraFrame>(context: Swift.AsyncStream<ARKit.CameraFrame>._Context)) Could anyone point out what I'm doing wrong in the process?
0
0
21
6h
BLE Background mode for secure printing
Hi, We are developing an app for secure printing using a BLE RFID reader. What we'd like to accomplish is the ability for a user to walk away from the printer (BLE RFID reader) for any time period (10 mins, 1 hour, or 3 hours) with the app still running background mode but out of range from the RFID reader, and walks back to the printer (BLE RFID reader) and be able to connect to the reader thus enabling printing. We've noticed that when the phone is out of range from the BLE reader and phone auto-locks, the background scanning process is terminated after a few minutes. Is there a way to accomplish the above? Any help is appreciated. Thank you, Marlon
1
0
31
7h
builtInTripleCamera is not automatic switching from one camera to another
Hey! I'm working on a camera app and I've noticed that the .builtInTripleCamera doesn't behave anything like the native app. Tested on iPhone 15 Pro Max and iPhone 12 Pro Max. The documentation states the following, but that seems quite different from what is happening in the app: Automatic switching from one camera to another occurs when the zoom factor, light level, and focus position allow. So, does it automatically switch like the native camera, or do I need to do something? Custom Camera vs Native Camera Custom Camera Native Camera The code was adapted from the Apple's project AVCamFilter. Just download the AVCamFilter and update videoDeviceDiscoverySession: private let videoDeviceDiscoverySession = AVCaptureDevice.DiscoverySession( deviceTypes: [.builtInTripleCamera], mediaType: .video, position: .unspecified )
1
0
139
2w
Question About Weak Self Usage
Hello everyone. I have a small question about Weak Self. In the example below, I am doing a long process to the data I query with SwiftData. (For this reason, I do it in the background.) I don't know if there is a possibility of a memory leak when the view is closed because this process takes a long time. import SwiftUI import SwiftData struct ActiveRegView: View { @Query(filter: #Predicate<Registration> { $0.activeRegistration }, animation: .default) private var regs: [Registration] @Environment(ViewModel.self) private var vm @State private var totalParkingFee: Decimal = 0 var body: some View { ... .onAppear { var totalParkingFee = Decimal() DispatchQueue.global(qos: .userInitiated).async { for reg in regs { totalParkingFee += vm.parkingFee(from: reg.entryRegistration.entryDate, to: .now, category: reg.category, isCustomPrice: reg.isCustomPrice) } DispatchQueue.main.async { withAnimation { totalParkingFee = totalParkingFee } } } } } } I use ViewModel with @Environment, so I don't initilize ViewModel every time view is initilized. I know it's a simple question and I thank you in advance for your answers.
0
0
33
6h
Frame Discontinuity Reasons
I have an app that uses a MultiCamCaptureSession, the devices of which are builtInUltraWideCamera and builtInLiDARDepthCamera cameras. Occasionally when outside I get some frame drops due to discontinuity that end in the media services being reset: [06-24 11:27:13][CameraSession] Capture session runtime error: related decl 'e' for AVError(_nsError: Error Domain=AVFoundationErrorDomain Code=-11819 "Cannot Complete Action" UserInfo={NSLocalizedDescription=Cannot Complete Action, NSLocalizedRecoverySuggestion=Try again later.}) This runtime error notification is always superseded by 4-5 frame drops : [06-24 11:27:10][CaptureSession] Dropped frame because Discontinuity Logging the system temperature shows [06-24 11:27:10][CaptureSession] Temperature is 'Fair' I have some inclination that the frame discontinuity is being caused by the whileBalanceMode of the capture session, perhaps the algorithm requires 5 recent frames to work. I had a similar problem with the lidar depth camera where with filtering enabled exactly 5 frame drops would make the media services reset. When the whiteBalanceMode is locked I do slightly better with 10 frame drops before the mediaServices are reset. Is there any logging utility to determine the actual reason? All of these sampleBuffers come with no info attachment only the not so useful "Dropped frame because Discontinuity." Any ideas for solving this would be helpful as well. Maybe tuning the camera to work better with quickly varying lighting conditions?
1
0
100
4d
-[AVCaptureSession init] has a watchdog issue in iOS 17
My app has encountered many watchdog issues on iOS 17, with stack traces as follows: Attributed: Call stack 0: mach_msg2_trap (in libsystem_kernel.dylib) + 7 mach_msg2_internal (in libsystem_kernel.dylib) + 79 mach_msg_overwrite (in libsystem_kernel.dylib) + 435 mach_msg (in libsystem_kernel.dylib) + 23 _dispatch_mach_send_and_wait_for_reply (in libdispatch.dylib) + 543 dispatch_mach_send_with_result_and_wait_for_reply (in libdispatch.dylib) + 59 xpc_connection_send_message_with_reply_sync (in libxpc.dylib) + 263 FigXPCConnectionSendSyncMessageCreatingReply (in CoreMedia) + 291 FigXPCRemoteClientSendSyncMessageCreatingReply (in CoreMedia) + 47 FigCaptureSessionRemoteCreate (in CMCapture) + 131 -[AVCaptureSession _createFigCaptureSession] (in AVFCapture) + 123 -[AVCaptureSession _initWithMediaEnvironment:] (in AVFCapture) + 619 -[AVCaptureSession init] (in AVFCapture) + 415 We also have many iOS 16 users, but have never encountered a watchdog issue with the AVCaptureSession init method in iOS 16. Is there any change in iOS 17 that could have caused this? How can I avoid this issue? The complete stack trace is attached avfoundation-watchdog.txt
1
0
76
1d
iOS 18 beta 2 multiple issues and work arounds
First installed iOS couple days ago. IPhone SE able to function as normal. Then came the beta 2 update, which resulted in multiple issues. List of issues: Phone heats up and battery gets drained Phone restarts after 13-15 minutes of normal use, doesn’t matter which app Touch screen either lags or is unresponsive Face ID to unlock phone is random After the phone restarts it self, locking and unlocking the phone freezes the lock display Workarounds for above issues: Voice recognistion as draining the battery as per information in settings>Battery. Turned it off. Only appear to fix for short term, above issues reappear. Tried to close all the apps and clear storage as much as possible . issues persist had to wait a few seconds for the phone to catch up after using the touch screen Reset Face ID. Confirmed Face ID working for authentication apps. Temporary fix as issue reappear after phone restarts itself Press the lock button again and try to unlock phone. Also use iwatch to unlock phone. Only temporary work around until the phone restarts its self. Bottom line, a user should NOT have to look for a work around but the work around at least buys the user a few more minutes of phone use before it restarts itself again. Does anyone know when’s the next update? I’m avoiding using maps while driving at the moment just incase it freezes while driving.
0
0
82
7h
Stuck with ios18 Beta 1, not releasing storage?
I usually manage very well with my iPhone 15, 128GB but for the first time whats app told me my memory was almost full. I backed up my photos and videos and delete them, old stuff from whats app and clear some space. When I got to see my storage it was full like 70% by system data. I know there is always this problem where "system data" takes a lot of space. But I have never seen so much. I restarted my iPhone and that made 40GB free. So I went to see if there was some Beta updates and there was, Beta 2. Im trying to update to see if this fix the problem, but every time I try. The system tells me that I don't have enough space for the download. Even when I just saw 40GB free and the download is 6.9GB. If I go back to se my Storage, is full again all the 40GB are gone, until I restart my phone and go through the same process where I see 40GB of space and then the 6.9GB download can't be made and when I go again there is no space. I tried to update it with my computer but my computer don't offer me the Beta 2 option and tells that my phone is with the last version. Is there something I'm missing? Thanks PS. My computer has been telling me all last week that theres a new software update for my phone to be connected to my mac (not saying what or anything specific) when I try to update it always fails. (like 5 or 6 times).
1
1
82
1d
dateFromString results in nil
In a completely new project using Objective-C, when using "NSDateFormatter" under the conditions mentioned, setting initWithLocaleIdentifier to "NSCalendarIdentifierGregorian" results in "dateFromString" returning nil. This issue is occurring specifically in iOS 18 beta 1 and 2, and it's causing me significant trouble. This process works correctly on iOS 17 and earlier versions. NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setTimeStyle:NSDateFormatterFullStyle]; [formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:NSCalendarIdentifierGregorian]]; [formatter setDateFormat:formatStr]; NSDate *date = [formatter dateFromString:formatStr]; "date" is nil.
1
0
45
21h
IOS 18 Beta 2 bug fix
After a week of testing iOS 18. iPhone XS keeps randomly up and down cellular network which shows low signal /no service/ hig signal after I use it for a few minutes. second bugs is keyboard switching , sometimes don’t work auto predictive and auto capitalisation in keyboard. Reported this issue through feedback assistant. Please fix this bug in next iOS 18 beta.
2
0
227
1d
PKCanvasView working on preview, but not on simulator or app
Hey, so I am working on a note taking part of my app and I have been working on allowing different inputs. I got the PKCanvas to work on the preview and on the simulator when it is the only thing on the window group. But when I use this View as part of the tool selection in my app, when the user selects the Canvas view it loads but scribbles don't work, only in the preview in Xcode. I don't know why this behavior is happening. The flow in which the PKCanvasView appears is, user taps NavLink to see their notes, in the NotesView they tap to show the toolbar, toolbar has 4 types of input, text, images, audio, scribbles (all other inputs work accordingly), user taps scribbles the view loads correctly but doesn't allow them to draw. I have set the drawingPolicy to anyInput
0
0
28
7h
Programmatically created NSWindow crashes upon close
I am trying to wrap my head around proper lifecycles of NSWindows and how to handle them properly. I have the default macOS app template with a ViewController inside a window that is inside a Window Controller. I also create a simple programatic window in applicationDidFinishLaunching like this: let dummyWindow = CustomWindow(contentRect: .init(origin: .zero, size: .init(width: 200, height: 100)), styleMask: [.titled, .closable, .resizable], backing: .buffered, defer: true) dummyWindow.title = "Code window" dummyWindow.makeKeyAndOrderFront(nil) The CustomWindow class is just: class CustomWindow: NSWindow { deinit { print("Deinitializing window...") } } When I close the programatic window (either by calling .close() or by just tapping the red close button, the app crashes with EXC_BAD_ACCESS. Even though I am not accessing the window in any way. One might think it's because of ARC but it's not. One—the window is still strongly referenced by NSApplication.shared.windows even when the local scope of applicationDidFinishLaunching ends. And two—the "Deinitializing window..." is only printed after the window is closed. Closing the Interface Builder window works without any crashes. I dug deep and played with the isReleasedWhenClosed property. It made no difference whether it was false or true for the IB window. It stopped the crashing for the programmatic window though. But this raises three questions: What is accessing the programatic window after it's closed—causing a crash because the default behaviour of NSWindow is to release it—if it's not my code? What is the difference under the hood between a normal window and a window inside a window controller that prevents these crashes? If the recommended approach for programmatic windows is to always set isReleasedWhenClosed = true then how do you actually release a programatic window so that it does not linger in memory indefinetely? If the EXC_BAD_ACCESS means that an object is double de-allocated then that would mean that .close() both releases the window (first release) and removes it from the window list which would mean last strong reference is released and ARC cleans the window out (second release). The theory is supported by me calling .orderOut() instead of close which only removes it from the application list and that does indeed release it without crash. Does this mean programmatic windows should override the close() instance method to call orderOut() instead? This seems like poor API design or I am understanding it wrong?
1
0
38
9h
Transfer large data using IOUserClient AsyncCompletion
I'm trying to make an asynchronous bulk data read using IOUSBHostPipe AsyncIO/CompleteAsyncIO and send the data back to the user-space application using AsyncCompletion. virtual void AsyncCompletion(OSAction *action, IOReturn status, const IOUserClientAsyncArgumentsArray asyncData, uint32_t asyncDataCount); My understanding is that the IOUserClientAsyncArgumentsArray asyncData in AsyncCompletion method has a limited size of 128 bytes, and the data I need to send back is over 10k bytes. Would it be possible to send such large data from the driver to the user-space application using async callback? Thanks
1
0
53
3d
Xcode cloud setup not working
I finally signed up for Xcode cloud, but it doesn't work after successful GitHub app installation. 401 in the console for: https://appstoreconnect.apple.com/olympus/v1/providerSwitchRequests I tried multiple things, even wrote to apple. Is it only for payed GitHub users? I have a free private repo. Hope someone has an idea. This is the error message when I give Xcode Cloud access to all repositories: Die Verbindung von Xcode Cloud mit deinem Quellcodeverwaltungsanbieter konnte nicht erstellt werden. Translation: The connection from Xcode Cloud to your source code management provider could not be established.
1
0
148
1w