Post

Replies

Boosts

Views

Activity

Reply to Slow incremental build times with xcodebuild command
Great investigation guys! Indeed those requests are very slow, on my side they take around ~20 seconds: Blocking developerservices2.apple.com significantly improves build time. As @FelixII suggested, the solution is to block it in /etc/hosts by adding: 127.0.0.1 developerservices2.apple.com or probably a better option to use something like Proxyman app to temporarily block/unblock it. Keep in mind that blocking this domain will probably result in Xcode being unable to automatically register devices, capabilities, etc. I guess we need to wait for some fix from Apple. Probably some cache?
Oct ’24
Reply to Custom keyboard while using external keyboard for iPad
I figured it out: You can connect any Bluetooth keyboard to an iPhone, it should behave the same way as on iPad. Hitting the globe button once should show a list of keyboards, if I select my custom keyboard it appears automatically on the screen even if the hardware keyboard is connected. Then I can quickly switch between two most recent keyboards by hitting Globe button again.
Oct ’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?
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
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
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.
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.
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...
Jul ’24