Cloud and Local Storage

RSS for tag

Store data locally or in the cloud.

Posts under Cloud and Local Storage tag

44 Posts
Sort by:
Post not yet marked as solved
0 Replies
53 Views
I need any kind of help I can get on this question and am open to any solutions or workarounds. When I archive FileManager.ubiquityIdentityToken with NSKeyedArchiver.archivedData(withRootObject:requiringSecureCoding:), what should I set the second parameter to in order to be able to unarchive later, and how do I unarchive the Data object using unarchivedObject(ofClass:from:) or any other method of NSKeyedUnarchiver? My code currently uses the deprecated method of archivedData(withRootObject:), which gives me a code time warning saying: 'archivedData(withRootObject:)' was deprecated in iOS 12.0: Use +archivedDataWithRootObject:requiringSecureCoding:error: instead I'm getting code time error messages in red for the argument to archivedData(withRootObject:requiringSecureCoding:) which is declared as type Any. I tried different arguments. The one I this should work is (NSCoding & NSCopying & NSObject).Type, which generates two error messages: Static method 'unarchivedObject(ofClass:from:)' requires that '(NSObject & NSCoding & NSCopying).Type' inherit from 'NSObject' Type '(NSObject & NSCoding & NSCopying).Type' cannot conform to 'NSCoding' Setting the argument to (NSCoding & NSCopying & NSObject) generates the error message: 'NSObject & NSCoding & NSCopying' cannot be used as a type conforming to protocol 'NSCoding' because 'NSCoding' has static requirements I haven't been able to discover what that means that 'NSCoding' has static I get the idea to use (NSCoding & NSCopying & NSObject) because when run code: print("type of FileManager.default.ubiquityIdentityToken: \(type(of: FileManager.default.ubiquityIdentityToken))") the debug window shows type of FileManager.default.ubiquityIdentityToken: Optional<NSCoding & NSCopying & NSObject> but when I run the following code print("type of FileManager.default.ubiquityIdentityToken: \(type(of: FileManager.default.ubiquityIdentityToken!))") I get the following in the debug window type of FileManager.default.ubiquityIdentityToken: _NSInlineData I read on stackoverflow that "_NSInlineData" is not made available to us by Apple. I'm open to doing this any other way, not necessarily with NSKeyedArchiver or NSKeyedUnarchiver, including using unsafe pointers if necessary. In one of Apple's documentation or sample Xcode projects, I found code to check the login status of a user on iOS when an app logs on by checking FileManager.ubiquityIdentityToken and to check the current status with the previous status by checking the ubiquityIdentityToken that was saved in UserDefaults. Is there a better way of doing this?
Posted
by
Post not yet marked as solved
0 Replies
56 Views
This documentation: Documentation/Bundle/Resources/Information Property List/Data and storage/NSSupportsPurgeableLocalStorage says: Property List Key NSSupportsPurgeableLocalStorage A Boolean value indicating whether the app continues working if the system purges the local storage. Under what conditions does the system "[purge] the local storage", and does this mean the entire local storage for the app? I can see how when a user deletes an app the local storage would be deleted, but then the app would not continue working, since it's no longer on the device.
Posted
by
Post not yet marked as solved
0 Replies
76 Views
hi guys, com.apple.bird was taking up almost 100 gb of storage on my mac and I had 0 mb of storage left so i deleted it completely. Should i have done that?
Posted
by
Post not yet marked as solved
0 Replies
92 Views
Hi, I have a very strange behavior on an iPhone SE (1st gen, 32 GB, iOS 15.5). It was overloaded (less than 1 GB free remaining). After trying many things unsuccessfully to free up memory, I decided to Erase All data and set it up as new device, so without restoring it from a previous backup. After that reset, it has now about 21GB of system data and only 2 or 3 GB free. I have erased it multiple times... Same thing... Nothing has been installed on the phone after the reset of course. The strangest thing (IMHO) is that if I connect the phone to my Mac, Finder says that I have 22 GB of free memory and doesn't see the 21 GB of system data. But if I try to upload some big files on the phone transfer stalls after 2 or 3 GB... Is there any chance to purge those system data ? Hope I can find help on this...
Posted
by
Post not yet marked as solved
0 Replies
130 Views
We are developing an Apple Arcade title. I have a question about data storage on tvOS. iOS and Mac can use his GKSavedGame, but tvOS cannot. https://developer.apple.com/documentation/gamekit/gksavedgame?language=objc At tvOS, we are considering using iCloud Key Value Storage or CloudKit. Are these available on Apple Arcade? Also, could you please tell me if there is a standard way to do cloud saves on Apple Arcade?
Posted
by
Post not yet marked as solved
6 Replies
255 Views
Hi. I want to make a planner app that has the date and location of the project. Only I have a problem. I used a "DatePicker" so that the date is counted. Only I do not know how to save and display the selected date. In general I have problems to save and reload the content of the variables and texfielders etc. I thought that these contents are automatically saved on the end device of the user. I have read that there are methods like "UserDefaults", "CoreData" or "AppStorage". Have been reading stuff about this forever. But I can't get this to work. I hope someone would like to donate their time to help. Greetings Janik
Posted
by
Post not yet marked as solved
0 Replies
145 Views
I'm trying to build an educational SwiftUI iOS app with course videos. I've tried storing these videos on YouTube as private videos and also Vimeo. But they both show the video controls which allows the URL to be extracted, which I don't want. Storing the videos as a local resource is a no no otherwise the app would be several gb's. I can also store the videos just on my web hosting, but again I think these are discoverable and I don't want to go down the route of creating log ins and user accounts. Are there any other solutions of doing this? Is it possible to store the videos in Firebase and get the app to access them stored there?
Posted
by
Post marked as solved
2 Replies
230 Views
Hello community! I created an app with a golang shared library which runs a mkdir command at start. The app is working properly on emulator but not on physical device, looks like the emulator is properly sandboxing (wrapping) the shared library but in my iPhone I get a permission denied error (probably due to the app trying to write on File system) How can I reproduce the same sandboxing approach on my physical iPhone as in the emulator? Below you can see how the path for each looks like: Emulator installation path(All goo here): /Users/simbadmarino/Library/Developer/CoreSimulator/Devices/E6258FFC-CA3F-4B7F-BAAE-DDF717096A91/data/Containers/Data/Application/6BA771DD-BE68-454A-926E-A525188CBE38/.btfs Phone installation path(Permission errors here): /private/var/mobile/Containers/Data/Application/CB3B300F-07D8-4641-A6FA-4F584D4C6530/.btfs
Posted
by
Post not yet marked as solved
0 Replies
202 Views
Hi guys, Never come across this issue when I switch to a new 2021 MBP 14" M1PRO.(base setup) Happens quite often when I'm saving my blender file, pops up an error saying not enough space. (where after migration I should have about 250GB still.) After going through the storage management tab I came across the " Library - Caches - Cloudkit - com.apple.bird" is eating up 251 GB of storage. I've tried to delete the folder, it pops back right away. and gradually increase it's size till it's full again. Strangely, if I leave the laptop overnight, sometimes the storage will clean up by itself again. Yet, it will continue a behavioral loop on daily basis to a point it's not useable for a new MBP. Does anyone have any idea what it could be or any solutions? greatly appreciated!!
Posted
by
Post not yet marked as solved
0 Replies
214 Views
Hello I'm developing Simple memo-app This memo-app supports iCloud synchronization(default) I want to notify the user, it who has a lack of iCloud capacity. But, I do not know how to know the capacity of the user's iCloud in my app. (this app used Cloudkit(PersistentCloudKitContainer).) I have any way to know user's iCloud capacity in the iOS app? or I want to know, How much iOS App is occupying the user's iCloud. I would like to know the user's iCloud remaining space. I would like to know iOS App is How much occupying the user's iCloud.
Posted
by
Post not yet marked as solved
0 Replies
205 Views
Please tell me if there is any recommended method of persisting data (app token - string type) through app reinstallation. With the answer from: https://developer.apple.com/forums/thread/36442?answerId=281900022#281900022 The suggestion of using DeviceCheck is not working for me since DeviceCheck will generate a random token, and with that token, our backend can only request for two bits. Storing data on a device keychain will have an indeterministic future but seems like it's the only viable option for now.
Posted
by
Post not yet marked as solved
0 Replies
414 Views
Hi, I wanted to offer the UI for editing and deleting a share. So for using UICloudSharingController(share: , container: ) I implemented the delegate to call "persistUpdatedShare" in "cloudSharingControllerDidSaveShare" func cloudSharingControllerDidSaveShare(_ csc: UICloudSharingController) { if let share = csc.share,   let privatePersistentStore = PersistenceController.shared.privatePersistentStore { PersistenceController.shared.container.persistUpdatedShare(share, in: privatePersistentStore) { (share, error) in Thread.performOnMain { if let error = error { PersistenceController.shared.storeWarning = error } } } } } and to call "purgeObjectsAndRecordsInZone" in "cloudSharingControllerDidStopSharing" func cloudSharingControllerDidStopSharing(_ csc: UICloudSharingController) { let puzzleToShare = puzzleToShare if let share = csc.share,   let privatePersistentStore = PersistenceController.shared.privatePersistentStore { PersistenceController.shared.container.purgeObjectsAndRecordsInZone(with: share.recordID.zoneID, in: privatePersistentStore) { (zoneID, error) in Thread.performOnMain { if let error = error { PersistenceController.shared.storeWarning = error } else { puzzleToShare.makePrivateDuplicate() try? puzzleToShare.puzzle.managedObjectContext?.save() } } } } } I got this implementation from a TSI, but it makes no sense to me to delete and duplicate my objects rather than just keeping them and only deleting the share. Question: How can I cleanly discontinue a share, but keep my data. Duplicating my objects seems such a weird approach. But without this implementation it does not really work. (I get strange behaviors and crashes) All the best Christoph
Posted
by
Post marked as solved
2 Replies
489 Views
I've been struggling to get the root path of local storage provider. E.g. /private/var/mobile/Containers/Shared/AppGroup/0C7A3DB2-BA52-4B54-XXXX-E95027E673A9/File Provider Storage. Users can grant access to folders for our drum sampler app in order to use audio samples without importing them and because we have facilities to quickly explore samples. There are two reasons why i want to use this: To display "On My iPad"/"On My iPhone" when users explore the file Preferably in project files we would like to store paths to files in a way that projects still open correctly after re-installation of a user's device. After poking around it seems that File Provider Storage is basically just an app-group named group.com.apple.FileProvider.LocalStorage however we don't have permissions to join that group.
Posted
by
Post not yet marked as solved
0 Replies
305 Views
I am running the WWDC21 sample application "CoreDataCloudkitDemo" with two different Apple IDs to test the Cloudkit sharing feature. I use two simulators and one real device, where the latter has the same ID as one of the simulators. While creating invites via "Copy link" works on all three installations, accepting invites only works on the real device. Trying to open an invite (by copying the link in the one and pasting it into Safari in the other) always results in a web page stating that "iCloud has stopped responding" and "Unable to find applicationIdentifier for the containerId = [my ID] and fileExtension = undefined". Is this a simulator bug in Xcode 13.2 or is there anything I can do about it? Other iCloud features (including login via Safari to icloud.com) work in both simulators. Is there a way to open invite URLs in a simulator (as there is no functioning iMessage or Mail app) other than Safari's URL input field? Doing so does not work in the real device either, but clicking it in e.g. iMessage works. Edit: Pasting the link into a ToDo item and opening it from there works even in the simulator - so is it just a Safari issue?
Posted
by
LPG
Post not yet marked as solved
1 Replies
362 Views
I am making a video sharing app and I am looking for a good cloud storage service that I can upload my videos to and store them. I was previously using Firebase Cloud to store my videos, but I ran into a problem with Firebase and decided it will not work for what I am trying to do. So I decided to switch my cloud storage and I am having a hard time finding something that will work. Question: What are some good cloud storage options for storing videos? Or is there a better way to store videos other than a cloud storage service? The app is very similar to Youtube and the average video length will be around 10 mins if that helps at all. P.S The problem I am having with Firebase storage is that the videos never get uploaded to Firebase if the user closes out of the app during the upload. None of the IOS background options work either.BGProcessingTask and URLSessionUploadTask do not work to finish uploading the video in the background because Firebase does not allow you to pausing uploading during sessions to finish BGProcessingTask, and Firebase does not give you a URL to upload the video to finish URLSessionUploadTask.
Posted
by
Post marked as solved
2 Replies
536 Views
Hi, I'm currently let the user pick a photo using PHPickerViewController. The advantage of PHPickerViewController is that the user is not requested to grant photo access (no permission alerts). After the user picked the photo I need to take note of the local identifier and the cloud identifier (PHCloudIdentifier). For the local identifier no problem, I just use the assetIdentifier from the PHPickerResult. For obtaining the cloud identifier (PHCloudIdentifier, on iOS 15 only) I need to use the cloudIdentifierMappings method of PHPhotoLibrary. The problem of that method is that is causing the photo library access permission alerts to display. Someone know if there is another way to get the cloud identifier from a local identifier without having to prompt the user photo library access? Thank you
Posted
by
Post not yet marked as solved
0 Replies
335 Views
Hello everyone, in the App I'm building I'd like to share an entire list of items (records) by just sharing the list itself (parent record or RecordZone). Meanwhile, I'd like to continue using the NSPersistentCloudKitContainer and therefore CoreData sync. Is it possible, with the new features Apple introduced (Sharing RecordZone and Sharing in Cloud & Local Storage), to do what I described, and combine both functions. Thank you, Carlos Steiner
Posted
by
Post not yet marked as solved
0 Replies
252 Views
Is there a limit for local storage for Safari? If there is, is there a way to increase the local storage limit?
Posted
by
Post not yet marked as solved
0 Replies
311 Views
Hi Team, i am facing a strange issue in my iOS game where the local data gets resets for quite few times a day when the game is resumed from background. This causes the game preferences reset and other local data saved by plugins. Any hint on Xcode projects settings, entitlements settings required to avoid this issue?
Posted
by