Menu
  • HOME
  • TAGS

Can't setMetadata while downloading files via fileTransfer.download in iOS in Phonegap

ios,cordova,callback,download,icloud

This is a bug in cordova-file plugin that has now been fixed in the v1.1.1dev. If you are busting to try it out you could remove your file-transfer and file plugin and install the development (just remember to add release one back in when it's out). cordova plugin rm org.apache.cordova.file-transfer...

Coredata, NSOrderedSet and iCloud

ios,core-data,icloud,nsorderedset

It's still stated in the iCloud Core Data Programming Guide that it's not supported: ...

iCloudKit, Linking two methods to a third

ios,icloud

Use a boolean and call the same function when both banana and apple database return. This function should check the value of the boolean, perform the third request depending on its value, change its value. ...

iCloud error to open the document in iOS

ios,icloud

If errno is 20, that means ENOTDIR, "not a directory". It's impossible to give a better answer unless you describe what you were doing at the time. The usual error reporting mechanism on iOS is NSError, which is returned from many, many methods and typically provides details of what specifically...

Enabling iCloud Drive folder for files of an iOS app

ios,objective-c,ios8,icloud

The problem was that the key is not supposed to reflect the folder name, but instead the namespace so iCloud~com~company~myApp is supposed to be iCloud.com.company.myApp.

Are plist files stored with the application bundle?

ios,plist,icloud,ios8.1

if you save the .plist files into the Documents folder from the app explicitly then those files won't be part of the bundle. every other file which is archived into the .ipa file when you distribute it, they are permanent part of the bundle. NOTE: you can read more about...

How do I check if user can login to CloudKit?

ios,icloud,ios8,icloud-api,cloudkit

The CKContainer class has a method called accountStatusWithCompletionHandler: that's designed for this purpose. Call it and check for CKAccountStatusAvailable. You'll still need to listen for NSUbiquityIdentityDidChangeNotification in case the status changes.

Full CoreData uploading (backup) to iCloud Drive and restore if need

ios,xcode,core-data,icloud,cloudkit

Nothing for you to do. Just enable iCloud and it will always be backed up and restorable automatically. See Enable iCloud with Core Data. It's really simple....

cloudkit custom container name

swift,icloud,cloudkit

The default container name is based on the app bundle identifier. You can set that in your app settings under General, Identity. For your app you do need iCloud capabilities. You could set that in you app settings, capabilities, iCloud. There you can select the default container or specify a...

Missing iCloud logging “Using local storage: 0”

ios,objective-c,icloud

Enabling iCloud is not sufficient, "iCloud Documents" must also get enabled to see "Using local storage: x" prints.

Is it possible to obtain an unique iCloud user ID on cocoa?

ios,iphone,cocoa,ipad,icloud

Yes, this is possible using CloudKit. You'll need a CKContainer, and you'll ask it to fetch the user record ID. That record ID is unique for your apps, but is also stable for that user this means the same iCloud account will have the same record ID, regardless of which...

iCloud application back-up size

ios,icloud

There is no such limit on iCloud, I am providing a link below you can get more details from there https://support.apple.com/en-in/HT204247

Should I remove notification for NSUbiquitousKeyValueStoreDidChangeExternallyNotification

ios,icloud,nsnotificationcenter

In general, for any notification, stop observing when you no longer care about the notification. One case where you don't care any more is when the object that is observing the notification gets deallocated. What that second article is telling you is that removeObserver: is often not the best choice....

Manipulate groups in iCloud with CardDAV protocol

icloud,vcard,carddav

OK. Let's start at the beginning. What is a CardDAV collection. A CardDAV collection is like a folder containing vCard files. Some (Many?) servers allow multiple of such folders, some don't. iCloud (currently) is in the latter category - there is only one 'folder' on the server to store all...

how to create a file in Mac cloud drive using python [closed]

python,unix,icloud

You are checking if the file exists, but you say that you want to create it. If you plan to create a new file, remove the if statement: from os.path import expanduser def createBugsFileInitiallyIfNotPresent(): global bugsFileLocation bugsFileLocation = expanduser("~")+"/Library/Mobile Documents/com~apple~CloudDocs/abc.txt" f = open(bugsFileLocation, 'w+') f.write(" dddd ") ...

CloudKit: Order query results by creation date

ios,swift,icloud,cloudkit

This is what I was looking for: query.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)] ...

