The document provides an overview of various mobile and cloud frameworks for iOS development. It discusses frameworks for making network requests and working with APIs like AFNetworking and RestKit. It also covers data storage and synchronization frameworks like Core Data, RestKit, and AFIncrementalStore. The document demonstrates examples of using RestKit to map API responses to Core Data objects and synchronize data with a backend using AFIncrementalStore. It also mentions testing frameworks like KIF and FRANK and cloud platforms like Deployd, Parse, and APIgee that can be used as backends.
22. Next Step - Data Sync
AFIncrementalStore
AFNetworking
NSURLConnection
NSIncrementalStore
NSOperation
Core Data
23. a snap into AFIncrementalStore
usual
unusual
YOUR CODE
YOUR CODE
RESTful server
CoreData
framework
CoreData
framework
+
AF
Incremental
Store
AFNetworking
24. working with AFIncrementalStore
is the same as with CoreData
@interface
TasksViewController()<NSFetchedResultsControllerDelegate>!
@property NSFetchedResultsController *fetchedResultsController;!
@end!
!
- (UITableViewCell *)tableView:(UITableView *)tableView!
cellForRowAtIndexPath:(NSIndexPath *)indexPath !
{!
...!
[self configureCell:cell forRowAtIndexPath:indexPath];!
return cell;!
}!
!
- (void)configureCell:(UITableViewCell *)cell !
forRowAtIndexPath:(NSIndexPath *)indexPath !
{!
NSManagedObject *managedObject = [self.fetchedResultsController
objectAtIndexPath:indexPath];!
cell.textLabel.text = [managedObject valueForKey:@"text"];!
27. Helios-ready iOS frameworks
Antenna
Cargo Bay
Extensible Remote Logging
The Essential StoreKit
Companion
Orbiter
AFIncrementalStore
Push Notification
Registration
Core Data Persistence with
AFNetworking, Done Right
SkyLab
Multivariate & A/B Testing
Ground Control
Remote Configuration
AFNetworking
A Delightful iOS & OS X
Networking Framework
28. Cocoa Pods
http://cocoapods.org
$ [sudo] gem install cocoapods
$ pod setup
myproject$ pod install
Podfile example:
platform :ios, '7.0'
pod 'AFNetworking', '~> 2.0.3’
pod 'ICViewPager', '~> 1.5’
RestKit
AFNetworking
AFIncrementalStore
AFAmazonS3Client
...
https://github.com/
CocoaPods/Specs
29. Testing
★
many frameworks comes with tests, bros
KIF
FRANK
https://github.com/kif-framework/KIF
https://github.com/moredip/Frank
30. KIF
★
★
★
leveraging the accessibility attributes
conducted synchronously in the main thread
uses undocumented Apple APIs
- (void)testSuccessfulLogin!
{!
[tester enterText:@"user@example.com"
intoViewWithAccessibilityLabel:@"Login User Name"];!
[tester enterText:@"thisismypassword"
intoViewWithAccessibilityLabel:@"Login Password"];!
[tester tapViewWithAccessibilityLabel:@"Log In"];!
!
// Verify that the login succeeded!
[tester waitForTappableViewWithAccessibilityLabel:@"Welcome"];!
}
31. ★
★
★
★
FRANK
from outer ruby space ‘cucumber’
'Selenium for native iOS apps'.
uses undocumented Apple APIs
totally different approach to testing in iOS
Feature: Various scenarios that exercise different parts of Frank!
!
Background:!
Given I launch the app !
!
Scenario: Counting number of rows in a table section!
Then I should see 3 rows in section 0!
!
Scenario: Scrolling to the bottom of the table !
When I touch "Larry Stooge"!
And I touch "User Roles"!
Then I should not see "Returns"!
When I scroll to the bottom of the table!
Then I should see "Returns"
32. READY TO USE CLOUDS
★Deployd.com
- free to use
- javascript based
★★Parse.com
-all essential platforms supported
-“out of the box” basic data entities
-free to test
★★★APIgee.com (books & webcasts)
- developer console to popular services
- intermediate data processing (eg.
-
convert xml to json, mapping, etc)
free to test