afmotion 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +16 -0
- data/AFMotion.gemspec +19 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +53 -0
- data/README.md +135 -0
- data/Rakefile +14 -0
- data/app/app_delegate.rb +6 -0
- data/examples/AppDotNet/.gitignore +13 -0
- data/examples/AppDotNet/Gemfile +4 -0
- data/examples/AppDotNet/Gemfile.lock +48 -0
- data/examples/AppDotNet/Rakefile +10 -0
- data/examples/AppDotNet/app/app_delegate.rb +28 -0
- data/examples/AppDotNet/app/global_timeline_view_controller.rb +84 -0
- data/examples/AppDotNet/app/post.rb +23 -0
- data/examples/AppDotNet/app/post_table_view_cell.rb +44 -0
- data/examples/AppDotNet/app/user.rb +9 -0
- data/examples/AppDotNet/resources/profile-image-placeholder.png +0 -0
- data/examples/AppDotNet/resources/profile-image-placeholder@2x.png +0 -0
- data/examples/AppDotNet/spec/main_spec.rb +9 -0
- data/examples/AppDotNet/vendor/Podfile.lock +11 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.h +574 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.m +1187 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h +133 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m +341 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h +108 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m +237 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h +71 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m +136 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h +75 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m +131 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFNetworking.h +44 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h +68 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m +145 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h +295 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m +652 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h +89 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m +169 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h +78 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m +180 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking.podspec +28 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/LICENSE +19 -0
- data/examples/AppDotNet/vendor/Pods/AFNetworking/README.md +179 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h +574 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h +133 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h +108 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h +71 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h +75 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFNetworking.h +44 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h +68 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h +295 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h +89 -0
- data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h +78 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFHTTPClient.h +574 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h +133 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFImageRequestOperation.h +108 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFJSONRequestOperation.h +71 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h +75 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFNetworking.h +44 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h +68 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFURLConnectionOperation.h +295 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFXMLRequestOperation.h +89 -0
- data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h +78 -0
- data/examples/AppDotNet/vendor/Pods/Pods-Acknowledgements.markdown +26 -0
- data/examples/AppDotNet/vendor/Pods/Pods-Acknowledgements.plist +56 -0
- data/examples/AppDotNet/vendor/Pods/Pods-prefix.pch +12 -0
- data/examples/AppDotNet/vendor/Pods/Pods-resources.sh +19 -0
- data/examples/AppDotNet/vendor/Pods/Pods.bridgesupport +617 -0
- data/examples/AppDotNet/vendor/Pods/Pods.xcconfig +7 -0
- data/examples/AppDotNet/vendor/Pods/Pods.xcodeproj/project.pbxproj +998 -0
- data/examples/AppDotNet/vendor/Pods/PodsDummy_Pods.m +4 -0
- data/lib/afmotion/http.rb +55 -0
- data/lib/afmotion/http_client.rb +121 -0
- data/lib/afmotion/http_result.rb +25 -0
- data/lib/afmotion/image.rb +10 -0
- data/lib/afmotion/operation.rb +65 -0
- data/lib/afmotion/patch/NSString_NSUrl.rb +11 -0
- data/lib/afmotion/version.rb +5 -0
- data/lib/afmotion.rb +16 -0
- data/pkg/afmotion-0.0.1.gem +0 -0
- data/spec/http_client_spec.rb +104 -0
- data/spec/http_spec.rb +26 -0
- data/spec/operation_spec.rb +41 -0
- data/vendor/Podfile.lock +11 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.h +574 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.m +1187 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h +133 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m +341 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h +108 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m +237 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h +71 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m +136 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h +75 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m +131 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFNetworking.h +44 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h +68 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m +145 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h +295 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m +652 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h +89 -0
- data/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m +169 -0
- data/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h +78 -0
- data/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m +180 -0
- data/vendor/Pods/AFNetworking/AFNetworking.podspec +28 -0
- data/vendor/Pods/AFNetworking/LICENSE +19 -0
- data/vendor/Pods/AFNetworking/README.md +179 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h +574 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h +133 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h +108 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h +71 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h +75 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/AFNetworking.h +44 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h +68 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h +295 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h +89 -0
- data/vendor/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h +78 -0
- data/vendor/Pods/Headers/AFNetworking/AFHTTPClient.h +574 -0
- data/vendor/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h +133 -0
- data/vendor/Pods/Headers/AFNetworking/AFImageRequestOperation.h +108 -0
- data/vendor/Pods/Headers/AFNetworking/AFJSONRequestOperation.h +71 -0
- data/vendor/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h +75 -0
- data/vendor/Pods/Headers/AFNetworking/AFNetworking.h +44 -0
- data/vendor/Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h +68 -0
- data/vendor/Pods/Headers/AFNetworking/AFURLConnectionOperation.h +295 -0
- data/vendor/Pods/Headers/AFNetworking/AFXMLRequestOperation.h +89 -0
- data/vendor/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h +78 -0
- data/vendor/Pods/Pods-Acknowledgements.markdown +26 -0
- data/vendor/Pods/Pods-Acknowledgements.plist +56 -0
- data/vendor/Pods/Pods-prefix.pch +12 -0
- data/vendor/Pods/Pods-resources.sh +19 -0
- data/vendor/Pods/Pods.bridgesupport +617 -0
- data/vendor/Pods/Pods.xcconfig +7 -0
- data/vendor/Pods/PodsDummy_Pods.m +4 -0
- metadata +218 -0
@@ -0,0 +1,179 @@
|
|
1
|
+
<img src="https://github.com/AFNetworking/AFNetworking/raw/gh-pages/afnetworking-logo.png" alt="AFNetworking" title="AFNetworking" style="display:block; margin: 10px auto 30px auto;" class="center">
|
2
|
+
|
3
|
+
AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of [NSURLConnection](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html), [NSOperation](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSOperation_class/Reference/Reference.html), and other familiar Foundation technologies. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use. For example, here's how easy it is to get JSON from a URL:
|
4
|
+
|
5
|
+
``` objective-c
|
6
|
+
NSURL *url = [NSURL URLWithString:@"https://alpha-api.app.net/stream/0/posts/stream/global"];
|
7
|
+
NSURLRequest *request = [NSURLRequest requestWithURL:url];
|
8
|
+
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
|
9
|
+
NSLog(@"App.net Global Stream: %@", JSON);
|
10
|
+
} failure:nil];
|
11
|
+
[operation start];
|
12
|
+
```
|
13
|
+
|
14
|
+
Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac.
|
15
|
+
|
16
|
+
Choose AFNetworking for your next project, or migrate over your existing projects—you'll be happy you did!
|
17
|
+
|
18
|
+
## How To Get Started
|
19
|
+
|
20
|
+
- [Download AFNetworking](https://github.com/AFNetworking/AFNetworking/zipball/master) and try out the included Mac and iPhone example apps
|
21
|
+
- Read the ["Getting Started" guide](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking), [FAQ](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-FAQ), or [other articles in the wiki](https://github.com/AFNetworking/AFNetworking/wiki)
|
22
|
+
- Check out the [complete documentation](http://afnetworking.github.com/AFNetworking/) for a comprehensive look at the APIs available in AFNetworking
|
23
|
+
- Watch the [NSScreencast episode about AFNetworking](http://nsscreencast.com/episodes/6-afnetworking) for a quick introduction to how to use it in your application
|
24
|
+
- Questions? [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking) is the best place to find answers
|
25
|
+
|
26
|
+
## Overview
|
27
|
+
|
28
|
+
AFNetworking is architected to be as small and modular as possible, in order to make it simple to use and extend.
|
29
|
+
|
30
|
+
<table>
|
31
|
+
<tr><th colspan="2" style="text-align:center;">Core</th></tr>
|
32
|
+
<tr>
|
33
|
+
<td><a href="http://afnetworking.github.com/AFNetworking/Classes/AFURLConnectionOperation.html">AFURLConnectionOperation</a></td>
|
34
|
+
<td>An <tt>NSOperation</tt> that implements the <tt>NSURLConnection</tt> delegate methods.</td>
|
35
|
+
</tr>
|
36
|
+
|
37
|
+
<tr><th colspan="2" style="text-align:center;">HTTP Requests</th></tr>
|
38
|
+
|
39
|
+
<tr>
|
40
|
+
<td><a href="http://afnetworking.github.com/AFNetworking/Classes/AFHTTPRequestOperation.html">AFHTTPRequestOperation</a></td>
|
41
|
+
<td>A subclass of <tt>AFURLConnectionOperation</tt> for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request.</td>
|
42
|
+
</tr>
|
43
|
+
<tr>
|
44
|
+
<td><a href="http://afnetworking.github.com/AFNetworking/Classes/AFJSONRequestOperation.html">AFJSONRequestOperation</a></td>
|
45
|
+
<td>A subclass of <tt>AFHTTPRequestOperation</tt> for downloading and working with JSON response data.</td>
|
46
|
+
</tr>
|
47
|
+
<tr>
|
48
|
+
<td><a href="http://afnetworking.github.com/AFNetworking/Classes/AFXMLRequestOperation.html">AFXMLRequestOperation</a></td>
|
49
|
+
<td>A subclass of <tt>AFHTTPRequestOperation</tt> for downloading and working with XML response data.</td>
|
50
|
+
</tr>
|
51
|
+
<tr>
|
52
|
+
<td><a href="http://afnetworking.github.com/AFNetworking/Classes/AFPropertyListRequestOperation.html">AFPropertyListRequestOperation</a></td>
|
53
|
+
<td>A subclass of <tt>AFHTTPRequestOperation</tt> for downloading and deserializing objects with <a href="http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/PropertyLists/index.html">property list</a> response data.</td>
|
54
|
+
</tr>
|
55
|
+
|
56
|
+
<tr><th colspan="2" style="text-align:center;">HTTP Client</th></tr>
|
57
|
+
<tr>
|
58
|
+
<td><a href="http://afnetworking.github.com/AFNetworking/Classes/AFHTTPClient.html">AFHTTPClient</a></td>
|
59
|
+
<td>
|
60
|
+
Captures the common patterns of communicating with an web application over HTTP, including:
|
61
|
+
|
62
|
+
<ul>
|
63
|
+
<li>Making requests from relative paths of a base URL</li>
|
64
|
+
<li>Setting HTTP headers to be added automatically to requests</li>
|
65
|
+
<li>Authenticating requests with HTTP Basic credentials or an OAuth token</li>
|
66
|
+
<li>Managing an <tt>NSOperationQueue</tt> for requests made by the client</li>
|
67
|
+
<li>Generating query strings or HTTP bodies from an <tt>NSDictionary</tt></li>
|
68
|
+
<li>Constructing multipart form requests</li>
|
69
|
+
<li>Automatically parsing HTTP response data into its corresponding object representation</li>
|
70
|
+
<li>Monitoring and responding to changes in network reachability</li>
|
71
|
+
</ul>
|
72
|
+
</td>
|
73
|
+
</tr>
|
74
|
+
|
75
|
+
<tr><th colspan="2" style="text-align:center;">Images</th></tr>
|
76
|
+
<tr>
|
77
|
+
<td><a href="http://afnetworking.github.com/AFNetworking/Classes/AFImageRequestOperation.html">AFImageRequestOperation</a></td>
|
78
|
+
<td>A subclass of <tt>AFHTTPRequestOperation</tt> for downloading and processing images.</td>
|
79
|
+
</tr>
|
80
|
+
<tr>
|
81
|
+
<td><a href="http://afnetworking.github.com/AFNetworking/Categories/UIImageView+AFNetworking.html">UIImageView+AFNetworking</a></td>
|
82
|
+
<td>Adds methods to <tt>UIImageView</tt> for loading remote images asynchronously from a URL.</td>
|
83
|
+
</tr>
|
84
|
+
</table>
|
85
|
+
|
86
|
+
## Example Usage
|
87
|
+
|
88
|
+
### XML Request
|
89
|
+
|
90
|
+
``` objective-c
|
91
|
+
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://api.flickr.com/services/rest/?method=flickr.groups.browse&api_key=b6300e17ad3c506e706cb0072175d047&cat_id=34427469792%40N01&format=rest"]];
|
92
|
+
AFXMLRequestOperation *operation = [AFXMLRequestOperation XMLParserRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser) {
|
93
|
+
XMLParser.delegate = self;
|
94
|
+
[XMLParser parse];
|
95
|
+
} failure:nil];
|
96
|
+
[operation start];
|
97
|
+
```
|
98
|
+
|
99
|
+
### Image Request
|
100
|
+
|
101
|
+
``` objective-c
|
102
|
+
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 100.0f, 100.0f)];
|
103
|
+
[imageView setImageWithURL:[NSURL URLWithString:@"http://i.imgur.com/r4uwx.jpg"] placeholderImage:[UIImage imageNamed:@"placeholder-avatar"]];
|
104
|
+
```
|
105
|
+
|
106
|
+
### API Client Request
|
107
|
+
|
108
|
+
``` objective-c
|
109
|
+
// AFAppDotNetAPIClient is a subclass of AFHTTPClient, which defines the base URL and default HTTP headers for NSURLRequests it creates
|
110
|
+
[[AFAppDotNetAPIClient sharedClient] getPath:@"stream/0/posts/stream/global" parameters:nil success:^(AFHTTPRequestOperation *operation, id JSON) {
|
111
|
+
NSLog(@"App.net Global Stream: %@", JSON);
|
112
|
+
} failure:nil];
|
113
|
+
```
|
114
|
+
|
115
|
+
### File Upload with Progress Callback
|
116
|
+
|
117
|
+
``` objective-c
|
118
|
+
NSURL *url = [NSURL URLWithString:@"http://api-base-url.com"];
|
119
|
+
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url];
|
120
|
+
NSData *imageData = UIImageJPEGRepresentation([UIImage imageNamed:@"avatar.jpg"], 0.5);
|
121
|
+
NSMutableURLRequest *request = [httpClient multipartFormRequestWithMethod:@"POST" path:@"/upload" parameters:nil constructingBodyWithBlock: ^(id <AFMultipartFormData>formData) {
|
122
|
+
[formData appendPartWithFileData:imageData name:@"avatar" fileName:@"avatar.jpg" mimeType:@"image/jpeg"];
|
123
|
+
}];
|
124
|
+
|
125
|
+
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
|
126
|
+
[operation setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {
|
127
|
+
NSLog(@"Sent %lld of %lld bytes", totalBytesWritten, totalBytesExpectedToWrite);
|
128
|
+
}];
|
129
|
+
[operation start];
|
130
|
+
```
|
131
|
+
|
132
|
+
### Streaming Request
|
133
|
+
|
134
|
+
``` objective-c
|
135
|
+
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://localhost:8080/encode"]];
|
136
|
+
|
137
|
+
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
|
138
|
+
operation.inputStream = [NSInputStream inputStreamWithFileAtPath:[[NSBundle mainBundle] pathForResource:@"large-image" ofType:@"tiff"]];
|
139
|
+
operation.outputStream = [NSOutputStream outputStreamToMemory];
|
140
|
+
[operation start];
|
141
|
+
```
|
142
|
+
|
143
|
+
## Requirements
|
144
|
+
|
145
|
+
AFNetworking 1.0 and higher requires either [iOS 5.0](http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS4.html) and above, or [Mac OS 10.7](http://developer.apple.com/library/mac/#releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_6.html#//apple_ref/doc/uid/TP40008898-SW7) ([64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)) and above.
|
146
|
+
|
147
|
+
For compatibility with iOS 4.3, use the latest 0.10.x release.
|
148
|
+
|
149
|
+
### ARC
|
150
|
+
|
151
|
+
AFNetworking uses ARC as of its 1.0 release.
|
152
|
+
|
153
|
+
If you are using AFNetworking 1.0 in your non-arc project, you will need to set a `-fobjc-arc` compiler flag on all of the AFNetworking source files. Conversely, if you are adding a pre-1.0 version of AFNetworking, you will need to set a `-fno-objc-arc` compiler flag.
|
154
|
+
|
155
|
+
To set a compiler flag in Xcode, go to your active target and select the "Build Phases" tab. Now select all AFNetworking source files, press Enter, insert `-fobjc-arc` or `-fno-objc-arc` and then "Done" to enable or disable ARC for AFNetworking.
|
156
|
+
|
157
|
+
## Credits
|
158
|
+
|
159
|
+
AFNetworking was created by [Scott Raymond](https://github.com/sco/) and [Mattt Thompson](https://github.com/mattt/) in the development of [Gowalla for iPhone](http://en.wikipedia.org/wiki/Gowalla).
|
160
|
+
|
161
|
+
AFNetworking's logo was designed by [Alan Defibaugh](http://www.alandefibaugh.com/).
|
162
|
+
|
163
|
+
And most of all, thanks to AFNetworking's [growing list of contributors](https://github.com/AFNetworking/AFNetworking/contributors).
|
164
|
+
|
165
|
+
## Contact
|
166
|
+
|
167
|
+
Follow AFNetworking on Twitter ([@AFNetworking](https://twitter.com/AFNetworking))
|
168
|
+
|
169
|
+
### Creators
|
170
|
+
|
171
|
+
[Mattt Thompson](http://github.com/mattt)
|
172
|
+
[@mattt](https://twitter.com/mattt)
|
173
|
+
|
174
|
+
[Scott Raymond](http://github.com/sco)
|
175
|
+
[@sco](https://twitter.com/sco)
|
176
|
+
|
177
|
+
## License
|
178
|
+
|
179
|
+
AFNetworking is available under the MIT license. See the LICENSE file for more info.
|