iOS Swift: Sort array into multidimensional array

ios,arrays,swift,icloud,cloudkit

Why not use sorted? Like this. // A simplified version of your `CKRecord` just for demonstration struct Record { let time: NSDate let name: String } let records = [ Record(time: NSDate(timeIntervalSince1970: 1), name: "a"), Record(time: NSDate(timeIntervalSince1970: 2), name: "b"), Record(time: NSDate(timeIntervalSince1970: 1), name: "c"), Record(time: NSDate(timeIntervalSince1970: 3), name: "d"),...

public iCloud Data

ios,xcode,icloud

You can use CloudKit for that: With CloudKit, you can focus on your client-side app development and let iCloud eliminate the need to write server-side application logic. CloudKit provides you with Authentication, private and public database, structured and asset storage services ...

iCloud Sync does not happen between Live Version of App And Development Version of App (When tested via Diawi, Testflight or ipa copy)

ios,xcode,core-data,icloud

I came to know that the iCloud syncing won't work when you try to install development build over distribution build with latest / same version. To get iCloud work type of build must be same. i.e. iCloud sync will only work when you install new development build over old development...

CloudKit: Is it possible to have a custom zone in a public database?

icloud,cloudkit

Answering the question from your question title: The documentation of CKRecordZone says: A CKRecordZone object defines an area for organizing related records in a database. Zones are an important part of how you organize your data. The public and private databases have a single default zone, and in the private...

iCloud with Coredata synchronization

ios,core-data,icloud

performBlock (and performBlockAndWait) can only be used for NSManagedObjectContexts that were initialised with either NSPrivateQueueConcurrencyType or NSMainQueueConcurrencyType. By default NSManagedObjectContexts are initialised to use the NSConfinementConcurrencyType which does not support performBlock or performBlockAndWait. You should change this line: _managedObjectContext = [[NSManagedObjectContext alloc] init]; to either: _managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];...

How to tell if my iPad and iOS Simulator are using the same iCloud account?

ios-simulator,icloud,xcode6.1,osx-yosemite

Open up the Settings app, and scroll down to iCloud. It lists your account below "iCloud" ...

How to organize icloud data by date added?

xcode,swift,icloud,cloudkit

You could ad a sort order to your query like this: query.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)] ...

CoreData (+ iCloud) produces invalid model state

ios,core-data,icloud

How I solved it. My biggest mistake was how I handled the NSPersistentStoreDidImportUbiquitousContentChangesNotification notification. I only merged the changes in my "main" context (used in the main thread). But I forgot to merge the changes into my second "root" context (of type NSPrivateQueueConcurrencyType) as well which I use to save...

How can i see if my app got iCloud data?

ios,objective-c,core-data,icloud

The general idea is that when you create a Core Data persistent store, you pass in a couple of parameters (NSPersistentStoreUbiquitousContentNameKey and optionally NSPersistentStoreUbiquitousContentURLKey) to identify a metadata file which is stored in iCloud. Then you would add an observer to NSPersistentStoreDidImportUbiquitousContentChangesNotification for your app to be able to react...

How to fetch the latest Post for specific users using NSPredicate and CloudKit?

ios,nspredicate,icloud,cloudkit

If you want to retrieve an other number of records than the default (usually max 100) then use a CKQueryOperation and set the .resultsLimit In your case you could set it to 1 when executing a query for only 1 user. The query that you actually want to execute is...

iCloud takes very long to connect to local store and iCloud Changes to the context done affect my fetchedResultsController

ios,icloud,nsfetchedresultscontrolle

