Posts

Post not yet marked as solved
4 Replies
Thanks Eskimo for your comment. I am using CFMessagePort as IPC mechanism to share an IOSurface between broadcast extension and the main iOS app. I create CFMessagePort communication channel and get the underlying mach port with CFMachPortGetPort. And then transport ioSurface mach port created using IOSurfaceCreateMachPort from broadcast extension to the main app with mach_msg_send. In the main app I get IOSurface back with IOSurfaceLookupFromMachPort. Now that ioSurface is shared between the main app and broadcast extension our main app can get the frames from IOSurface and encode and upload the frames to the server. We are doing this because we have to use vp8 software encoding and we can't do it in extension's 50mb memory limit. There are other reasons as well for why we can't just upload from the extension itself. This works fine till iOS 15. But crashes on iOS 16 at the point where we get the mach port from CFMessagePort with mach_port_t machPort = CFMachPortGetPort(ms->_port); I have attached the crash report below. iOS16Bug 21-09-2022, 1-09 PM.crash I am also attaching a minimal sample app files to reproduce the crash: PortCommunication.h.crash PortCommunication.m.crash Crash is reproducible just by calling: let portCommunication = PortCommunication(groupName: "group.ios.mach.port.bug", sdkId: "adsf") where group.ios.mach.port.bug is the app group Hoping you could help us out. I have also filed a feedback FB11366868 for the same. If the above is not possible going forward from iOS 16, is there a way to share an IOSurface across main app and the extension? (I know it's possible on Mac with XPC, but not sure if XPC can work iOS yet)
Post not yet marked as solved
2 Replies
Hi thank you for making this post. This is really helpful. I have a follow up. There is a 5th point that is missing. What happens when the owner modifies something in the shared document. The other participant can't use private database auto synced with NSPersistentCloudKitContainer because they must use CKContainer.sharedCloudDatabase for shared documents. How to I manually fetch the changes in real time reliability? I saw Maintain a Local Cache For CloudKit Records described here https://developer.apple.com/documentation/cloudkit/sharing_cloudkit_data_with_other_icloud_users but do not understand it. Could you please describe in simpler steps to keep the CKContainer.sharedCloudDatabase synced in real time. Thank you 🙏
Post not yet marked as solved
8 Replies
I am having the same problem 'There was a problem loading the environment's status. Request ID:xxxxxxx'