Are there ever circumstances where the localIdentifier could change or not be accurate? I'm working on an application that backs up photos and have been told by my colleagues that the localIdentifier can't be trusted. However, after doing some research I have been unable to find anyone talking about this.
LocalIdentifiers sometimes change after updating the iOS version.
I've seen the PHAsset.localIdentifiers (Photo API) change after iOS updates twice - in my own Apps. The last time was after updating to iOS 11. The app in question kept track of localIdentifiers so specific images could be found/sorted according to various predicates.
As soon as the update from iOS10 to 11 finished, all the localIdentifiers saved locally by the app became useless as they didn't match any device images, although they still existed in the camera roll.
Like you I've searched for info on this subject without success. Sorry that my reply is bad news.
Use PHCloudIdentifier everywhere. You can use myCloudIdentifier.stringValue if you need it for data storage purposes.
Use cloudIdentifiers(forLocalIdentifiers:) method to convert from local to cloud and the sister method, localIdentifiers(for: [PHCloudIdentifier]), to convert back again.
Related
I'm working on a movie watchlist application for iOS. This is my first ever mobile app so I'm not really sure about the conventions.
The problem that I am facing is that each time the movie poster is displayed, an API is being used to fetch it online. This works fine and as intended when connected to the internet. Once there is no internet, it fails to fetch and shows nothing instead. No posters. Now, this is making me wonder if my whole approach is flawed. Do I just fetch and store the image in CoreData (iOS on-device database)?
I'm just worried what if a user saves a ton of movies, making the app take more space? Is this normal or am I missing a basic solution?
I'm trying to find a way of letting a user store their photos/documents online for my app. They can upload these to the app after registering an email and they remain on the phone even when the user logs out and then in again. However if the user deletes the app, downloads it again (the developers are using TestFlight at the moment), and logs in, any photo or document that the user saved before deleting has vanished.
I've been told that the data hasn't been stored on the Kinvey SDK service that we have been using as it takes a while to upload the data and then was told the app would be better suited on Kinvey REST API as the SDK version doesn't support background mode which supposedly would help store the data quicker (but this still wouldn't be 100% sure the photos/documents would be stored)
I'm not a developer/coder so I'm afraid I don't know much technically but my app needs to be able to have access across devices for the user's photos and documents, if these are 'lost' it would be catastrophic.
Please could someone help me if there a way of doing this?
Thank you.
Well If you want to save pictures or data that do not get deleted here are few options.
Save them iPhone,iPad gallery if not the use REST API
"Kinvey" can be used for that.
The alternative of "Kinvey", Kindly look into this.
https://www.raywenderlich.com/126098/top-5-parse-alternatives.
and may be you can try this. It provides chat feature too.
http://quickblox.com/
I am using Parse servers for my app, and I am concerned about people getting into the code of the app and changing the code that communicates directly with Parse.
For example, if I save a score to the database and I want to update it with a new score by the user, I have to write that code within the app. However, if someone were to change the code and hardcode in a score that wasn't earned, they technically could.
Is there a way to prevent this?
(When I say getting into the code, there is a way to do this using a jailbroken device. I don't know if Apple has fixed this, but about a year ago someone I know showed me the code to an app that is on the App Store.)
Using ALAsset, I get a nil answer for a lot of pictures fetched from iCloud in my app when calling the method : defaultRepresentation.
However, when I call "thumbnail" I get the associated small picture.
It mostly happens when the picture has just been added on iCloud from another device. My assumption was that the picture was not fully synchronised yet.
I've read that in this case, I need to subscribe to the ALAsset notifications, thus I could know when the picture is downloaded and update my UI. But some of them are never correctly downloaded, even if I relaunch my app, still nothing.
The strange "workaround" that I found is going in iPhoto and open the pictures in full screen on the device. The issue disappear only for the pictures I opened but remains for the others.
Finally, someone here wrote that it's possible to "force" the download by calling "requestDefaultRepresentation" but this method is not in the Apple documentation so an app using it could be rejected.
My question is : Is there an authorised method to fetch those pictures without asking the user to go in iPhoto ?
I have an Library-style app which uses Core Data to store its data. Currently I am working on the integration of iCloud support.
I worked through several examples and the Apple docs and finally managed that an object created on device A is automatically synced to device B.
That is great but know I am experiencing the some problems: Some objects are synced and others are not and I have no idea how to debug this. Is there some way to "see" which data is transfered to iCloud, which data is stored in the cloud, and which data is downloaded from iCloud?
All I see at the moment is, that I create some NSManagedObject and store it to the ManagedContext/PersistentStore. I cannot see if it is transfered to the cloud and I cannot see the current content of the cloud. This makes it unpossible to debug the whole process.
So how to debug iCloud?
EDIT on 06/02/2015
I asked this question quite a while ago but it still gets some up votes or favorites. Therefore I would like to share some information I got meanwhile:
DO NOT USE iClOUD! I cannot tell you how many headacdhes and sleepless nights I had because of iCloud. It is jut not worth the candles. At least not when being used with Core Data. It just does not work reliably. This is even still true with iCloud Drive. My apps "supported" iCloud for about two years I did everything possible to get it running. Every time it seems to work I got new error messages from users. It worked fine for many users and caused trouble and even crashes for many othes. It was just terrible. Do your self a favour and use any other syncing service.
There seems to be a runtime argument
-com.apple.coredata.ubiquity.logLevel 3
check this article http://www.freelancemadscience.com/fmslabs_blog/2012/3/28/debug-settings-for-core-data-and-icloud.html?
tried the mitmproxy to see what is send and what is received?
There is a GameCenter tutorial at http://mitmproxy.org/doc/tutorials/gamecenter.html , it should be similar for iClound transfers.