Commit Graph

288 Commits

Author SHA1 Message Date
Blake Watters
57183b364f Fix for warning emitted due to elimination of findOrCreateInstanceOfEntity:. Search Word functionality restored. closes #584
* Updates to the Core Data layer such that NSManagedObjectContexts now have a reference to the managed object store
they belong to.
* NSManagedObject instances can now return the managed object store they belong to.
* Relaxed the coupling to the sharedManager present within the RKSearchableManagedObject class.
* Expanded documentation of RKSearchableManagedObject
2012-03-14 17:08:02 -04:00
Brian Morton
80103bb6b3 Change test for allowing newly added date formatters priority so that it uses the updated fixture and reversable favoriteDate. Rearrange order of defaultDateFormatters to match their order before changing defaultDateFormatters to being prepended. 2012-03-13 09:43:37 -07:00
Brian Morton
10e3c17483 Merge pull request #577 from spenrose/date-formatter
Added default date formatter to start of NSArray
2012-03-13 09:24:20 -07:00
Blake Watters
5ffeee38d4 Ensure serializationMIMEType is configured when initializing object loaders via loaderWithURL: or loaderWithResourcePath: fixes #567 2012-03-12 20:34:31 -04:00
Blake Watters
896de8f1eb Respect modified values set for properties within key-value validation callbacks. fixes #565 2012-03-12 20:22:11 -04:00
Charlie Savage
08e65ac108 Remove references to NSOrderedSet to maintain iOS 4.x compatability. 2012-03-11 14:48:56 -06:00
Scott Penrose
5b8f1c34d6 Always add default date formatters to start of array to be tried first. RKISO8601DateFormatter will match a lot of different dates and most likely your default date formatter was not getting hit since it was last in the list. 2012-03-01 22:51:13 -05:00
Blake Watters
6db4a0a170 Fix broken XML mapping in RKTwitter example. fixes #400 2012-02-25 14:16:09 -05:00
Robert Altman
99a108096f Added support for parser class specification by regular expression. closes #489 2012-02-25 13:27:41 -05:00
Blake Watters
6723502372 Merge branch 'hotfix/545-conditional-nsorderedset' into development 2012-02-25 12:03:48 -05:00
Blake Watters
e66f65bb5e Use runtime checks for NSOrderedSet class to enable building against iOS 4.x and OS X 10.6. fixes #568, #545 2012-02-25 11:44:13 -05:00
Jeff Arena
1cd22d5b33 First pass at replacing RKManagedObjectCache with a more flexible block approach that leverages the new resource path pattern matching approach to registering objectMappings. 2012-02-23 22:30:08 -05:00
Blake Watters
c2e1cb0e4f Inform the delegate of object mapping events when relationships are set 2012-02-23 20:50:43 -05:00
Blake Watters
e904394b6b Miscellaneous cleanups 2012-02-17 16:34:03 -05:00
Blake Watters
d456c37a20 Minor documentation cleanup for paginator 2012-02-16 10:48:24 -05:00
Blake Watters
4d48ef4729 Fixed breakage in OS X support 2012-02-15 17:48:59 -05:00
Blake Watters
948cc85873 Added new pre-flight delegate callbacks for customization of RKRequest and RKObjectLoader instances before dispatch 2012-02-15 12:06:24 -05:00
Blake Watters
3d0f0ab39e Introduced the RKTableController component for iOS.
RKTableController provides a flexible, integrated system for driving iOS table views using
the RestKit object mapping engine. Local domain objects can be mapped into table cells within a
collection or presented for editing as part of a form. There are three flavors of table controllers
available:

* Static Tables: RKTableController can be used to render simple static tables that are composed of RKTableItems
presented in RKTableSections. Table items can quickly be built and added to a table without a backing model
or can have content object mapped into them for presentation.
* Network Tables: RKTableController can also render a table with the results of a network load. The typical use
case here is to have RestKit retrieve a JSON/XML payload from your remote system and then render the content into
a table.
* Core Data Tables: RKFetchedResultsTableController can efficiently drive a table view using objects pulled from a
Core Data managed object context. Typical use-cases here are for the presentation of large collections that are
pulled from a remote system, offering offline access, or speeding up a UI by using Core Data as a fast local cache.

RKTableController supports a number of bells and whistles including integrated searching/filtering and pull to refresh.
2012-02-10 16:30:54 -05:00
Blake Watters
d4e3c0d559 Remove Appledoc significant asterisk in non-documenting comment 2012-02-02 09:21:00 -05:00
Brian Morton
f92fbb9f8e Fix issue that caused appledoc to fall over while building documentation.
There's currently a known issue for appledoc (https://github.com/tomaz/appledoc/issues/147) that causes it to fall over when it encounters a method declaration in an implementation that is missing a type (even if its in the header file).  While this is valid Objective-C, lets update this to allow appledoc to go on its merry little way.

* Fix 1 declaration relating to atKeyPath: in RKObjectMapper.m
* Fix 2 declarations relating to atKeyPath: in RKObjectMapper_Private.h
* Fix 1 declaration relating to atKeyPath: in RKObjectMappingOperation.m

