Comments (18)
Can you provide a little more detail as to what you're looking to do? Is this syncing a Parse user with a CoreData user? Is this syncing one Parse user with another?
from pfincrementalstore.
Never mind... after reading more, I see the answer is NO.
from pfincrementalstore.
Hi Scott... yes, it's an iPad app, using Core Data and I want to be able
to have multiple unique physical users be able to use a particular
Core Data store. So, sync'ing is the only way to accomplish that.
Regards,
Rolf
Scott BonAmi mailto:[email protected]
December 16, 2013 at 10:13 AMCan you provide a little more detail as to what you're looking to do?
Is this syncing a Parse user with a CoreData user? Is this syncing one
Parse user with another?β
Reply to this email directly or view it on GitHub
#12 (comment).
from pfincrementalstore.
Rolf, I think this has more to do with how you query the data and less to do with syncing it.
There's several ways you could achieve this:
- multiple databases that are dynamically named/accessed based on the user's id (and subsequently a user's permissions)
- utilizing Parse's ACL for permissions (I haven't personally done this and I don't yet have this functionality built into PFIncrementalStore)
- add a object-user relationship and only query objects attached to that user
Let me know if either of these interest you, although I will add that they are falling outside the scope of PFIncrementalStore. Your questions would probably benefit from being posted on StackOverflow.
from pfincrementalstore.
Hi Scott... this app is a appointment booking app... as such, it needs
to sync with one Core Data store (SQLite) so when one user makes an
appointment, other users will see that a particular time slot has been
taken or not, and act accordingly.
I have some code I was given that will accomplish this, but needs work
and testing. Was just hoping to get something "out of the box" so to
speak... :D
R
Scott BonAmi mailto:[email protected]
December 16, 2013 at 11:00 AMRolf, I think this has more to do with how you query the data and less
to do with syncing it.There's several ways you could achieve this:
- multiple databases backed dynamically named/accessed based on the
user's id (and subsequently a user's permissions)- utilizing Parse's ACL for permissions (I haven't personally done
this and I don't yet have this functionality built into
/PFIncrementalStore/)- add a object-user relationship and only query objects attached to
that userLet me know if either of these interest you, although I will add that
they are falling outside the scope of /PFIncrementalStore/. Your
questions would probably benefit from being posted on StackOverflow
http://stackoverflow.com/questions/ask.β
Reply to this email directly or view it on GitHub
#12 (comment).
from pfincrementalstore.
"Out of the box" is precisely why I started PFIncrementalStore :) This project still has a few more changes that need to happen before I list it on cocoapods, and even then I would consider it a development-only project until further testing can be done. That being said, I'd do the following (these are rough instructions off the top of my head):
- Set up cocoapods on your machine
- Install the project via cocoapods (http://beta.cocoapods.org/#get_started) and add this line to your Podfile:
pod 'PFIncrementalStore', git: 'https://github.com/sbonami/PFIncrementalStore.git'
- Attach the PFIncrementalStore to your existing project
- Query objects and appointments accordingly, maybe something like this:
User *currentUser = <# current user #>;
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"user = %@", currentUser];
NSError *error = nil;
NSManagedObjectContext *context = <#Managed Object Context #>;
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"Appointment"];
[fetchRequest setPredicate:[NSPredicate predicateWithFormat:@"appointmentUser = %@", currentUser]];
NSArray *results = [context executeFetchRequest:fetchRequest error:&error];
NOTE: PFIncrementalStore adds additional fields necessary to keep everything synced. Steps for migrating your schema should be taken or your app may crash.
NOTE: PFIncrementalStore will be submitted to cocoapods soon at which time the git declaration can be dropped from the Podfile.
from pfincrementalstore.
It sounds like you are saying that I can do Core Data sync'ing between one Core Data store and multiple concurrent users? Is that correct? If so, I'm onboard! Now there might be one glitch: I use MagicalRecord for all of the Core Data calls... is that going to be a problem? (it doesn't look like to me, but then again, I didn't write your code! ) :D
R
from pfincrementalstore.
If I understand everything as you've described, then yes I am saying that you can sync Core Data with multiple users. As far as MagicalRecord goes, it's a layer that sits on top of CoreData and as such shouldn't be affected by PFIncrementalStore. I've not personally used MagicalRecord so give it a shot and report back on any issues you may run into. Check out this StackOverflow q&a about connecting another incremental store with MagicalRecord.
from pfincrementalstore.
I'll get started on it tomorrow... Don't know where you are, but I'm in Spokane, WA, and it's getting late! :D
from pfincrementalstore.
I don't know anything about CocoaPods, but this line doesn't seem right:
pod 'PFIncrementalStore, git: 'https://github.com/sbonami/PFIncrementalStore.git'
Unbalanced single quote and there is no 'install' command... am I correct? Anyway, it can't find the specificaiton for PFIncrementalStore. :-{
from pfincrementalstore.
I did say they were rough instructions π I've updated the instructions to fix the unbalanced quote and clarify what I meant. Since I have not completed a 0.0.1
release to my satisfaction this library and its specification has not yet been pushed to Cocoapods, thus you must explicitly declare the git location.
from pfincrementalstore.
You don't need 'install'?
R
Scott BonAmi mailto:[email protected]
December 16, 2013 at 8:58 PMI did say they were rough instructions π I've updated the
instructions to fix the unbalanced quote and clarify what I meant.
Since I have not completed a |0.0.1| release to my satisfaction this
library and its specification has not yet been pushed to Cocoapods,
thus you must explicitly declare the git location.β
Reply to this email directly or view it on GitHub
#12 (comment).
from pfincrementalstore.
Cocoapods has an awesome Getting Started guide (http://beta.cocoapods.org/#get_started) to walk you through getting everything set up. After creating a Podfile and adding the line mentioned above, you will run pod install
to generate a Pods directory, workspace, etc.
from pfincrementalstore.
How do I get your updates to PFIncrementalStore?
from pfincrementalstore.
Keep an eye on the repo. As changes are made, you can just call pod
from the same directory as your Podfile
to fetch the latest updates from GitHub.
from pfincrementalstore.
Here's my two cents worth -- when you get a chance, I think you need to
elaborate on the instructions for including PFIncrementalStore in the
developer's app (where, how, etc)... I'm lost! :-{
From what I've read, once I have this set up and registered, apparently
none of my calls to MR for Core Data change... it's all handled under
the covers, so to speak. Am I on the right track?
Sorry for the lame question... to give you a little background: I've
been programming since the 1960's on mainframes, mid-range, PCs and now
iApps... I'm 71 years old! I do this as a sort of hobby... keeps my
mind active!
R
Scott BonAmi mailto:[email protected]
December 17, 2013 at 6:31 AMKeep an eye on the repo. As changes are made, you can just call |pod|
from the same directory as your |Podfile| to fetch the latest updates
from GitHub.β
Reply to this email directly or view it on GitHub
#12 (comment).
from pfincrementalstore.
Hi Scott... two questions:
- Do I really need the Facebook, etc stuff? (my login info is self
contained within the app) - When you say "attach PFIncrementalStore to my existing project", do
you mean "Add files to project" ?
R
Scott BonAmi mailto:[email protected]
December 16, 2013 at 6:11 PM"Out of the box" is precisely why I started /PFIncrementalStore/ :)
This project still has a few more changes that need to happen before I
list it on cocoapods, and even then I would consider it a
development-only project until further testing can be done. That being
said, I'd do the following (these are rough instructions off the top
of my head):
- Set up cocoapods http://beta.cocoapods.org/#install on your machine
- Install the project via cocoapods
(http://beta.cocoapods.org/#get_started):
http://beta.cocoapods.org/#get_started%29: |pod
'PFIncrementalStore, git:
'https://github.com/sbonami/PFIncrementalStore.git'|- Attach the /PFIncrementalStore/
https://github.com/sbonami/PFIncrementalStore#incremental-store-persistence
to your existing project- Query objects and appointments accordingly, maybe something like this:
User *currentUser = <# current user #>;
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"user =
%@", currentUser];NSError *error = nil;
NSManagedObjectContext *context = <#Managed Object Context #>;
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc]
initWithEntityName:@"Appointment"];
[fetchRequest setPredicate:[NSPredicate
predicateWithFormat:@"appointmentUser = %@", currentUser]];
NSArray *results = [context executeFetchRequest:fetchRequest
error:&error];NOTE: /PFIncrementalStore/ adds additional fields necessary to keep
everything synced. Steps for migrating your schema should be taken or
your app may crash.NOTE: /PFIncrementalStore/ will be submitted to cocoapods soon at
which time the git declaration can be dropped from the Podfile.β
Reply to this email directly or view it on GitHub
#12 (comment).
from pfincrementalstore.
As this project is still pre 0.0.1 and only available via GitHub, I have yet to write full installation and usage instructions. I appreciate that you aim to continuously learn new tech and moreso that you have interest in PFIncrementalStore, but I believe this project may require a level of understanding and attention that is more advanced. At the point in which deem the project able to launch publicly, I would highly recommend you revisit as I still believe it will solve your goals. As we've both stated: better instructions, more testing, and an example project may make the project more easily digestible.
from pfincrementalstore.
Related Issues (20)
- Fix sync of faulted related objects
- Remove object from backing context if it has been removed from Parse
- PFUser Support? HOT 14
- Add documentation HOT 7
- Build upon AFIncrementalStore HOT 3
- GitHub pages instructions should be linked from repository HOT 2
- Add PFFile instructions to README HOT 1
- Investigate duplicate syncing
- to-many relationships not syncing HOT 2
- Object is fetched again from Parse while saving the managed object context HOT 2
- Support fetch limits greater than 100 HOT 3
- Help with Basic Example HOT 1
- Podfile.lock missing HOT 3
- Error inserting new relation HOT 3
- Example unusable, do I miss something? HOT 1
- [Question] I'd like to sync certain objects stored locally. Do I walk right way choosing PFIncrementalStore? HOT 15
- Co-maintainer needed! HOT 5
- PFIncrementalStore issue HOT 1
- PFIncrementalStore for iOSβ¦Has anyone made it work?
- PFFile downloading but wont upload. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pfincrementalstore.