Blake Watters
d75fd7d0b0
Refactored RKReachabilityObserver to work around issues with iOS 5 + host reachability and expand its capabilities. closes #408
...
* Added support for monitoring by IP address or hostname as well as local Wifi and Internet access generally
* Eliminated usage of synchronous calls to obtain reachability flags during status checks
* Reworked SystemConfiguration reachability callback to cache flags
* RKClient now monitors Internet access instead of hostname based reachability by default. baseURLReachabilityObserver eliminated in favor of reachabilityObserver. It is now a retain property that can be customized
* Queue suspension is now tied to the reachability observer rather than baseURL mutation
2011-10-19 08:51:37 -04:00
Blake Watters
eb887e38c6
Refactored OAuth support for merge into master. fixes #84 , #211
...
Cleaned up @rodchile's excellent work integration OAuth 1.0 and 2.0 into RestKit. Changes
are as follows:
* Introduced new RKRequestAuthenticationType to replace the forceBasicAuthentication and other
methods for influencing how authorization works.
* Moved TDOAuth code into Vendor/
* Renamed authorization code flow classes and delegate methods for clarity.
2011-09-20 15:52:17 -04:00
Greg Combs
62d7042ebc
Merge pull request #334 from parkerboundy/add-apache-license
...
Add the Apache License to headers (Issue #145 ) Closes #145 . Thanks @parkerboundy.
2011-09-14 21:56:15 -07:00
Greg Combs
fc5f2b38be
Minor cleanup of some whitespace after recent feature pull requests
2011-09-13 01:30:43 -05:00
Greg Combs
6dd1e8da40
Now gracefully handles escaping interpolated resource paths in RKRouter, RKMakePathWithObject, and RKPathMatcher. By adding an encoding handler to SOCKit, we now (by default, but optionally) add percent escapes to each object's property value while it's being interpolated into a resource path pattern, like /stuff/things/:others?apikey=:apikey ... that way it won't brutally mangle the slashes and question marks and ampersands that exist in the resource path pattern, while at the same time properly escaping those same characters when they occur inside the object's property value. Closes #221
2011-09-13 00:50:55 -05:00
Blake Watters
5c359edfc5
Use relative imports for headers in Support module. Removed import of SCNetworkReachability in RKClient
2011-09-08 19:26:33 -04:00
Blake Watters
bebc08e34c
Remove improper import of RKObjectLoader in RKClient
2011-09-08 19:22:28 -04:00
Parker
e8b24a3959
added apache license to everything in the Network directory
...
I got tired of doing individual commits for each file, so I just did the
rest of the directory.
2011-09-07 10:45:42 -04:00
Greg Combs
e38562ffce
Introduces RKPathMatcher. This is basically a dressed up front end to jverkoey/SOCKit. Using this will make it very easy to do complex things with patterns, resource paths, and object property interpolation thereof. Whereas RKMakePathWithObject() once took parenthesized parameters like "/stuff/(things)" it now uses colons like "/stuff/:things". It has specs and updated header docs where appropriate. Closes #305 .
2011-09-06 15:51:18 -05:00
Blake Watters
4299cab994
Added convenience accessors on RKObjectManager for the requestCache and requestQueue. Cleaned up some styling and normalized method names.
2011-09-06 11:36:50 -04:00
Blake Watters
d9d0f7a650
Eliminated the global sharedQueue in favor of allowing each RKClient to own its a private queue. This eliminates problems where multiple clients are tracking reachability notifications and mutating the suspension state on a single queue. If you want to use a single queue across multiple RKClient instances, you can assign a single queue to both and worry about suspension and reachability yourself. fixes #278
2011-09-03 15:52:45 -04:00
Blake Watters
84032d9aa6
De-emphasized the use of the sharedQueue and improved management of queue suspension state when changing out the baseURL on RKClient. This should prevent the queue from becoming suspended beyond the life of an RKClient that suspended it. Queues are now also properties on a per-client and per-request basis, so it is easier to segregated parts of your app into different queues. The relationship between RKRequest and RKRequestQueue should be decoupled at some point.
2011-08-18 11:48:37 -04:00
Blake Watters
9420af3276
Remove observer in dealloc
2011-08-10 20:29:58 -04:00
Blake Watters
d5cc021014
Merging SSL certificate validation support from #131
2011-07-27 08:40:33 -04:00
Blake Watters
6376274900
Fixes for URL encoding of paramters in GET request. closes #193
2011-07-06 15:27:40 -04:00
Blake Watters
348e86cbc8
Fix for inappropriate suspension of the main queue when using an IP address instead of a hostname.
2011-07-05 16:23:38 -04:00
Blake Watters
93d84bc463
Added comments about cache
2011-06-29 13:42:19 -04:00
Blake Watters
2a8ece97c1
Improvements to reachability, the request queue, logging throughout the network layer, decoupling of components via notifications, reliability improvements for unit tests in the cache layer. Improved thread-local cleanup routines inside the managed object store. Changing base URL's is now more reliable. fixes #171 , #158 , #113 , #104 , #102
2011-06-29 13:28:14 -04:00
Blake Watters
0954d4a063
Fixing more memory leaks
2011-06-20 15:03:35 -04:00
Blake Watters
99ae37037a
Fixes for memory leaks with RKParams related to HTTPBodyStream causing a retain
2011-06-20 13:41:42 -04:00
Blake Watters
9299cabc11
Implemented flexible logging solution utilizing the excellent LibComponentLogging library.
2011-06-11 20:25:28 -04:00
Blake Watters
f2ceefa012
Merge Request Queue (See issue #75 ):
...
* Introduces RKRequestCache for cacheing responses (supports ETag conditional GET, use cache if available, use cache on error, etc.) closes #75
* Updates to Three20 layer to eliminate need for intermediary TTTableItem classes closes #76
* Fixes to ensure iOS 3.x compatability:
* Switched compiler to Clang
* Updated conditional checks for UIBackgroundTask symbols to ensure runtime safety on iOS 3.x
* Removed unnecessary linkage against UIKit and CoreFoundation from library targets
* Fix for issue where RKRequest objects could become stuck in infinite loop within RKRequestQueue loadNextInQueue if you start
a request and then cancel immediately. On cancel only decrement loadCount if the request has start loading. refs #122
2011-06-11 19:28:44 -04:00
Blake Watters
9416ad9cf6
Added gcov to specs. Added HTTP Basic Authorization optimization
2011-06-11 19:27:18 -04:00
Blake Watters
f3c0995d5e
Implementation of Object Mapping 2.0 design:
...
* Removed RestKit from inheritance hierarchy
* Mappings are implemented as concrete classes
* Mapper is much more flexible & powerful
* Much more robust error handling
* Serialization is reimplemented as an object mapping operation
* Added ability to serialize to JSON natively
* Reworked Core Data integration
* Simplified the codebase substantially
2011-06-11 19:26:56 -04:00
Blake Watters
ff2367d284
Moved query path appending to RKPathAppendQueryParams for convenience. Deprecated RKClient flavor.
2011-04-27 09:05:18 -04:00
Blake Watters
695c262d6e
Added Appledoc markup to RKClient
2011-04-14 22:57:42 -04:00
Blake Watters
9593612aab
Closes gh-47. Initial implementation of OS X build integrating changes submitted by Felix Holmgren ( https://github.com/Felixyz/RestKit ).
...
* Factored out display of alerts into RKAlert interface that hides the differences between UIKit and OS X Cocoa.
* Added macosx to supported platforms to enable build on OS X.
* Configured project to use conditional architectures to enable building on OS X and iOS from the same targets.
* Implemented a bare-bones OS X example app.
* Create `rake build` task for building RestKit against iOS and OS X SDK for quick testing.
2011-04-12 21:02:25 -04:00
Blake Watters
c90ec2770d
Finished cleanup of HTTP AUTH and XML Support. Ready to tag 0.9.1
2011-03-28 23:29:06 -04:00
Blake Watters
88a1b013fc
Merge remote branch 'origin/0.9' into core-data-cleanup
...
Conflicts:
Code/CoreData/CoreData.h
Code/CoreData/RKManagedObjectStore.h
Code/CoreData/RKManagedObjectStore.m
Code/CoreData/RKObjectSeeder.h
Code/CoreData/RKObjectSeeder.m
Code/ObjectMapping/RKObjectLoader.m
Code/ObjectMapping/RKObjectManager.m
Code/ObjectMapping/RKObjectMapper.m
RestKit.xcodeproj/project.pbxproj
2011-03-19 21:26:13 -04:00
Blake Watters
e03c6d3d10
Fixed crash during dealloc of RKClient due to initialization of baseURL observer using a blank host. Updated the object mapper to support class/keypath when loading a single object. Some updates to the UISpec harness to get things working again.
2011-02-25 14:42:50 -05:00
Blake Watters
2aec89b14c
More cleanups. Have a bug in the refactored object loader
2011-02-13 03:33:37 -05:00
Blake Watters
bf1cadc72e
Implemented RKMakePathWithObject. Cleaned up some TODO's
2011-01-20 11:24:47 -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
Jeff Arena
c20062cb4e
fixed a memory leak associated with the new 503 alert strings on the client
2011-01-06 12:09:42 -08: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
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
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
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
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
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
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