Drew McCormack
4a1a4d7c67
Minor changes to project settings.
2014-04-30 18:27:46 +02:00
Drew McCormack
6b51e58334
Fixed some things in Magical Record example for new build system. Updated README for new instructions on building.
2014-04-30 15:00:11 +02:00
Drew McCormack
3c57524c9f
Added new <Ensembles/Ensembles.h> import to Magical Record app.
2014-04-30 14:28:27 +02:00
Drew McCormack
81696ce9cc
Added the ‘Simple Sync’ example. It is based on the Magical Record number sync app, but is built with vanilla Core Data. About the simplest possible example.
2014-04-30 14:24:28 +02:00
Drew McCormack
f90e79eeaf
Changed deployment settings to iOS 5.1 and Mac OS X 10.7
2014-04-30 13:12:11 +02:00
Drew McCormack
4ee0efc87e
Removed static library for Mac. Just use the framework.
2014-04-30 13:04:24 +02:00
Drew McCormack
70103af2e3
Got all targets working with new static framework. Made the Mac Idiomatic app use the dynamic framework.
2014-04-30 12:57:08 +02:00
Drew McCormack
f17faae13c
Added a static framework target for iOS. It builds. Not fully working yet.
2014-04-30 11:13:14 +02:00
Drew McCormack
fd9c8bbc0b
Changed the baseline consolidator to use the revision number 0 if the local persistent store is not found in the baselines.
2014-04-29 14:18:33 +02:00
Drew McCormack
1b06286792
Fixed static analyzer errors to do with not checking error parameters for NULL values.
2014-04-29 11:14:15 +02:00
Drew McCormack
7550cb8357
Reduced size of transaction logs by not storing nil values in the property change values with keyed archiving.
2014-04-28 12:34:18 +02:00
Drew McCormack
8ed360fa02
Changed popspec to version 1.0.1
1.0.1
2014-04-28 11:47:01 +02:00
Drew McCormack
a6b1c11cdd
Added *.xccheckout to ignore file
2014-04-28 11:38:58 +02:00
Drew McCormack
7409be5e9e
Updated README with to include the 1.0 pod.
2014-04-23 10:10:57 +02:00
Drew McCormack
47d12725ef
Update README.md
2014-04-22 20:10:54 +02:00
Drew McCormack
45a18e8c1f
Minor changes.
2014-04-22 10:22:54 +02:00
Drew McCormack
7e2dab7a80
Removed a assertion for revision sets. Replaced with error logging.
2014-04-22 09:55:58 +02:00
Drew McCormack
619bee1b99
Removed some code (and a test) that would try to avoid importing a known event. This test was not needed, because the code would already avoid importing a known event, and it actually caused a minor bug in certain cases where it was not testing properly. So it has been removed.
2014-04-20 16:46:37 +02:00
Drew McCormack
77ff27ca60
Got Magical Record example working.
2014-04-19 15:31:37 +02:00
Drew McCormack
f300f5745c
Added extra logging for baseline consolidation and removing outdated files.
2014-04-19 12:40:15 +02:00
Drew McCormack
45e1f1284f
Fixed a test for baselines that was failing on iOS due to a side effect creating an extra file.
2014-04-19 11:45:05 +02:00
Drew McCormack
69bb8f901c
Added a check to make sure events have changes before merging. Without this, it was possible for two devices to continuously ping pong back and forth.
2014-04-19 11:04:55 +02:00
Drew McCormack
9d09929833
Added Magical Record example app.
2014-04-18 21:39:39 +02:00
Drew McCormack
31724638c6
Set undoManager on a few contexts to nil.
...
Also set a merge policy for the event store context. It should not be needed, but Kevin Hoctor is getting conflicts between PSC and Store global ids on 10.9. This should not be possible, because there is only one MOC accessing the store, but it seems to happen when a save interrupts a merge.
This issue has been reported for 10.9 online, and seems to be a genuine Apple bug (http://lists.apple.com/archives/cocoa-dev/2005/Aug/msg00899.html ).
2014-04-18 12:52:30 +02:00
Drew McCormack
04389ef898
Small change to prevent a NSManagedObject being accessed on the wrong thread. The access was purely a retain, no access to properties, but better to be safe than sorry.
2014-04-18 11:51:32 +02:00
Drew McCormack
9776d44c74
Added thread debugging launch arguments for Core Data, but it seems they may be ignored in recent OS.
2014-04-18 11:00:44 +02:00
Drew McCormack
c40f7da80b
Work on avoiding race conditions between saves and merges. There is now a new event type: CDEStoreModificationEventTypeIncomplete. While events are being built, they have this type. Fetch requests have predicates to avoid including these events.
...
This was prompted by a case where there were two non-baseline events with the same revision number from the same device. This should not be possible, and various steps have been taken to avoid this arising.
2014-04-17 12:53:34 +02:00
Drew McCormack
e5afbaa437
Removed a potential race condition where events were created before they were registered with the event store for cleanup after a crash.
2014-04-17 10:45:08 +02:00
Drew McCormack
0f635b490e
Standardized NSURL paths.
2014-04-17 10:31:27 +02:00
Drew McCormack
8648e247ab
Removed propertiesToFetch from Core Data fetches. According to docs, it is only used for dictionary results, and I suspect it may have been causing fetches to ignore in-memory changes.
2014-04-17 09:47:01 +02:00
Drew McCormack
9fbd6e30fd
Changed variable name.
2014-04-17 09:46:02 +02:00
Drew McCormack
1c72afc6da
Fixed a comment.
2014-04-14 21:01:25 +02:00
Drew McCormack
94c9c1a0cf
Added whitespace to make CDEPersistentStoreEnsemble.h more readable.
1.0
2014-04-12 14:17:37 +02:00
Drew McCormack
c0dece2231
Fixed a comment.
2014-04-12 14:15:38 +02:00
Drew McCormack
3031d53b6c
Replaced the localDataRootDirectory path with a file URL in the CDEPersistentStoreEnsemble class.
2014-04-12 13:46:47 +02:00
Drew McCormack
8118e35ff1
Changed the initializers of CDEPersistentStoreEnsemble to consistently use NSURL for files. Was mixing the two.
...
Also cleaned up the Xcode schemes, removing the dropbox ones, and naming them better.
2014-04-12 10:52:05 +02:00
Drew McCormack
7dee1230f3
Changed file upload and download operation classes to use a NSURLRequest. Makes them more flexible.
2014-04-11 10:50:28 +02:00
Drew McCormack
ccdf348335
Added method for removing the data for an ensemble from the cloud. Use with caution.
2014-04-11 10:10:05 +02:00
Drew McCormack
2c42b0e9f5
Added retrieveEnsembleIdentifiers... method to CDEPersistentStoreEnsemble, to help people discover what ensembles exist. It is useful for document based apps.
2014-04-10 19:50:28 +02:00
Drew McCormack
d4934066a5
Remove files in the upload folder before transferring data files to cloud. Sometimes, old files would be left around, and uploaded.
2014-04-10 15:05:07 +02:00
Drew McCormack
2f9b587d56
Moved code that removed unused global identifiers from the CDERebaser class, to the CDEPersistentStoreEnsemble. It is now run first thing when the ensemble initializes. This is the safest. Otherwise, a race situation between a merge and a save could potentially interfere.
2014-04-09 11:36:35 +02:00
Drew McCormack
064022f19b
Changed the way the global count is updated on baselines. When consolidating baselines, it is now the maximum count.
...
The global count is not used anymore for determining out of date events, so its only purpose is ordering. It makes more sense that a baseline should keep the maximum global count when merging, to give it priority over older baselines.
2014-04-09 11:17:50 +02:00
Drew McCormack
d60c9d2804
Small improvement to detecting if the store has been left behind. Accounts for baselines that don’t include a revision for the store.
2014-04-09 11:06:41 +02:00
Drew McCormack
0e5bf9ff09
Added logging for when it is doing a full integration.
2014-04-09 10:49:50 +02:00
Drew McCormack
15a45ee142
Improved the code to remove redundant baselines. It now accounts for possibility the two baselines have exactly the same revisions. It is also a bit more efficient, only visiting each pair of events once.
2014-04-09 09:17:46 +02:00
Drew McCormack
1caacaeedc
Changed naming scheme for baselines to include a persistent store identifier prefix. This should avoid the unlikely event that two different baselines end up with the same filename.
...
This required more general changes. The CDEEventFile class was introduced. It effectively maps the events to filenames, and you can now have more than one alias (filename) for each event.
2014-04-09 08:49:13 +02:00
Drew McCormack
e540b51c5b
Refactored event builder so that the save monitor can create and commit its event atomically, in a single performBlock…
...
Previously it was spread over several blocks, and it is thought this may have caused a race condition with the rebaser, which would process a half made event.
2014-04-08 13:26:57 +02:00
Drew McCormack
549a9dc79b
Removed recently added locking of the event store. Doesn’t really solve problems, and it could cause deadlocks.
2014-04-08 13:22:05 +02:00
Drew McCormack
331e29c32e
Merge branch 'master' of https://github.com/drewmccormack/ensembles
2014-04-08 09:25:03 +02:00
Drew McCormack
6dd5265373
Updated a comment.
2014-04-08 09:24:45 +02:00