Commit Graph

154 Commits

Author SHA1 Message Date
Beat Besmer
75bc2ddd36 Fix CoreData example project
- Update "Header Search Path"
- Link against QuartzCore
- Use the new `mappingForClass: inManagedObjectStore:`
2012-02-25 14:22:09 -05:00
Blake Watters
6db4a0a170 Fix broken XML mapping in RKTwitter example. fixes #400 2012-02-25 14:16:09 -05:00
Brian Morton
b44c4974ee Fix RKTableViewExample.
* Add necessary frameworks and header configuration.
* Update calls to deprecated methods.
2012-02-20 23:52:09 -08:00
Greg Combs
60a1dfc86a Rudimentary cleanup on the table view example, just updating framework method names. 2012-02-10 16:30:55 -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
5bc1518cc5 Use URL mapping registration rather than directly providing an object mapping in RKKeyValueMappingExample 2012-01-20 10:21:57 -05:00
Blake Watters
7c5ad95816 Updated all example projects to reflect changes. 2012-01-20 10:21:19 -05:00
Blake Watters
9208101350 Migrated Three20 support and DiscussionBoard to standalone projects.
See https://github.com/RestKit/RKThree20 and https://github.com/RestKit/RKDiscussionBoard
2011-12-02 09:26:38 -05:00
Blake Watters
563f5e909b Updated all example projects to build against the new project. Cleaned up header imports for flattened project structure 2011-12-02 09:26:36 -05:00
Blake Watters
5b718890ac Checking in work in progress on the library reorganization 2011-12-02 09:26:35 -05:00
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
c45d3b2d33 Implemented example application building RestKit into a CLI utility for parsing files and evaluating keyPaths against the results. refs #409 2011-10-16 02:37:22 -04:00
Blake Watters
6084225df6 Minor example project refresh
* Fixed invalid use of dateFormatStrings in Twitter examples
* Cleared some deprecation warnings
* Reapplied header search paths to fix Code Sense issues
2011-10-05 23:14:44 -04:00
Blake Watters
2d281e60d3 Investigated issues surrounding inability to change HTTP AUTH credentials thoroughly. fixes #250, #237, #127
These issues has been open for some time. I have added thorough unit test coverage
for scenarios of mutating the HTTP AUTH credentials on the RKClient and on individual
RKRequest instances. Everything seems to work fine.

Also added RKAuthenticationExample to RKCatalog for testing. Needs to be updated with
support for using OAuth.
2011-09-27 23:59:06 -04:00
Blake Watters
4e7d6e674a Merge pull request #325 from allenwei/master
Can not update user's token if token changed at server side
2011-09-21 05:53:51 -07: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
Blake Watters
70c73f2981 Fixed issue with order dependence in Core Data connections. fixes #173
Since OM 2.0 connection of relationships happened during the object mapping operation
instead of aggregately at the end of the process. In this commit, we have introduced a lightweight
queue for deferring portions of the mapping operation until a larger aggregate mapping has completed.

The changes are as follows:
* Introduced RKMappingOperationQueue for queueing portions of mapping. This is a synchronous queue modeled off
of NSOperationQueue that does NOT use threading (for Core Data friendliness).
* RKObjectMappingOperation now has a RKMappingOperationQueue queue property that defaults to nil
* RKObjectMappingOperation instances built via RKObjectMapper will has a mapping operation queue
assigned to the property.
* If a queue is present, RKManagedObjectMappingOperation will use it to defer the connection of relationships.
* At the end of an RKObjectMapper process, the mapping operation queue used by all mapping operations created
during the process will be executed. This allows all relationships to be connected after all object creation
has completed.

