Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Crash: NSUbiquitousKeyValueStore is too long. #3

Open
alariccole opened this issue Dec 15, 2011 · 12 comments
Open

Crash: NSUbiquitousKeyValueStore is too long. #3

alariccole opened this issue Dec 15, 2011 · 12 comments

Comments

@alariccole
Copy link

Love the idea, but I think this class is fatally flawed. It appears to set every item of the standardUserDefaults to iCloud, some which are not user created and thus unnecessary--WebKitWebSecurityEnabled, WebKitUsesEncodingDetector, and so on ad infinitum. For my app, it has caused a confusing crash due to having either too many keys or having improper names for keys.

@a2
Copy link

a2 commented Jan 5, 2012

Fixed in my fork (see #5).

rastersize referenced this issue in rastersize/MKiCloudSync May 8, 2012
Change debug output to be off by default
@gmogames
Copy link

@pandamonia I used your code to replace the original one and unfortunately I had some problems. During the start you push to iCloud, but if the user just deleted the app and reinstalled, it's going to push empty, and the previous saved info did not got returned.

@a2
Copy link

a2 commented Jun 29, 2012

@gmogames I'll look into it. Can you copy this as an issue on my fork? Thanks for bringing this to my attention.

@gmogames
Copy link

@pandamonia you can forget that. I got stupid for a moment and wasn't implementing it right. Everything works great. The only thing I did was, create a new Notification called "MKiCloudSyncDidPullNotification" to be called when the pull from iCloud ends so I can update my UITableView with the backed up information and show an alert to the user.
My app is being used for at least 8k users and I'm about to push an update, if the information is not grabbed from iCloud correctly, I'm absolutely going to get a few bad reviews.
And your fix will help me improve, since I'm getting a few crash reports os NSUbiquitousKeyValueStore being too long.

@a2
Copy link

a2 commented Jun 29, 2012

@gmogames I'm confused. I should forget that because you weren't implementing it right and it is working? Or it isn't working and you need help?

@gmogames
Copy link

@pandamonia I was implementing it wrong. When I saw my mistake and fixed everything started working great. So no help is needed and your code is great.

@a2
Copy link

a2 commented Jun 29, 2012

@gmogames I'm glad everything is working. I got worried when you said it was broken. Have a good weekend.

@gmogames
Copy link

@pandamonia I have one question. When the user opens the app but do not have internet connection. The pull from iCloud is not going to work.
Is there a way I can call pullFromICloud from a specific class to get the iCloud data manually? or can I just call [MKiCloudSync start] again?

@a2
Copy link

a2 commented Jun 29, 2012

@gmogames You could probably monitor the reachability status and call +start/+stop when appropriate?

@gmogames
Copy link

@pandamonia ah, ok. So no harm in calling start more than once (since it's already being called on the appdelegate)?

@a2
Copy link

a2 commented Jun 29, 2012

@gmogames From what I can see in the code, I don't think it could be a problem to call +start multiple times. You may want to call +stop before +start though just to be safe? Not sure if that's even necessary.

@gmogames
Copy link

@pandamonia yep, stop only removes the observer. I'll run a few tests to see if nothing breaks. Thanks for the help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants