Questions tagged [afincrementalstore]

Core Data Persistence with AFNetworking

AFIncrementalStore is an NSIncrementalStore subclass that uses AFNetworking to automatically request resources as properties and relationships are needed.

Link to the AFIncrementalStore documentation.

47 questions
20
votes
1 answer

Differences between RestKit and AFIncrementalStore

In my iOS app, I am trying to get and post data from a (RESTful) server. I think for that both RestKit and AFIncrementalStore are good candidates. However I also need to be able to save data offline and push it to the server when the app is…
Devang
  • 1,531
  • 3
  • 22
  • 38
11
votes
6 answers

Cannot update object that was never inserted

I create an category object and save it: NSManagedObjectContext *managedObjectContext = [[FTAppDelegate sharedAppDelegate] managedObjectContext]; _category = (Category *)[NSEntityDescription …
ajayjapan
  • 349
  • 4
  • 18
5
votes
1 answer

How do you map AFIncrementalStore to Twitter API v1.1?

How do you map AFIncrementalStore to Twitter API v1.1? Core Data Persistence with AFNetworking, Done Right https://github.com/AFNetworking/AFIncrementalStore REST API v1.1 Resources https://dev.twitter.com/docs/api/1.1 -…
Zelko
  • 3,793
  • 3
  • 34
  • 40
5
votes
1 answer

existingObjectWithID deadlock with NSPrivateQueueConcurrencyType

I'm running in to a freeze (deadlock?) with the NSPrivateQueueConcurrencyType concurrency type and not with the NSMainQueueConcurrencyType. My context initialization: _managedObjectContext = [[NSManagedObjectContext alloc]…
5
votes
1 answer

How can I have multiple URL requests to fetch a single type of entity in AFIncrementalStore?

Let's suppose I have a Core Data model using AFIncrementalStore, and I have multiple REST API endpoints for retrieving a list of objects of that model. I can override -requestForFetchRequest:withContext: in AFHTTPClient like so: - (NSURLRequest…
greenisus
  • 1,707
  • 14
  • 17
4
votes
1 answer

Is AFIncrementalStore still being maintained?

I noticed that it's been almost a year since the last commit to AFIncrementalStore, is that project still relevant or being maintained? https://github.com/AFNetworking/AFIncrementalStore Are there other alternatives to AFIncrementalStore in the API…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
4
votes
1 answer

Magical Record with AFIncrementalStore

I have been wondering how would the life look like If I was to combine AFIncrementalStore and Magical Record. I just don't know how do I set the incremental store as a store for magical record. Does any one know how to perform such operation ?
foFox
  • 1,124
  • 1
  • 14
  • 24
3
votes
1 answer

Deleted Object with Relationship is Re-Inserted by AFIncremntalStore

In my data model, I have Users and Notifications, where one User can have many Notifications. In Notifications, the delete rule on the user relationship is set to Nullify. When I delete a record, I can see in controllerWillChangeContent, that it…
Ryan
  • 672
  • 1
  • 6
  • 16
3
votes
1 answer

Using AFIncrementalStore with an Auth token

I'm working on an iOS client for App.net, and I'd like to use AFIncrementalStore to sync the web service with my Core Data implementation in the app. I've gotten the two to work for API requests that don't require an auth token, but I can't figure…
bryanjclark
  • 6,247
  • 2
  • 35
  • 68
2
votes
2 answers

Can I "manually" insert items into an AFIncrementalStore's cache?

I have set up AFIncrementalStore to grab objects from a JSON service over the network and set its persistentStore to be an SQLite database. This all works fine. Now what I want to do is add objects to that SQLite database out-of-band (from something…
Robert Atkins
  • 23,528
  • 15
  • 68
  • 97
2
votes
1 answer

Does AFIncrementalStore need an NSMainQueueConcurrencyType context?

I've been working on incorporating AFIncrementalStore into our app following the example code in the repository that uses an SQLite backing store. All the examples use a singleton managedObjectContext with an NSMainQueueConcurrencyType. +…
2
votes
1 answer

Should I use AFIncrementalStore or Restkit?

I've looked at the two frameworks and started working with Restkit, but I'm having trouble getting things working correctly and I've found it to be pretty complex. Making it worse, most info I find online is outdated, even it's documentation, so now…
sbonkosky
  • 2,537
  • 1
  • 22
  • 31
2
votes
0 answers

AFIncrementalStore context vs MagicalRecord MR_contextForCurrentThread

I am trying to use AFIncrementalStore together with MagicalRecord. I have a class Beer with few properties (from BreweryDB web service). To fetch beers I am using [Beer MR_fetchAllWithDelegate:self] which returns NSFetchedResultsController instance,…
2
votes
1 answer

Mapping relationships with AFIncrementalStore

I'm in the process of integrating AFIncrementalStore into my project but I'm having a hard time figuring out how to make relationships work. Let's say I have two models: Document and Page. A document has many pages (one-many). Each model has an…
nebs
  • 4,939
  • 9
  • 41
  • 70
2
votes
2 answers

Deadlock using AFIncrementalStore and NSFetchedResultsController

I've been bashing my head against this for a few days now and cannot for the life of me figure out what is going on. I'm pretty green with Core Data, but I know it well enough to avoid deadlock scenarios. However for this project I decided to try…
rnystrom
  • 1,906
  • 2
  • 21
  • 47
1
2 3 4