Blake Watters
8fc71f0fb0
Introduced new missing element mapping policy for controlling whether or not nil values will be set for missing elements from payloads.
2011-01-03 15:31:24 -05:00
Blake Watters
e49d8462a9
Yield to the run loop for a tenth of a second to allow the network reachability observer to be scheduled. This prevents issues where requests dispatched from an app delegate are denied access to the network.
2011-01-03 13:23:14 -05:00
Blake Watters
e7ac2b4577
Merge branch 'master' of github.com:twotoasters/RestKit
2011-01-03 12:52:25 -05:00
Blake Watters
f1db54c156
Introduced RKMakeURL and RKMakeURLPath convenience methods for generating NSURL and NSString URL's quickly against the sharedClient's base URL. This can be useful if you have some web content in your app that loads off of sub-paths and want the convenience & flexibility of working off of resourcePath's instead of full URL's.
2011-01-03 12:49:31 -05:00
Jeremy Ellison
340e587704
Refactor JSONRepresentation to stringFromObject: on RKParser. Fixes https://github.com/twotoasters/RestKit/issues/#issue/6
2011-01-03 12:40:20 -05:00
Jeff Arena
058e55242c
replace use of NSString method stringByAddingPercentEscapesUsingEncoding with CFString flavor CFURLCreateStringByReplacingPercentEscapesUsingEncoding, to ensure we do not miss any characters that should be escaped when performing RFC3875 percent escaping
2010-12-30 14:59:30 -08:00
Jeff Arena
716ecb4f26
added RKResponse property exposing the cookies available from the RKResponse headers
2010-12-30 13:29:11 -08:00
Jeff Arena
29f82dff77
fix for bug introduced in commit df05be1cbb8c08fe0dd6; now that we are checking the request method in the params setter, we need to ensure we set the method before setting the params when creating and preparing to send an RKRequest object from RKClient, otherwise we will lose all params for all methods other than GET
2010-12-30 13:28:01 -08:00
Blake Watters
394ebb307f
Don't pass a URL into Reachability
2010-12-30 14:28:41 -05:00
Jeremy Ellison
2367ba4293
Make SCNetworkReachability use just the hostname.
...
Fix examples to check for network connectivity.
2010-12-30 14:22:22 -05:00
Jeff Arena
df62bce0dd
add unauthorized convenience method on rkresponse
2010-12-29 17:04:37 -08:00
Blake Watters
a61728aa28
Fix incorrect comments about retaining object loaders. Fixed deprecated references to globalManager/globalClient
2010-12-27 21:56:38 -05:00
Blake Watters
979d79d414
Updated example project Base SDK
2010-12-27 21:23:57 -05:00
Blake Watters
667dcd51c8
Fixed incorrect mention about Core Data being optional.
2010-12-27 15:36:14 -05:00
Blake Watters
7283f19e43
Merge branch 'reachability-queue-three20'
...
Conflicts:
Code/Network/RKResponse.m
2010-12-23 14:10:17 -05:00
Blake Watters
df05be1cbb
Merge branch 'master' of https://github.com/pashields/RestKit into pashields-master
2010-12-13 17:49:04 -05:00
Jeff Arena
cf03116f54
fix for posting online/offline notifications
2010-12-11 01:55:21 -08:00
Jeff Arena
2b4a95df3c
added caching for filteredObject on the filterable model class to prevent expensive filtering operations every time we grab the objects from the model; added code to prevent an automatic load in offline mode when we have no cached objects, as our use of an error condition to signal a request failed in offline mode triggers a three20 error overlay that we likely do not want in what should be considered a normal operating mode (e.g. app offline with no objects for a view is not an error)
2010-12-09 11:47:20 -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
Marc Weil
f3af0feefc
Adding authentiction headers to request before sending to stop challenge
...
responses from being generated server-side on each request. This should
cut down overall request-response cycles by 50% when dealing with
authenticated services.
2010-12-05 12:11:03 -05:00
Jeff Arena
f875ec167d
fixed timing issue with setting loadedTime
2010-12-04 22:23:30 -08:00
Jeff Arena
af0c7ab36e
fix bug with setting loaded time when loading from cache
2010-12-04 09:06:39 -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
Blake Watters
a53f28e339
First cut at queue support.
2010-12-01 14:56:16 -05: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
c19d305b45
fix for mapper bug that was assuming a 1:1 mapping between object classes and elements; removed method from dictionary category that made the 1:1 mapping assumption that caused the mapper bug; collapsed the RKRequestModel and RKRequestTTModel classes into RKRequestTTModel; made changes to the Three20 integration to perform all cache loading and network loading in response to Three20 load calls; used isOutdated TTModel method to enforce refreshRate on RKRequestTTModel
2010-11-30 15:08:05 -08:00
Patrick Shields
785d14cb42
Merge branch 'master' of https://github.com/twotoasters/RestKit
2010-11-23 18:00:58 -05:00
Jeff Arena
fbe8457dd7
fix for updating thread dictionary cache of existing managed objects to ensure objects created during a single mapping operation are not duplicated
2010-11-17 14:31:12 -08:00
Jeff Arena
8b38d4387a
add null check to prevent exceptions when we have created a local object that has yet to be synced with the server, and thus does not yet have a primaryKey assigned
2010-11-15 19:50:49 -08:00
Jeff Arena
2a4f9435b9
new init methods on three20 models to allow for parameter setting
2010-11-12 15:17:42 -08:00
Blake Watters
5a72d0d57d
Fix for submission with incorrect MIME Type when only MIME type is provided
2010-11-12 17:28:37 -05:00
Blake Watters
9471aeb3b5
add missing retains
2010-11-12 16:49:42 -05: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
Patrick Shields
bea7ec607c
Required for not getting CF 303 errors. Should probably investigate this more, but don't need to use this.
2010-11-07 12:13:46 -05:00
Patrick Shields
16ce43aedd
Non core data example works, but relies on core data lib.
2010-11-03 22:12:21 -04:00
Patrick Shields
c0d160da29
Cleaning up twitter core data example. Added missing frameworks, static lib builds, and fixed out of date api calls.
2010-11-03 22:05:43 -04: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
Jeff Arena
0a3fd958d8
Merge branch 'master' of git://github.com/twotoasters/RestKit
2010-10-28 15:00:53 -07:00
Jeff Arena
23adeae524
added support for additional objectloader delegate method to three20 component
2010-10-28 15:00:31 -07:00
Blake Watters
66bcb412c1
Check for JSON response type before parsing
2010-10-28 16:09:40 -04:00
Blake Watters
e0844d1b88
Merge branch 'master' of github.com:twotoasters/RestKit
2010-10-28 13:13:20 -04:00
Blake Watters
9c0404e36e
Added MIMEType setter flavor for RKParams addData. Typical use case for a data field is to want to set the MIME Type. Added MobileCoreServices.framework to requirements and added to the UISpec target
2010-10-28 13:12:03 -04:00
Jeff Arena
cf7acd0ffa
changes to ensure we do not attempt to trigger a load when we are in offline mode
2010-10-27 17:02:20 -07:00
Jeff Arena
57e2403624
add support to core data component to hook up relationships from foreign keys present in the server payload
2010-10-27 17:00:31 -07:00
Blake Watters
8dbd8c5d69
remove www
2010-10-27 16:52:43 -04:00
Blake Watters
61e1d1f1e2
Added Twitter link
2010-10-27 16:51:47 -04:00
Blake Watters
8fef65e4df
Added optional MIME Type auto-detection using MobileCoreServices
2010-10-27 14:54:37 -04:00