All declarations were changed to declare keyPath as an (NSString *).
2012-01-28 13:40:38 -08:00
Christopher Swasey
b3c5ba62d2 Replace the XMLParser with one based on Insert-Witty-Name/XMLReader 2012-01-24 12:01:47 -05:00
Blake Watters
9e0149fc0f Deprecate RKMakePathWithObjectAddingEscapes and cleanup usage within the Router 2012-01-24 09:51:05 -05:00
Jeff Arena
5b9445cef0 Slight refactor of RKObjectPropertyInspector to expose a previously private, instance method as a public, class method, for use in processing transformable attributes in the associated CoreData category. Fixes #498. 2012-01-23 18:10:06 -05:00
Jeff Arena
aac9abc0ad Audit uses of setValue:forKey: in mapping operations and replace with setValue:forKeyPath: where appropriate. Fixes #421. 2012-01-21 13:11:35 -05:00
Christopher Swasey
886ec75283 Import http://boredzo.org/iso8601parser/ and add it as a defaultDateFormatter for parsing ISO8601 strings. Fixes #438 2012-01-20 15:13:45 -05:00
Jeff Arena
700456c8eb Add support for serializing NSOrderedSet. Fixes #514. 2012-01-20 14:27:19 -05:00
Christopher Swasey
b1f4e1ffe5 RKObjectMappingOperation#parseDateFromString now transforms string representations of integers into dates as if they were unix timestamps 2012-01-20 12:59:16 -05:00
Jeff Arena
db0646ed19 Change NSNumber -> NSDate transformation to use doubleValue instead of intValue to ensure we do not lose precision on date conversion. Fixes #455. 2012-01-20 11:57:47 -05:00
Jeff Arena
dbb12b37a8 Fix a few issues with broken tests 2012-01-20 11:29:17 -05:00
Blake Watters
4b46ada794 Copy the error mapping to the temporary mapping provider to ensure error handling is correct. 2012-01-20 10:21:56 -05:00
Blake Watters
d69adccdd6 Added block callback handlers and tests for RKObjectPaginator. 2012-01-20 10:21:56 -05:00
Blake Watters
1d27f7bbbe Refactored object manager API's to de-emphasize delegates and removal duplication of blocks and delegates. Added block callbacks to RKObjectLoader. 2012-01-20 10:21:56 -05:00
Blake Watters
4bd12ea987 Apply rootKeyPath within the mapper rather than the object loader 2012-01-20 10:21:19 -05:00
Blake Watters
7c5ad95816 Updated all example projects to reflect changes. 2012-01-20 10:21:19 -05:00
Blake Watters
560032fd6d Additional documentation and miscellaneous test coverage. 2012-01-20 10:21:19 -05:00
Blake Watters
7a1dfd0857 Added support for selecting object mapping using pattern matching on resourcePath. 2012-01-20 10:21:19 -05:00
Blake Watters
3a8221aa08 Added support for configuring and retrieving object mapping via resource path patterns. 2012-01-20 10:21:19 -05:00
Blake Watters
6abbb34ef0 Introduced mapping contexts support.
Extended RKObjectMappingProvider to store collections of object mappings for different use cases. The framework
now stores object mappings, serialization mappings, an error mapping and a pagination mapping using the context
support. Contexts can be added to the provider via method calls or extension via a category.
2012-01-20 10:21:19 -05:00
Blake Watters
89b02e7550 Refactored paginator to use RKURL rather than relying on its own baseURL and resource path. Expanded paginator documentation. 2012-01-20 10:21:18 -05:00
Blake Watters
412b0f9756 Work in progress on cleanup 2012-01-20 10:21:18 -05:00
Ray Fix
ab3ec5495f Leaks brought to my attention by the static analyzer. 2012-01-20 10:21:18 -05:00
Ray Fix
3d03959d06 Polish RKObjectPaginator.
Initialization
I need the object paginator's object loaders to 
know about the various header settings of 
the RKClient when it constructs them.  However,
the paginator should not depend on an RKObjectManager.
The proposed solution is to pass a block that lets
an outsider custom configure the object loaders
that get created.  The object manager shows how
it is done.

Error Handling
We don't want to have a separate set of error handling
if using a paginator versus using an RKObjectLoader.
When an error is encountered, the paginator should 
allow access to the underlying RKObjectRequest that
produced the error.

Cleanup
The contained object loader needs to nil out the delegate
before going away.

NSLogs changed to RKLog

Pagination computation
The page count can be computed when the pagination 
parameters are mapped.  Note you must use the ceil
operation to compute this value.  If there are 3.1 pages
that means there are 4 pages.
2012-01-20 10:21:18 -05:00
Blake Watters
fb41eb73ec Work in progress on responsibility cleanup 2012-01-20 10:21:18 -05:00
Blake Watters
254553dc7c Initial implementation of RKObjectPaginator 2012-01-20 10:21:18 -05:00
Brian Morton
0f3f3d5702 Add support for mapping an array to an NSOrderedSet. 2012-01-13 00:04:40 -08:00
Blake Watters
4d99d28a4d Merge pull request #477 from rayfix/fix-log-root-key-path
Fixed logging of root key path on object mapping. Remove TODO comment.
2011-12-16 21:23:21 -08:00
chethan
ea0cbed8dc Fixed logging of root key path on object mapping. Remove TODO comment that is done. 2011-12-16 18:20:24 -08:00
Julien Grimault
a1e2061106 Modified asserts in RKObjectLoader processMappingResult to allow synchronous requests. 2011-12-13 20:58:15 -05:00
Blake Watters
479864902b Fixed all build warnings on OS X Framework target 2011-12-08 23:23:20 -05:00
Blake Watters
6f68ffb342 Applied patch from Scott Penrose to handle issues with NSNull values mapped to Core Data properties. closes #436
Added RKLogWarning for aiding in further debugging. So far unable to trap this in a unit test, but have had
several complaints about the issue on the mailing list.
2011-12-02 09:27:23 -05:00