I'm having a similar issue here, but in my case, when I migrate my app from a non-icloud version to an iCloud version, the existing data does not show. Though if I add a new entry, then everything shows and with a debugging, I realised why everything is showing. In...

About testing the iCloud synchronisation

ios,icloud

Yes, it should use the iCloud account your test device is logged into. I tend to use a second iCloud account for testing just to make sure I don't mess up personal data I want to keep within my own apps.

Can a user modify values stored in NSUbiquitousKeyValueStore?

ios,icloud,icloud-api,nsubiquitouskeyvaluestore

Keeping IAP and other critical app data on NSUbiquitousKeyValueStore is a flawed business model. Users cannot modify NSUbiquitousKeyValueStore directly but they can delete it. Or they can turn Documents & Data option off for your app. Even they might be not using iCloud on their iDevice in the first place....

CloudKit Dashboard insufficient priveleges

ios,itunesconnect,icloud,cloudkit

I got the 'Insufficient Privileges" error after I created an AppID & a Container, but I didn't have the Container selected in XCode. Its very misleading. I specified the container and it fixed the issue. Make sure you - 1. Have CloudKit Checked 2. Have the Container you just created...

CloudKit: Fetch all records with a certain record type?

ios,sdk,icloud,cloudkit,ckrecord

Aaaand, I've got it. Using the code below, I was able to create a query to run on the database, to then return an NSArray in the completion block, which I looped through, and returned the value for the saved key in an NSLog. NSPredicate *predicate = [NSPredicate predicateWithValue:YES]; CKQuery...

Deleting data from cloudkit with swift

xcode,swift,icloud,cloudkit

You can delete records with code like this: database.deleteRecordWithID(CKRecordID(recordName: recordId), completionHandler: {recordID, error in NSLog("OK or \(error)") } where database is the CKDatabase that you are using. But in your situation it might be better to update the previous created record. An other solution would be to query your data...

Using iCloud enabled Core Data NSArray-taking method

ios,objective-c,xcode,core-data,icloud

It's telling you precisely the problem: Somewhere (not in the code you posted), you're passing an NSSet to something which expects an NSArray. NSArray is ordered and duplicate-inclusive, NSSet is unordered and duplicate-exclusive. It converted it to a set for you so it wouldn't crash, but is complaining it may...

Delete a file on iCloud drive automatically

applescript,icloud

I don't use icloud but System Events, rather than Finder, will usually delete files without a prompt. If that doesn't work you can try: Be careful with the following command. You can erase more than you want if you misplace the *. set folderPath to "System:Users:user1:exampleFolder" do shell script "rm...

Parsing icaldav events matching a time range

ruby-on-rails,calendar,icloud,caldav

I finally managed to implement the REPORT request on the iclouddav module. It was possible :)

Trouble with iOS 8 CoreData iCloud sync consistency

swift,core-data,icloud

So I am still not sure how or why CoreData is sometimes getting out of sync as described above. I have found though that if I enter one new number after another very rapidly is when it usually occurs. As a workaround I have added a button to the UI...

iCloud Account Not Supported In iOS Simulator?

ios,xcode6,icloud,cloudkit

If the Apple ID you are trying to login with has two factor authentication enabled then you will see that message on the simulator. So far none of the simulated iOS devices correctly support 2FA for Apple IDs. The work around for this is to: Temporarily disable 2FA on the...

Send invitation when creating an event on icloud calendar via webdav

icloud,webdav,caldav

Yes, this is possible. The iCloud calendar supports scheduling as described in RFC 6638. Note that if an attendee has an iCloud account (the email is registered as an Apple-ID used with iCloud) the server won't send out emails. It will put the meeting request directly into the attendee's iCloud...

I want to access iCloud drive files in iOS 7 , is this possible?

objective-c,swift,icloud,ios7.1

You can't use iCloud Drive with iOS 7, Here are the requirements for iCloud Drive: iPhone, iPad, or iPod touch with iOS 8 Mac with OS X Yosemite PC with Windows 7 or later and iCloud for Windows Safari 6 or later, Firefox 22 or later, or Google Chrome 28...

