Skip to content

Commit d524d14

Browse files
committed
Excise mentions of AFNetworking
1 parent a8ada0b commit d524d14

File tree

8 files changed

+26
-49
lines changed

8 files changed

+26
-49
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.DS_Store
2-
AFNetworking.userprefs
32
bin/
43
obj/
54
build/

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "vendor/okhttp"]
22
path = vendor/okhttp
33
url = https://github.com/paulcbetts/OkHttp-Xamarin.git
4-
[submodule "vendor/afnetworking"]
5-
path = vendor/afnetworking
6-
url = https://github.com/thefactory/AFNetworking-Sharp.git

README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
ModernHttpClient
22
================
33

4-
This library brings the latest platform-specific networking libraries to Xamarin applications via a custom HttpClient handler. Write your app using System.Net.Http, but drop this library in and it will go drastically faster. This is made possible by two native libraries:
4+
This library brings the latest platform-specific networking libraries to
5+
Xamarin applications via a custom HttpClient handler. Write your app using
6+
System.Net.Http, but drop this library in and it will go drastically faster.
7+
This is made possible by two native libraries:
58

6-
* On iOS, [AFNetworking 1.3.3](http://afnetworking.com/)
9+
* On iOS, [NSURLSession](https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSession_class/Introduction/Introduction.html)
710
* On Android, via [OkHttp 1.2.1](http://square.github.io/okhttp/)
811

912
## Usage
1013

11-
The good news is, you don't have to know either of these two libraries above, using ModernHttpClient is the most boring thing in the world. Here's how it works:
14+
The good news is, you don't have to know either of these two libraries above,
15+
using ModernHttpClient is the most boring thing in the world. Here's how
16+
it works:
1217

1318
On iOS:
1419

1520
```cs
16-
var httpClient = new HttpClient(new AFNetworkHandler());
21+
var httpClient = new HttpClient(new NSUrlSessionHandler());
1722
```
1823

1924
On Android:
@@ -24,7 +29,10 @@ var httpClient = new HttpClient(new OkHttpNetworkHandler());
2429

2530
## How can I use this in a PCL?
2631

27-
Using ModernHttpClient from a PCL is fairly easy with some rigging, especially if you've got some sort of IoC/DI setup - request an HttpClient in your PCL, and register it in your app. However, here's what you can do without any external dependencies:
32+
Using ModernHttpClient from a PCL is fairly easy with some rigging, especially
33+
if you've got some sort of IoC/DI setup - request an HttpClient in your PCL,
34+
and register it in your app. However, here's what you can do without any
35+
external dependencies:
2836

2937
```cs
3038
// In your PCL
@@ -46,14 +54,16 @@ public static class AppDelegate
4654
{
4755
public void FinishedLaunching(UIApplication app, NSDictionary options)
4856
{
49-
HttpClientFactory.Get = (() => new HttpClient(new AFNetworkHandler()));
57+
HttpClientFactory.Get = (() => new HttpClient(new NSUrlSessionHandler()));
5058
}
5159
}
5260
```
5361

5462
## How can I use this in MvvmCross?
5563

56-
Check out Michael Ridland's blog post, [Implementing ModernHttpClient in MvvmCross](http://www.michaelridland.com/mobile/implementing-modernhttpclient-in-mvvmcross/), for more information.
64+
Check out Michael Ridland's blog post, [Implementing ModernHttpClient in
65+
MvvmCross](http://www.michaelridland.com/mobile/implementing-modernhttpclient-in-mvvmcross/),
66+
for more information.
5767

5868
## Building
5969

component/Details.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Xamarin applications via a custom HttpClient handler. Write your app using
33
System.Net.Http, but drop this library in and it will go drastically faster.
44
This is made possible by two native libraries:
55

6-
* On iOS, [AFNetworking 1.3.3](http://afnetworking.com/)
6+
* On iOS, via NSURLSession
77
* On Android, via [OkHttp 1.2.1](http://square.github.io/okhttp/)
88

99
## Usage
@@ -15,7 +15,7 @@ works:
1515
On iOS:
1616

1717
```csharp
18-
var httpClient = new HttpClient(new AFNetworkHandler());
18+
var httpClient = new HttpClient(new NSUrlSessionHandler());
1919
```
2020

2121
On Android:

component/GettingStarted.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
The good news is, you don't have to know either of these two libraries above, using ModernHttpClient is the most boring thing in the world. Here's how it works:
1+
The good news is, you don't have to know either of these two libraries above,
2+
using ModernHttpClient is the most boring thing in the world. Here's how it
3+
works:
24

35
On iOS:
46

57
```csharp
6-
var httpClient = new HttpClient(new AFNetworkHandler());
8+
var httpClient = new HttpClient(new NSUrlSessionHandler());
79
```
810

911
On Android:
@@ -15,5 +17,4 @@ var httpClient = new HttpClient(new OkHttpNetworkHandler());
1517
## Other Resources
1618

1719
* [GitHub page](https://github.com/paulcbetts/ModernHttpClient)
18-
* [AFNetworking 1.3.3 documentation](http://cocoadocs.org/docsets/AFNetworking/1.3.3/)
1920
* [OkHttp site](http://square.github.io/okhttp/)

component/License.md

+3-28
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,6 @@
1-
The ModernHttpClient component includes three libraries: AFNetworking for iOS
2-
which is under the MIT license, OkHttp for Android which is under the Apache
3-
license version 2.0, and the ModernHttpClient wrapper itself which is under
4-
the MIT license.
5-
6-
AFNetworking License
7-
====================
8-
```
9-
Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
10-
11-
Permission is hereby granted, free of charge, to any person obtaining a copy
12-
of this software and associated documentation files (the "Software"), to deal
13-
in the Software without restriction, including without limitation the rights
14-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15-
copies of the Software, and to permit persons to whom the Software is
16-
furnished to do so, subject to the following conditions:
17-
18-
The above copyright notice and this permission notice shall be included in
19-
all copies or substantial portions of the Software.
20-
21-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27-
THE SOFTWARE.
28-
```
1+
The ModernHttpClient component includes two libraries: OkHttp for Android
2+
which is under the Apache license version 2.0, and the ModernHttpClient
3+
wrapper itself which is under the MIT license.
294

305
OkHttp License
316
==============

component/component.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ icons:
1414
- icon_512x512.png
1515
libraries:
1616
ios:
17-
- ../build/MonoTouch/AFNetworking.dll
1817
- ../build/MonoTouch/ModernHttpClient.iOS.dll
1918
android:
2019
- ../build/MonoAndroid/OkHttp.dll
@@ -25,4 +24,3 @@ samples:
2524
- name: "HttpClient.Android Sample"
2625
path: ../samples/HttpClient.Android/HttpClient.Android.sln
2726
...
28-

src/Playground.iOS/Playground.iOS.csproj

-3
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@
8686
<Reference Include="System.Xml" />
8787
<Reference Include="System.Core" />
8888
<Reference Include="monotouch" />
89-
<Reference Include="AFNetworking">
90-
<HintPath>..\..\vendor\afnetworking\AFNetworking.dll</HintPath>
91-
</Reference>
9289
<Reference Include="System.Net.Http" />
9390
<Reference Include="Newtonsoft.Json">
9491
<HintPath>..\..\ext\monotouch\Newtonsoft.Json.dll</HintPath>

0 commit comments

Comments
 (0)