Post

Replies

Boosts

Views

Activity

Reply to modifyRecordsCompletionBlock deprecated on iOS 15
Watch this video and it will describe the enhancements made this year in full detail for the new resultBlock closures (and new async methods too!) Having migrated over to the new API, it is really a nice update though some of my closures were gnarly (doing atomic processing with records that referenced each other as an example). What's New in CloudKit WWDC21
Jan ’22
Reply to How to turn On/Off iCloudKitSync on a SwiftUI application
How much data are you trying to synchronize when the user has the feature enabled? You could have two containers, one that is local only, and the other that is the cloud container. I'm not sure that simply 'flipping the switch' would propagate / synchronize as fast as the user is expecting. The difficult part with this approach would be migrating the data from one store to the other as they change the value.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Fetch data from CloudKit to app when app is in background
Are you expecting immediate propagation when records are modified or eventual propagation? What is your 'expectation' for acceptable delay in the background? I'd have to imagine that data synchronization in the background is supported, but I don't remember any videos stating this explicitly. Does your app make use of any other background execution modes? The way I achieve this is through CKSubscriptions and notifications which is pretty much immediate as long as the push volume isn't too high for a given device, however I'm not using the CloudContainer and rolling my own Core Data / CKRecord translation. Subscribe to record changes (insert, delete, update) Request remote notifications on UIApplication instance Implement the didReceiveRemoteNotification Depending if data was purged (too much data in push payload), run a CKFetchRecordsOperation or CKQueryOperation
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Combining multiple mini games into one "hub" app.
Is this for Mac, or iPhone/iPad? Why not have all of the games within a single application target? If you want to continue down your 'hub' or 'game launcher' approach AND you're the developer of all of the mini games, you could implement custom URL Schemes for iOS in each and every target. Learn about URL Schemes. The technology is old and has downsides for production but for a school project should get you what you need. If you plan to submit this to the store I'd highly encourage you to consider rearchitecting the apps into a single app.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to What are some good cloud storage options for storing videos?
The length of the video is less important, it more depends on the file size. Also for more context to your question, is this app only for iOS? You could look at using CloudKit and saving the files as a CKAsset. Big apps like Photos are built upon that infrastructure. Think like when you have a video saved and then share it with an iCloud link. The tech is being used under the hood to some extent. CloudKit has storage limits that ultimately might not pan out for your usage but it's my favorite storage. For my usage and volume it is free, built into the OS, and more importantly, supports background uploads, etc. I really dislike third party 'blob storage' libraries because they never seem to support background url sessions for uploading in the background and out of process.
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’22
Reply to [SKStoreReviewController requestReview] does not work. On M1 Macbook
What do you mean by "does not work"? Are you getting a crash, or does the screen just not show? When I tried showing the new StoreKit manage subscriptions view, it would straight up crash my app running on apple silicon because of a symbol not found runtime exception. In your case, I don't see anything wrong with the availability so I'm guessing it isn't a runtime crash you're observing, right? As for what to do, that is sort of up to you. If you want your code to behave conditionally, you can inspect this property and use to make a code branch: ProcessInfo isiOSAppOnMac
Topic: UI Frameworks SubTopic: General Tags:
Jan ’22
Reply to Multipeer Connectivity and Core Bluetooth Tx power level
Do you know that the transport being used is BLE (opposed to P2P WiFi)? Is your range still poor if you disable WiFi (trying to force Bluetooth transport as an experiment)? Is the observed performance different if there is a paired Apple Watch or not? This seems like a good item to create as a feedback to Apple if the performance regressed so significantly. Regarding your question, there isn't any API I want to say that the tx power is 0 db when advertising / acting as a peripheral.
Jan ’22
Reply to Is ASWebAuthenticationSession compatible with App Clips?
I shared my code with my main app target and specified a custom url scheme matching the cloudkit-icloud.[containername]://authToken and I see my ASWebAuthenticationSession getting invoked with the new token. So I know that code is wired up properly and functional It is stated in the Exploring App Clips video that they do not support URL Schemes, when I have the same URL scheme specified, safari says "Safari cannot open the page because the address is invalid." which makes sense if the App Clip isn't registering the URL with the system. When I try to use the https:// [advanced-app-clip-invocation-url] safari view controller is redirecting to my web page that matches the app clip url--not the app clip itself. Universal links are also explicitly not supported by App Clips either as per the same app clip video. I know there is a lot of interest in App Clips + CloudKit so I'll continue to post my findings.
Dec ’21
Reply to QuotaExceeded error questions
Few questions for clarity. Have you confirmed with that user that their iCloud storage is in fact full? When you save the game save a secondary time, are you updating that record, or deleting then saving a new one? Assuming you're using the CKModifyRecordsOperation, how are you handling merge conflicts (i.e. two device scenario race condition).
Dec ’21