Post

Replies

Boosts

Views

Activity

Reply to "xcrun xcresulttool get --format json --path" deprecated - what's the alternative?
@DTS Engineer Actually, it's not an alternative to me. The command you mentioned doesn't provide the archive id which I'm later using to export xccovarchive and retrieve code coverage for a file. So first I export archive (using the id retrieved from the first command): xcrun xcresulttool export --type directory --id <ArchiveRef> --path <xcresult path> --output-path <path> which is also deprecated. And then I read the code coverage for a specific file with: xcrun xccov view --file <file> <xccovarchive path> So how do you achieve the same without using deprecated commands?
Sep ’24
Reply to Installing Keyboard Extension changes the iOS system language to Corsican based on bundle ID
It is a critical bug in iOS which has no workaround and seriously affects users... yet it's still not fixed even though first reports appeared 6 YEARS ago! Here are other reports: https://developer.apple.com/forums/thread/757380 https://stackoverflow.com/questions/53069262/ios-adds-new-preferred-language-when-installing-my-3rd-party-keyboard My tickets: FB: 13954760, TSI: 7913047
Topic: App & System Services SubTopic: General Tags:
Sep ’24
Reply to How to retrieve previously set title for a CKShare?
It turns out that CoreData+CloudKit cannot preserve custom key-value pairs from CKShare either. It works for a couple of seconds and then the NSPersistentContainer stops returning both title and custom key-value pairs even though they are available in CloudKit Console... I can't believe how buggy CloudKit integration is. It's a bug after bug, 20% of the integration are workarounds and hacks to fix faulty CloudKit+CoreData behavior... And this SDK is available since 2019 O_O. This should never leave beta at this state... Reported: FB14916959
Topic: App & System Services SubTopic: iCloud Tags:
Aug ’24
Reply to CoreData + CloudKit synchronization is very unstable & unreliable
Just a hint for others: if you use a Panel(which doesn't take over the focus) as your main app window on macOS, make sure that it triggers NSApplication.willBecomeActiveNotification. Otherwise, the synchronization will be completely broken as the CloudKit SDK mainly awaits activation notifications, which are not sent if the app doesn't capture the focus. Often neither the export nor import will work in this case, unless you open some other, regular window. The best solution at this point is to use the workaround that I posted and send manually activation events periodically (I'm curious if it's not going to generate tons of fake analytics). For now, the synchronization is unreliable unless you send those events manually, we have to wait for a fix.
Topic: App & System Services SubTopic: iCloud Tags:
Aug ’24
Reply to CloudKit is not accessible from iOS extension targets
Weird, suddenly I stopped receiving this error. Maybe it required a couple of hours to propagate some information, not sure. Nevertheless, it seems like CloudKit synchronization is not stable on Keyboard Extension. Sometimes it works, but I guess, the only reason why it works is because underneath the main app starts in the background. After a minute or so, the keyboard stops synchronizing changes with Cloud and I have to start the main app to synchronize. Not even restarting the keyboard helps.
Topic: App & System Services SubTopic: iCloud Tags:
Jul ’24
Reply to How to ensure fast synchronization between devices using iCloud Database?
I think I figured out what's going on with synchronization. Why it takes so long. After I migrated to CoreData + CloudKit it turned out that it synchronizes remote changes only after deactivating and activating the app again (my macOS app). I was able to confirm that the underlying mechanism relies on willBecomeActiveNotification notification. After this notification is received, the synchronization is instant. However, without it, even if the app is in the foreground it may take a long time to synchronize remote changes. As a workaround, I discovered that sending NotificationCenter.default.post(.init(name: NSApplication.willBecomeActiveNotification)) forces Core Data synchronization. Unfortunately, it's just a workaround, not a reliable solution...
Topic: App & System Services SubTopic: iCloud Tags:
Jul ’24
Reply to Predicitive Text is presenting suggestions in incorrect language when 3rd party keyboard is installed
I figured out what is causing this issue. It turns out that the additional language is installed based on bundle id of your project O_O! So if you set the bundle id to "pl.app.keyboard" the Polish language will be installed. If you change it to "de.app.keyboard" the German language will be installed. This is definitely a critical bug in iOS, because it messes up suggestions while typing by installing unwanted language. I reported it in the feedback assistant: #FB13954760 and I also created TSI: #7913047
Topic: App & System Services SubTopic: General Tags:
Jun ’24
Reply to Predicitive Text is presenting suggestions in incorrect language when 3rd party keyboard is installed
It turns out, that it's not project-specific. I was just able to create a new project, add a keyboard extension, run it on the simulator, and adding the keyboard installs automatically Polish language for the system. Even though, on macOS used to build the app I removed Polish from all system settings (Language & Region + Keyboards), so I have no idea where it comes from in the app.
Topic: App & System Services SubTopic: General Tags:
Jun ’24
Reply to "xcrun xcresulttool get --format json --path" deprecated - what's the alternative?
@DTS Engineer Actually, it's not an alternative to me. The command you mentioned doesn't provide the archive id which I'm later using to export xccovarchive and retrieve code coverage for a file. So first I export archive (using the id retrieved from the first command): xcrun xcresulttool export --type directory --id <ArchiveRef> --path <xcresult path> --output-path <path> which is also deprecated. And then I read the code coverage for a specific file with: xcrun xccov view --file <file> <xccovarchive path> So how do you achieve the same without using deprecated commands?
Replies
Boosts
Views
Activity
Sep ’24
Reply to Installing Keyboard Extension changes the iOS system language to Corsican based on bundle ID
It is a critical bug in iOS which has no workaround and seriously affects users... yet it's still not fixed even though first reports appeared 6 YEARS ago! Here are other reports: https://developer.apple.com/forums/thread/757380 https://stackoverflow.com/questions/53069262/ios-adds-new-preferred-language-when-installing-my-3rd-party-keyboard My tickets: FB: 13954760, TSI: 7913047
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to How to retrieve previously set title for a CKShare?
It turns out that CoreData+CloudKit cannot preserve custom key-value pairs from CKShare either. It works for a couple of seconds and then the NSPersistentContainer stops returning both title and custom key-value pairs even though they are available in CloudKit Console... I can't believe how buggy CloudKit integration is. It's a bug after bug, 20% of the integration are workarounds and hacks to fix faulty CloudKit+CoreData behavior... And this SDK is available since 2019 O_O. This should never leave beta at this state... Reported: FB14916959
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to "Internal Error" in CloudKit Dashboard
The same on my side, I'm suddenly not able to get any records, neither via CloudKit Console or CKContainer programmatically: <CKError 0x60000098ddd0: "Server Rejected Request" (15/2000); op = 7AAB6A29B663472C; uuid = XYZ; Retry after 31.0 seconds; container ID = "iCloud.XYZ"
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to CoreData + CloudKit synchronization is very unstable & unreliable
Just a hint for others: if you use a Panel(which doesn't take over the focus) as your main app window on macOS, make sure that it triggers NSApplication.willBecomeActiveNotification. Otherwise, the synchronization will be completely broken as the CloudKit SDK mainly awaits activation notifications, which are not sent if the app doesn't capture the focus. Often neither the export nor import will work in this case, unless you open some other, regular window. The best solution at this point is to use the workaround that I posted and send manually activation events periodically (I'm curious if it's not going to generate tons of fake analytics). For now, the synchronization is unreliable unless you send those events manually, we have to wait for a fix.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to CloudKit is not accessible from iOS extension targets
Weird, suddenly I stopped receiving this error. Maybe it required a couple of hours to propagate some information, not sure. Nevertheless, it seems like CloudKit synchronization is not stable on Keyboard Extension. Sometimes it works, but I guess, the only reason why it works is because underneath the main app starts in the background. After a minute or so, the keyboard stops synchronizing changes with Cloud and I have to start the main app to synchronize. Not even restarting the keyboard helps.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to How to ensure fast synchronization between devices using iCloud Database?
I think I figured out what's going on with synchronization. Why it takes so long. After I migrated to CoreData + CloudKit it turned out that it synchronizes remote changes only after deactivating and activating the app again (my macOS app). I was able to confirm that the underlying mechanism relies on willBecomeActiveNotification notification. After this notification is received, the synchronization is instant. However, without it, even if the app is in the foreground it may take a long time to synchronize remote changes. As a workaround, I discovered that sending NotificationCenter.default.post(.init(name: NSApplication.willBecomeActiveNotification)) forces Core Data synchronization. Unfortunately, it's just a workaround, not a reliable solution...
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to Predicitive Text is presenting suggestions in incorrect language when 3rd party keyboard is installed
I figured out what is causing this issue. It turns out that the additional language is installed based on bundle id of your project O_O! So if you set the bundle id to "pl.app.keyboard" the Polish language will be installed. If you change it to "de.app.keyboard" the German language will be installed. This is definitely a critical bug in iOS, because it messes up suggestions while typing by installing unwanted language. I reported it in the feedback assistant: #FB13954760 and I also created TSI: #7913047
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Predicitive Text is presenting suggestions in incorrect language when 3rd party keyboard is installed
It turns out, that it's not project-specific. I was just able to create a new project, add a keyboard extension, run it on the simulator, and adding the keyboard installs automatically Polish language for the system. Even though, on macOS used to build the app I removed Polish from all system settings (Language & Region + Keyboards), so I have no idea where it comes from in the app.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’24