Getting iCloud account details

ios7,icloud

No. You have no access to any account details. The most you can do is Find out if iCloud is configured by calling [NSFileManager ubiquityIdentityToken] Find out if the account has changed by calling that method again to see if the value has changed or by observing NSUbiquityIdentityDidChangeNotification. You do...

Estimating and measuring CloudKit database usage

icloud,cloudkit

Unfortunately there isn't any way to view usage statistics in the CloudKit dashboard. Note though that the data limits mentioned are just for the public database. If you use the private database the use is counted against the individual user's quota (every iCloud account gets 5GB of storage free and...

NSMetadataQuery returns files which apparently don't exist

ios,icloud

After no help from the Apple documentation I managed to find some forums that explain these hidden files mean it hasn't yet been downloaded. I guess the metadata for the files is downloaded first to show they exist, but only upon request will the files actually be downloaded. In my...

URLForUbiquityContainerIdentifier always return nil

ios,objective-c,xcode,icloud

Do you have iCloud Drive enabled on the simulator? From my own testing URLForUbiquityContainerIdentifier always returns nil if iCloud Drive is disabled with the iOS 8.1 Simulator. However, if you test on a device with the same setup it will return a valid value. Similarly, if iCloud Drive is enabled...

Enabling iCloud with Provisioning Profiles in my App

ios,icloud,provisioning-profile

You don't have to create new app id simply what you have to do is add new features to existed app id. If you go to apple development portal--> login to your account there you will see. Click on Certificates,identifiers & profiles--> Click on Identifiers--> Then Click on identifier to...

iCloud key value pair entitlement issues

icloud,entitlements

I have the solution for this (I am using Xcode 5.1.1). I have uploaded a new version (1.1) of my existing app in which I have introduced an iCloud feature, which was not present on the previous version. While uploading the build it showed the same error as yours (as...

hidden files with .icloud extension in ubiquity container

ios,icloud

I think hidden files are handled by metadataQuery to indicate that the new file was added to iCloud and is waiting to be sync'ed. NSMetadataQuery recognizes them as representation of new files not yet downloaded to ubiquity container.

When syncing Core Data, is a call to URLForUbiquityContainerIdentifier: needed?

ios,core-data,data,icloud

The documentation you cite is out of date for iOS 7, which included numerous internal changes to Core Data's iCloud system. Among them is that when you call addPersistentStoreWithType:configuration:URL:options:error: with iCloud keys in the options dictionary, it internally calls URLForUbiquityContainerIdentifier: for you. As a result, calling this method yourself isn't...

How to check which files are stored on iCloud?

ios,cordova,icloud

You can test if the NSURLIsExcludedFromBackupKey flag has been applied to any particular file using the iOS Simulator. After installing your app in the simulator, use the SimPholders application to locate the files of your installed app. Then, as outlined in this answer, use xattr to verify if the attribute...

Co-mingling “default” data with user-supplied data in Core Data

ios,core-data,icloud

I had a similar situation in my app. It has sample data, but the sample data is designed to be edited by the user, and has metadata attached to it that is user specific. In other words, the data is mutable, and belonged with the rest of the user's personally...

iCloud Container name prefix change in Xcode 6

ios,xcode,icloud

This solved my problem. Create an AppID that includes to iCloud container. It should look like this Make an Entitlement file that looks like this (I'm using only iCloud Documents in this example). Xcode will show you errors under "capabilities". Ignore the errors and do not hit "Fix it" as...

NSKeyedArchiver and iCloud

ios,objective-c,icloud,nsarchiving

You shouldn't save a file directly to iCloud but save it locally and then move it to the iCloud folder associated with your app. First you need to look at file coordination which you should use to save a file to iCloud. Then you simply retrieve the URL or path...

Since iOS8 we should use CloudKit for all iCloud apps?

ios,icloud,cloudkit

Actually CloudKit is a layer on top of iCloud. With CloudKit you can work with structural data. With iCloud you probably mean 'iCloud document storage'? In both cases you will be able to do this both with Swift and Objective C. iCloud document storage exists longer, that's probably why most...

iOS Swift: Crash on deleteRowsAtIndexPaths

ios,swift,uikit,icloud,cloudkit

Before removing cells (or adding) you need to call beginUpdates() on the involved tableView. Then remove, or add cells. When finished, call endUpdates(). Once you call endUpdates(). Remember that once you call endUpdates() your tableView model must be consistent with the number of sections and rows you removed or added....

How to enable iCloud for Core Data?

ios,sqlite,core-data,icloud

I found the problem: [[NSFileManager defaultManager] ubiquityIdentityToken] was returning nil, and it was because I had my device not updated to iCloud Drive. I found the response in this post....

Is Core Data sqlite database in the documents directory automatically backed up by iCloud?

ios,iphone,objective-c,core-data,icloud

Yes, putting your database in the Documents directory will do exactly what you want: allow back up to iCloud without syncing to iCloud. Syncing requires moving to the ubiquity container, but thats not what you want. More information can be found in the Apple Technical Note which explains how to...

How iCloud sends a notification to my app when listening NSPersistentStoreDidImportUbiquitousContentChangesNotification

ios,objective-c,core-data,synchronization,icloud

Apple doesn't document the full process, but the goal is that you can treat NSPersistentStoreDidImportUbiquitousContentChangesNotification in almost the same way as NSManagedObjectContextDidSaveNotification. That is, you can merge changes from iCloud as if you were merging changes made on a different managed object context in your app. The iCloud notification involves...

Save iOS 8 Documents to iCloud Drive

ios,xcode,ios8,icloud,uidocument

Well, you've got me interested in this matter myself and as a result I've spent way to much time on this question, but now that I've got it working I hope it helps you as well! To see what actually happens in the background, you can have a look at...

Confused on snippet of code for implementing iCloud behavior on iOS

ios,swift,icloud

if let query = keyValueStore.stringForKey(key) means that if keyValueStore contains a string corresponding to key, then this string will be assigned to the constant query. This is called "safe unwrapping": inside the if let ... condition, the query is safely saved with saveQuery because using if let ... guarantees that...

How to communicate results between NSOperation dependencies?

icloud,nsoperation,nsoperationqueue,ios8,cloudkit

I remember when NSOperation was first introduced, and I had to write a introductory article for the ADC site that would first download some photos, and then render them into a poster. I ran into similar issues there: using dependencies to control order, but then finding I had to pass...

How to approve uploads to CloudKit

ios,cocoa-touch,icloud,cloudkit

There are two main ways in which you can accomplish this: Have a separate record type for non-approved content which you allow any authenticated user to create records in (you can control this with the roles security settings on the record type). Then, once you approve the content, copy the...

iCloud data duplication

ios,core-data,icloud

You would usually deduplicate the data when you receive the NSPersistentStoreDidImportUbiquitousContentChangesNotification notification, and you have merged the changes into your context. After merging, go through the data and dedupe. Here is a good tutorial on deduping: http://www.atomicbird.com/blog/icloud-complications-part-2 Deduplication is one of the poorer design aspects of Core Data + iCloud...

Why UIDocumentMenuViewController does not accept kUTTypeText?

ios,string,swift,icloud

kUTTypeText is defined in the MobileCoreServices framework, so you should add import MobileCoreServices ...

How can I delete a file from iCloud without downloading it to the device first?

ios,cocoa-touch,icloud,nsfilemanager

If you just need to delete a file, use the other NSFileCoordinator coordinateWritingItemAtURL ( the one with a single newURL parameter in the accessor block ). If you need to batch delete, then create an array of NSFileAccessIntent and use NSFileCoordinator's coordinateAccessWithIntents. Example: - ( void )deleteItemsAtURLs: ( NSArray *...

Error turning off iCloud for Core Data on iOS7

ios,icloud

It's happening because you removed the iCloud entitlement. Without that, you're not permitted to access the iCloud store, so the whole scheme falls apart. If this works on iOS 6, it's a bug, because you're really not supposed to get access to anything iCloud-related without the correct entitlements. With iOS...

Existing Core Data Database Not Uploading to iCloud When Enabling iCloud On My App

ios,uitableview,core-data,icloud

Without going further into other issues, the one issue I'm having right now is the fact that if I'm running the App Store version of my app with some data (which doesn't have iCloud enabled), when I update my app using my development build in Xcode, I'm expecting my...

CREATE operation not permitted

ios,swift,ios8,icloud,cloudkit

Users is a special recordType that already exist in CloudKit. You should not create records yourself. Records will be automatically created for new users that are using your app. You also can't create subscriptions and query the Users recordtype. You can only query Users records directly by ID. You can...

Is it possible to enable iCloud without user intervention (ie programmatically)?

icloud,ios7.1

No, not at all. If the user doesn't enable iCloud, you don't get to override their decision. You can ask them to enable iCloud, but you can't do anything about it in your app.

Cannot assign userID as reference

swift,icloud,cloudkit,ckreference

I think you have your brackets wrong. It should be: var avatarID : CKRecordID! var userID : CKRecordID! //avatarID has been assigned value in another function daMainUser.setObject(CKReference(recordID: avatarID! as CKRecordID, action: CKReferenceAction.None), forKey: "avatar") println("this is avatarID: \(avatarID!)") containerY.fetchUserRecordIDWithCompletionHandler{ userRecordID, error in if error != nil { println("error") } else...

How to keep data from iCloud(CloudKit) loaded after switching view controllers

swift,core-data,icloud,cloudkit,ckquery

There are a couple ways to approach this problem. You will want to pass your data and the context from one view controller to the next. Make sure you remove the code in your second view controller the refetches the data. The way I've chosen to do it is to...

CKFetchRecordChangesOperation what is the returned clientChangeToken?

ios,objective-c,swift,icloud,cloudkit

Besides the previousServerChangeToken there is no other mechanism for controlling what should be returned by the CKFetchRecordChangesOperation. It will just return the changes. This will include the changes that you have made yourself. If that's a problem, then you could try using subscriptions instead. these will by default exclude the...

iCloud accounts + my server accounts + linking

video,ios7,storage,icloud

How can I link iCloud account with server account? You don't. There's no public API that can link your server to iCloud and access the user's files. iCloud is not a web service, it's a system for syncing files and other data among different iOS devices used by the...

Xamarin iOS: Can't fetch record from private database in icloud

ios,xamarin,monotouch,icloud

Thank you, I solved the problem. I could not fetch the record that I stored. The problem was, that I used not the RecordID for loading, which I used for saving.

Share task list between people using iCloud

ios,icloud

iCloud app data is sandboxed and not accessible by other users https://developer.apple.com/library/ios/documentation/General/Conceptual/iCloudDesignGuide/Chapters/iCloudFundametals.html In CloudKit there is a private and a public database. when you write to the public database, then that data could be read by others. https://developer.apple.com/icloud/documentation/cloudkit-storage/ Cloud Kit may be your best option...

iCloud Drive documents not included in NSMetadataQuery results

ios,icloud,nsmetadataquery,icloud-drive

Figured it out. iCloud Drive documents are not in the app's container and therefore are not included in metadata query results, because the app has no access to external files. Once a document was opened with a document picker, the app gets access to that document and it will from...

Swift - Adding an iCloud-Enabled Persistent Store to Core Data

core-data,swift,store,icloud,persistent

NSSQLiteStoreType is a defined constant value. You need to use NSSQLiteStoreType, not @NSSQLiteStoreType". Although NSSQLiteStoreType is a string, its value is not @"NSSQLiteStoreType".

iCloud Core Data not syncing

ios,core-data,data,upload,icloud

I got it back to work. Actually, I did not change anything. But I fully restored the iOS device. Any explanations will be welcome.