Commit Graph

33 Commits

Author SHA1 Message Date
Jeremy Ellison
471a4ad137 RKObjectLoader should be set up with the object managers client, not the shared one.
This fixes support for apps using multiple baseURLs via multiple clients or managers.
2011-01-13 13:41:52 -05:00
Jeremy Ellison
6a5ee2af7e Revert "Remove per-file copyrights"
This reverts commit 91e7c6bb5e.
2011-01-12 15:27:19 -05:00
Jeremy Ellison
91e7c6bb5e Remove per-file copyrights 2011-01-12 15:05:22 -05:00
Jeremy Ellison
a4c3fc9dae Merge branch 'master' of github.com:twotoasters/RestKit 2011-01-06 15:48:31 -05:00
Jeremy Ellison
f690fa19f3 The RKRailsRouter no longer sends params with delete requests.
The RKObjectLoader will now clean up deleted objects inside of processLoadModelsInBackground:
2011-01-06 15:47:09 -05:00
Jeff Arena
88489747e8 add additional response convenience method for checking for a 503 response code; quiet a compiler warning regarding depracated client class method; add default support for generating a uialertview when restkit encounters a 503 response; added ability to turn 503 error on/off, as well as ability to customize the alert 2011-01-06 11:55:43 -08:00
Jeff Arena
e991ad7033 change RKRequest delegate didfinishload method signature to be a bit cleaner; added code to turn off the reachability observer when the app becomes inactive; changed online/offline state code to support an undetermined state at initial launch, so as to ensure we get all our proper notifications during first run; remove unnecessary debug logging from rkrequestqueue; removed three20 model code that was triggering a forced offline state, which currently does not have a recovery path (e.g. if the app is forced offline, we currently have no built-in mechanism to allow a force back online) 2010-12-08 09:45:26 -08:00
Jeff Arena
d91223b6fa fixed a crash related to parsing a non-JSON error from a response string; fixed issue with callbacks being fired after a request has been cancelled; fixed leak of resourcePath in RKRequestTTModel; fixed issue with autoreleasepool being drained before background thread objects have been transferred to the callback method; fixed issues with mutating the requestqueue array during enumeration while performing bulk cancels; added additional logging that has been helpful in tracking down many of these crashes (to be removed prior to merge to master) 2010-12-02 19:28:25 -08:00
Jeff Arena
507509fd3e bug fixes for issues related to error conditions that were preventing our request lifecycle from completing correctly 2010-12-02 14:17:58 -08:00
Jeff Arena
c9ba879937 removed duplicate delegates on RKObjectLoader; inverted control for communicating request completion from RKResponse to RKRequest; added state tracking to RKRequest for loaded and loading states; changed queue processing logic to check request states before firing new requests; removed retains of RKObjectLoader from RKRequestTTModel since our queue is handling retains for all asynchronous RKRequest flavors; added separate state tracking to RKRequestTTModel since there are subtle differences between the meaning of loaded/loading in Three20 versus our RKRequest states; removed delegate forwarding code from RKObjectLoader since it is no longer an RKRequestDelegate (which was quite ugly to begin with); removed unnecessary error contructor for RKResponse that was only being used to fire delegate callbacks when an RKRequest failed to fire in offline mode; added TODOs to deep-dive into synchronous request handling 2010-12-02 13:22:38 -08:00
Jeff Arena
6249ece2bc Merge branch 'reachability-queue-three20' of git://github.com/twotoasters/RestKit into reachability-queue-three20
Conflicts:
	Code/Network/RKRequest.m
	RestKit.xcodeproj/project.pbxproj
2010-12-01 21:06:54 -08:00
Jeff Arena
39f3d568e2 added reachability support at the manager and client level; added code to short circuit requests if offline; fixed issue with source parameter on loader related to passing managed objects across thread boundaries; added resource path property to the loader 2010-11-30 19:38:27 -08:00
Jeff Arena
7e1e1807bd dry-up object store saves on the manager; use an ivar over the request userdata for storing the source on the manager 2010-11-09 09:35:13 -08:00
Jeff Arena
e6c5d9adee fixed delegate call that was improperly passing an nsstring in place of an nserror 2010-11-01 20:34:03 -07:00
Blake Watters
66bcb412c1 Check for JSON response type before parsing 2010-10-28 16:09:40 -04:00
Blake Watters
81c66cb37f Add check to RKObjectLoader to verify that the response type isJSON before starting mapping. This can avoid a nasty crash if the remote side sends back an HTML payload (i.e. an error page) 2010-10-27 13:00:24 -04:00
Blake Watters
0127df862d Added support for tracking upload progress 2010-10-26 14:05:29 -04:00
Blake Watters
ec0c221a33 Allow for mapping directly into an object that doesn't have an element registered with the mapper. We check that the class implements RKObjectMappable and blow up otherwise. Updated comments on the loader... 2010-10-21 13:31:21 -04:00
Blake Watters
4427844e07 Introduced objectLoaderDidLoadUnexpectedResponse: delegate method for handling odd-ball responses during an object load 2010-10-20 21:04:20 -04:00
Blake Watters
bd48ae37db Changed globalClient and globalManager to sharedClient and sharedManager to be more in line with Cocoa framework. Marked old methods as deprecated. 2010-10-20 20:29:27 -04:00
Blake Watters
1a42e8865e Remove accidentally committed log statement 2010-10-20 15:00:59 -04:00
Blake Watters
d1883ddc11 make object loader retain self during send operations 2010-10-20 13:57:16 -04:00
Blake Watters
3dff8b0f0d Merge branch 'master' of github.com:twotoasters/RestKit into managedobjectcleanup
Conflicts:
	Code/ObjectMapping/RKObjectLoader.m
2010-10-19 14:28:18 -04:00
Blake Watters
2fbdfb9c37 Work in progress 2010-10-19 14:27:17 -04:00
Blake Watters
92b39313f0 Fixed bug with load happening too soon 2010-10-19 14:21:39 -04:00
Jeff Arena
82e2a2792d fix issue with missing loader reference to objectstore; removed use of singleton to access store reference in the loader 2010-10-19 11:05:03 -04:00
Blake Watters
ddfe0aae22 Merge branch 'master' into managedobjectcleanup
Conflicts:
	Code/CoreData/RKManagedObject.m
2010-10-18 22:23:54 -04:00
Blake Watters
33c6eba84b Checking in work on managed object cleanup 2010-10-18 22:10:40 -04:00
Jeff Arena
1a6fdeafd4 introduce RKManagedObjectCache protocol to CoreData component; cleanup remaining NSFetchRequest ivars that are now unused; add RKURL class for making resourcepath and baseurl params available to higher level components; cleanup Three20 library to incorporate latest updates from GateGuru codebase 2010-10-18 16:36:24 -04:00
Jeff Arena
592b2a9e32 initial pass at changing fetchRequest APIs to work with a collection of fetch requests; also performed some API cleanup on RKManagedModel 2010-10-14 19:14:55 -07:00
Jeremy Ellison
7c01d54fa3 Add configurable error parsing to the object mapper. 2010-10-14 12:51:12 -04:00
timkerchmar
320e96e48e Update headers for three20 support.
Add keyPath support to the object loader.
2010-10-12 14:32:06 -04:00
Blake Watters
bd93d43f94 Finished split into more logical components. Library now copies Headers to Build/RestKit and you can selectively link against the components your app needs. libRestKit.a contains everything from the core library. 2010-10-01 13:02:24 -04:00