The queue is general purpose, though currently only used for the connection of relationships.
2011-09-20 12:02: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
allenwei
cadf91e4f2 fix issue: can not update user's token if token changed 2011-09-03 02:16:19 +08:00
Blake Watters
ef11b13c8e Reworked installation and build process to eliminate the need to configure the Header and Library search paths. Updated all example projects to match. This makes the use of the DerivedData directory a requirement going forward. fixes #323 2011-09-01 21:54:45 -04:00
Blake Watters
b96940cc64 Eliminated requirement to use -all_load linker flag. Fixed breakage in OS X builds due to ivar/property name disagreement. Removed references to all_load from the install docs. fixes #239 2011-09-01 20:52:46 -04:00
Blake Watters
d81079168c Expanded rake validate task to build all the example projects. fixes #300 2011-08-16 21:11:21 -04:00
Blake Watters
670234b775 Added support for polymorphic object mapping (Github #105, #244). This enables you to dynamically map objects to different destination classes or using different mapping strategies via configuration or callbacks. See Docs/Object Mapping.md for details.
Other changes include:
* Eliminated the RKObjectFactory protocol and implementations. Object mapping instances themselves are
now responsible for instantiating target objects for mapping.
* Introduced RKObjectAbstractMapping superclass for RKObjectMapping and RKObjectPolymorphicMapping.
* Updated example applications to use block object loaders (RKTwitter and RKTwitterCoreData)
* Refactored method signatures of RKObjectMapper, RKObjectMapping, and RKObjectMappingProvider to reflect the
existence of abstract mapping types. This was necessary to make polymorphic mappings integrate cleanly.
* Fixed overlap in RestKit error domains between network and object mapping. fixes #208
2011-07-30 16:00:36 -04:00
Blake Watters
32e08d31a6 Fix issues with login/logout on discussion board and show off new block helpers and URL mutation in the DBUser class. fixes #214 2011-07-24 19:16:36 -04:00
bmctigue
f1fdbe96ca Adjusted seed database code so the seed database is saved with the default seed database name. 2011-07-01 11:42:24 -07:00
Blake Watters
bea40036a9 Fixing breakage and log silence on Twitter Core Data seeding example. 2011-07-01 09:25:56 -04:00
Blake Watters
a78b4c654d Added special 'App' logging component for logging messages via RKLog() from your app. closes #183 2011-06-30 15:11:58 -04:00
Blake Watters
42d4849f41 Fixing invalid instantiation of reachability observer 2011-06-30 10:37:37 -04:00
Blake Watters
5a2f937a52 Reworked notifications for consistency with Cocoa idioms. Simplified code paths through the queue. Tweaked the logging for easier info at the Debug level without having to drop down to Trace. 2011-06-29 16:18:18 -04:00
Blake Watters
853704b2fd Rework notifications to allow request queue to observe only the requests it dispatches instead of all of them. Fixes incorrectly decrementing loading count. 2011-06-29 15:36:10 -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
3dfbaf1810 Updated to support setting default value instead of nil when an attribute is missing in the payload. For Core Data backed models, we consult the entity definition to obtain the default value. closes #117 2011-06-28 15:22:04 -04:00
Blake Watters
4773542a9e Fix breakage in Core Data 2011-06-23 09:21:54 -04:00
Janos Rusiczki
52666d6147 replaced deprecated methods with the current ones 2011-06-21 04:25:15 -07: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
2493828414 Make imports of RKParser relative so they resolve correctly outside of the library project 2011-06-13 08:33:34 -04:00
Blake Watters
8e5fa664e8 Cleaned up miscellaneous artifacts from squashing object mapping 2.0 2011-06-11 20:34:10 -04:00
Blake Watters
27ea307816 Fix crash in RKCatalog. Suppress warning about symbol visibility during linking. 2011-06-11 20:27:33 -04:00
Blake Watters
9299cabc11 Implemented flexible logging solution utilizing the excellent LibComponentLogging library. 2011-06-11 20:25:28 -04:00
Blake Watters
69ded29245 Improved Three20 integration by leveraging object mapping to instantiate TTTableItems 2011-06-11 19:33:42 -04:00
Blake Watters
8be34582a5 Ported DiscussionBoard to new Three20 class structure 2011-06-11 19:31:21 -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
Victor Kryukov
16ee0d278c Format lines better 2011-06-11 21:55:55 +04:00
Victor Kryukov
26e240d224 Customize view in loadView, not createModel 2011-06-11 21:55:31 +04:00
Victor Kryukov
71fb2d1a0c Remove unused _tableTitleHeaderLabel from DBResourceListTableViewController 2011-06-11 21:55:05 +04:00
Victor Kryukov
b25be71bab Use relative paths in #imports to prevent XCode 4.2 from complaining 2011-06-11 21:54:17 +04:00
Victor Kryukov
5db087a73a Remove duplicate declarations for createdAt, updatedAt, userID and user from DBPost
DBPost inherits from DBContentObject which has these accessors already defined.
2011-06-11 21:41:20 +04:00
Victor Kryukov
eca655abbd Add Three20.bundle to make sure TTAlert works 2011-06-11 14:47:41 +04:00
Blake Watters
ade94534a5 Cancel all requests during dealloc. 2011-05-10 22:58:33 -04:00