iOS 8 CloudKit: CKNotifications keep showing up, marked as CKNotificationTypeReadNotification - cloudkit

Whenever I query for past CKNotifications using CKFetchNotificationChangesOperation, I keep on getting a whole bunch that are marked as CKNotificationTypeReadNotification. And indeed, I have read them before, marked them as read (using CKMarkNotificationsReadOperation), and am updating my lastServerChangeToken when querying.
Why do they keep showing up?
Thanks.

This started working…and, unfortunately, I'm not sure why.

Related

ReactJS 5.3.0 not loading from unpkg.com

We have been using the following library for months:
https://unpkg.com/react#15.3.0/dist/react.min.js
Yes - I know we can just reference 15.3 and get the URL rewrite to the latest, but they released a breaking change. That's another issue for another day. Don't get distracted.
Yesterday this simply stopped working. You'll notice that if you load the URL mentioned, that the file is TRUNCATED. Simply cuts off. This made everything we use react with break. Interestingly, if you go to the following URL (without the .js extension) - things work.
https://unpkg.com/react#15.3.0/dist/react.min
My question is - what the heck happened? Why did the URL we've been using for 8 months suddenly stop working, and who can we get to fix it. In the interim, we had a copy locally that we've started referencing (which we probably should have been doing to begin with, since we don't want the automatic upgrade). When things like this happen, who do you inform?
I'm not sure you'll find the answer as to why this file is no longer working here but based off of the website you could reached out to the creator on twitter: https://twitter.com/mjackson
On the website it says:
SUPPORT
unpkg is a free, best-effort service and cannot provide any uptime or
support guarantees.
i.e. you should probably only use this link if you are messing around with a small project and shouldn't be used for any website where you actually care about the uptime of the site.

Has anyone used SlickGrid with the updated drag functions jquery.event.drag-2.2.js?

I read from the threedubmedia site "The previous version of this plugin allowed this method to be overloaded with arguments to additionally bind handlers for "dragstart" and "dragend" in a single call, but this is no longer supported." but since I haven't actually read every line of the code I was wondering if this has already been accounted for?
Yes I upgraded to v2.2 (Updated: 2012-05-21) and it works fine for me.
I actually had an issue with 'dragend' event getting missed sometimes with v2.0.
I was doing some operations at the end of 'dragend' event (like when user stops resizing column width), but sometimes the operation won't trigger because this event was missed. Actually one had to resize rather quickly and release mouse soon to get the problem in v2.0.
After upgrading to v2.2 those issues are gone.

Debugging SIGABRT within NSManagedObjectContext -save:

From inside NSManagedObjectContext -save: I am getting this message:
Assertion failed: (_Unwind_SjLj_Resume() can't return), function _Unwind_SjLj_Resume, file /SourceCache/libunwind/libunwind-24.1/src/Unwind-sjlj.c, line 326.
Program received signal: “SIGABRT”.
warning: Unable to read symbols for
/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1
(8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib
(file not found).
This happens when I delete an Experiment object with to-many with Run which has to-many with Sample which has to-one with Data. Experiment also has to-many with Page which has to-many with Display which has to-many to Run. I mention this to point out the cyclical nature of the graph. Here is a simplified graph of model:
An Experiment a top level entity with which the user interacts. An Experiment contains multiple Run objects. A Run is a collection of data starting at a particular time and ending at a later time. Since data can be collected from multiple sources simultaneously, there is a Sample for each source for each Run. An Experiment contains data and this data needs to be viewed and interacted with. So, each Experiment has some number of Page objects and each Page contains some number of Displays (e.g., graphs, meters). A Display is configured to display some subset of the Runs that belong to the Experiment. So, while an Experiment may contains dozens of Runs, one of its Pages will only display a few of those Runs at a time. The Display entity maintains this list. A Display is not a view. A view will reference a Display object and be notified of changes to the Display object.
I had been using Delete Rules but have now switched to "No Action" delete rules in combination with -prepareForDeletion methods for all of these classes. This change made no difference. In both cases, the error message is the same.
Interestingly, when I relaunch the app, all the objects that were marked for deletion have been deleted.
Also, if an Experiment has no Run objects, then deletion works without incidence. For that matter, deleting a single Run from an Experiment also works.
I am hoping that someone has seen something like this and can offer advice on what would cause this. Or, if someone has advice on how to get libXcodeDebuggerSupport.dylib for iOS 4.2.1, that might also be helpful.
Update: I followed advice found here and was able to get Xcode to find libXcodeDebuggerSupport.dylib for iOS 4.2.1. But this did not help at all in diagnosing problem - which persists.
Update 2: After reading a bit and downloading a version of unwind-sjlj.c, it seems that I am dealing with something like an uncaught exception. I am not sure how this helps me...
Update 3: Thanks to Kamchatka, I did something I probably should have done a few days ago: turned on "Stop on Objective-C Exceptions". This allowed me to see that a reference to a deleted object was still being held - and, worse, was key-value observing the deleted object. Fixing this fixed problem and I was able to revert to using delete rules rather than -prepareForDeletion methods.
You should try to activate "Run > Stop on Objective-C exception". It allowed me to find the place where there was an access to an object turned into fault which was the root cause of the problem.

Application has encountered a problem and needs to close

I need to find where the application is running into an unhandled exception. I am supporting this from a previous developer. The application is running and the users aren't interacting with it at the time it crashes. I have ran it in debug mode and it doesn't crash. I know the project in the solution where it happens, but that code is like almost 10,000 lines. Any help would be appreciated.
Add subscription to the AppDomain.UnhandledException event as early as you can:
AppDomain.CurrentDomain.UnhandledException += YourHandler
Inside you can log the exception information and anlyze it later
You aren't giving much to go on. You might want to look up AppDomain.UnhandledException
System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
There isnt much info given in the post above. I found following article alot more better:
http://www.switchonthecode.com/tutorials/csharp-tutorial-dealing-with-unhandled-exceptions

How to debug 'no entities specified' when working with ZSync and CoreData Syncing

I'm trying to get ZSync to work between a desktop and iPhone app. I've got my schemas set up and all info matches between my MOM and my schema so I should be good to go. When I initiate my sync, however, I get this error.
|Miscellaneous|Error| SyncServices
precondition failure in [ISyncSession
_validateClient:entityNames:beforeDate:clientHasTruthForEntityNames:target:selector:]:
no entities specified
Anyone know what this means, and how to debug it?
I'm a novice with this SyncServices stuff.
Cheers!
Update
Ok, I've got it showing in syncrospector, but still getting the unrecognized error.
What do you mean by my clientdescription at the Daemon is wrong?
Thanks.
Update
Alright, I had the clientDescription working , but now when this fires:
ZAssert([[ISyncManager sharedManager]
registerSchemaWithBundlePath:path],
#"Failed to register sync schema");
I get this error :(
[NOTE: this exception originated in
the server.]
*** -[NSCFArray insertObject:atIndex:]: attempt to
insert nil
This is an issue in your Sync Services settings. It means that you have not declared what entities need to be synced. I suggest comparing your SyncSchema subproject (for your desktop app side) to the one included in the SampleDesktop project.
update
I checked all that, to no avail. I am using a versioned mom, would that make a difference? In my ManagedObjectModels, should I use the name of the version or the collection? (mom or momd?) Thanks, I'm almost there!
No, the schema should point to your latest model. Are you certain that it is pointing to it correctly? That can be one of the trickiest bits. Are you including the model in the schema bundle or are you making a reference to it?
update
First, please put these updates into your question, the comment section is really not meant for them.
Alright, got past this problem. Syncing starts now I get "failed to register client because: client named Xmac wants to sync unrecognized entity named: X.Entity" This happens with all my entities, sadly.
This error means that your sync schema is still not completely valid. Does your desktop client sync?
Can you see its data in the syncrospector?
If so then your clientdescription at the Daemon is wrong. If it doesn't sync then solve that first as it sounds like your SyncSchema bundle is still incorrect. I suggest trying to compare it against the sampleDesktop application that is included in the project.
update Syncrospector
Ok, I've got it showing in syncrospector, but still getting the unrecognized error. What do you mean by my clientdescription at the Daemon is wrong? Thanks.
In the syncrospector I am guessing that you are seeing all of your entities and data?
On the Daemon, there is a clientDescription.plist. This plist describes what data that the Daemon is going to sync with. That plist needs to be updated (since the default one refers to the sample app, etc.) to reference your data structures just like your desktop application does.
In the very near future, this piece will be moved to a plugin so that you are not modifying the daemon directly. Expect to see updates on the project itself during the next couple of weeks. But for now, (and will be reusable), modify the plist inside of the daemon and you should be ready to sync.
update ZAssert
That line unwinds into:
BOOL success = [[ISyncManager sharedManager] registerSchemaWithBundlePath:path];
NSAssert(success, #"Failed to register sync schema");
A few things can cause this:
Your path is nil, check that in the debugger
There is something wrong with your sync schema.
What other debug comments are you seeing?