Commit a33d90bf027f9ba936ef95b47bee9256242be8ba

Authored by 梁星国
1 parent 7d4957a7

提交

Showing 68 changed files with 183 additions and 4497 deletions

Too many changes to show.

To preserve performance only 68 of 188 files are displayed.

CNLiveDemo_LXG.podspec
... ... @@ -2,7 +2,7 @@
2 2  
3 3 Pod::Spec.new do |s|
4 4 s.name = 'CNLiveDemo_LXG'
5   - s.version = '0.0.3'
  5 + s.version = '0.0.4'
6 6 s.summary = '用于测试打包流程'
7 7  
8 8 s.description = <<-DESC
... ... @@ -16,6 +16,9 @@ https://segmentfault.com/a/1190000012269307
16 16 s.author = { 'liangxingguo' => 'liangxingguo_job@163.com' }
17 17 s.source = { :git => 'http://bj.gitlab.cnlive.com/ios-team/CNLiveDemo_LXG.git', :tag => s.version, :submodules => true}
18 18 s.ios.deployment_target = '9.0'
  19 + s.resource_bundles = {
  20 + 'CNLiveDemo_LXG' => ['CNLiveDemo_LXG/Assets/Media.xcassets']
  21 + }
19 22 #s.public_header_files = 'CNLiveDemo_LXG/CNLiveTestController.h'
20 23 s.source_files = 'CNLiveDemo_LXG/Classes/*.{h,m}' # Classes文件夹下的所有匹配文件
21 24 s.frameworks = 'UIKit', 'Foundation'
... ...
CNLiveDemo_LXG/Assets/Media.xcassets/Contents.json 0 → 100644
  1 +{
  2 + "info" : {
  3 + "version" : 1,
  4 + "author" : "xcode"
  5 + }
  6 +}
0 7 \ No newline at end of file
... ...
CNLiveDemo_LXG/Assets/Media.xcassets/fb_chongpai.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "fb_chongpai.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "filename" : "fb_chongpai@2x.png",
  11 + "scale" : "2x"
  12 + },
  13 + {
  14 + "idiom" : "universal",
  15 + "filename" : "fb_chongpai@3x.png",
  16 + "scale" : "3x"
  17 + }
  18 + ],
  19 + "info" : {
  20 + "version" : 1,
  21 + "author" : "xcode"
  22 + }
  23 +}
0 24 \ No newline at end of file
... ...
CNLiveDemo_LXG/Assets/Media.xcassets/fb_chongpai.imageset/fb_chongpai.png 0 → 100644

1.98 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_chongpai.imageset/fb_chongpai@2x.png 0 → 100644

3.38 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_chongpai.imageset/fb_chongpai@3x.png 0 → 100644

4.87 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_quxiaoxia.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "fb_quxiaoxia.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "filename" : "fb_quxiaoxia@2x.png",
  11 + "scale" : "2x"
  12 + },
  13 + {
  14 + "idiom" : "universal",
  15 + "filename" : "fb_quxiaoxia@3x.png",
  16 + "scale" : "3x"
  17 + }
  18 + ],
  19 + "info" : {
  20 + "version" : 1,
  21 + "author" : "xcode"
  22 + }
  23 +}
0 24 \ No newline at end of file
... ...
CNLiveDemo_LXG/Assets/Media.xcassets/fb_quxiaoxia.imageset/fb_quxiaoxia.png 0 → 100644

1.26 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_quxiaoxia.imageset/fb_quxiaoxia@2x.png 0 → 100644

1.68 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_quxiaoxia.imageset/fb_quxiaoxia@3x.png 0 → 100644

1.96 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_wancheng.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "fb_wancheng.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "filename" : "fb_wancheng@2x.png",
  11 + "scale" : "2x"
  12 + },
  13 + {
  14 + "idiom" : "universal",
  15 + "filename" : "fb_wancheng@3x.png",
  16 + "scale" : "3x"
  17 + }
  18 + ],
  19 + "info" : {
  20 + "version" : 1,
  21 + "author" : "xcode"
  22 + }
  23 +}
0 24 \ No newline at end of file
... ...
CNLiveDemo_LXG/Assets/Media.xcassets/fb_wancheng.imageset/fb_wancheng.png 0 → 100644

1.97 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_wancheng.imageset/fb_wancheng@2x.png 0 → 100644

3.46 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_wancheng.imageset/fb_wancheng@3x.png 0 → 100644

5.08 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_xiangji.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "fb_xiangji.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "filename" : "fb_xiangji@2x.png",
  11 + "scale" : "2x"
  12 + },
  13 + {
  14 + "idiom" : "universal",
  15 + "filename" : "fb_xiangji@3x.png",
  16 + "scale" : "3x"
  17 + }
  18 + ],
  19 + "info" : {
  20 + "version" : 1,
  21 + "author" : "xcode"
  22 + }
  23 +}
0 24 \ No newline at end of file
... ...
CNLiveDemo_LXG/Assets/Media.xcassets/fb_xiangji.imageset/fb_xiangji.png 0 → 100644

1.32 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_xiangji.imageset/fb_xiangji@2x.png 0 → 100644

1.68 KB

CNLiveDemo_LXG/Assets/Media.xcassets/fb_xiangji.imageset/fb_xiangji@3x.png 0 → 100644

2.27 KB

CNLiveDemo_LXG/Assets/Media.xcassets/gz_shoudian.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "gz_shoudian.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "filename" : "gz_shoudian@2x.png",
  11 + "scale" : "2x"
  12 + },
  13 + {
  14 + "idiom" : "universal",
  15 + "filename" : "gz_shoudian@3x.png",
  16 + "scale" : "3x"
  17 + }
  18 + ],
  19 + "info" : {
  20 + "version" : 1,
  21 + "author" : "xcode"
  22 + }
  23 +}
0 24 \ No newline at end of file
... ...
CNLiveDemo_LXG/Assets/Media.xcassets/gz_shoudian.imageset/gz_shoudian.png 0 → 100644

1.11 KB

CNLiveDemo_LXG/Assets/Media.xcassets/gz_shoudian.imageset/gz_shoudian@2x.png 0 → 100644

1.29 KB

CNLiveDemo_LXG/Assets/Media.xcassets/gz_shoudian.imageset/gz_shoudian@3x.png 0 → 100644

1.41 KB

CNLiveDemo_LXG/Assets/Media.xcassets/gz_shoudian2.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "gz_shoudian2.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "filename" : "gz_shoudian2@2x.png",
  11 + "scale" : "2x"
  12 + },
  13 + {
  14 + "idiom" : "universal",
  15 + "filename" : "gz_shoudian2@3x.png",
  16 + "scale" : "3x"
  17 + }
  18 + ],
  19 + "info" : {
  20 + "version" : 1,
  21 + "author" : "xcode"
  22 + }
  23 +}
0 24 \ No newline at end of file
... ...
CNLiveDemo_LXG/Assets/Media.xcassets/gz_shoudian2.imageset/gz_shoudian2.png 0 → 100644

1.13 KB

CNLiveDemo_LXG/Assets/Media.xcassets/gz_shoudian2.imageset/gz_shoudian2@2x.png 0 → 100644

1.34 KB

CNLiveDemo_LXG/Assets/Media.xcassets/gz_shoudian2.imageset/gz_shoudian2@3x.png 0 → 100644

1.52 KB

CNLiveDemo_LXG/Assets/Media.xcassets/sight_video_focus.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "idiom" : "universal",
  9 + "filename" : "sight_video_focus@2x.png",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "filename" : "sight_video_focus@3x.png",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "version" : 1,
  20 + "author" : "xcode"
  21 + }
  22 +}
0 23 \ No newline at end of file
... ...
CNLiveDemo_LXG/Assets/Media.xcassets/sight_video_focus.imageset/sight_video_focus@2x.png 0 → 100644

3.02 KB

CNLiveDemo_LXG/Assets/Media.xcassets/sight_video_focus.imageset/sight_video_focus@3x.png 0 → 100644

3.36 KB

CNLiveDemo_LXG/Classes/CNLiveNextViewViewController.m
... ... @@ -19,6 +19,17 @@
19 19  
20 20 [self.view setBackgroundColor:[UIColor yellowColor]];
21 21  
  22 +
  23 + UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 100, 100)];
  24 + [self.view addSubview:imageView];
  25 + NSBundle *bundle = [NSBundle bundleForClass:[CNLiveNextViewViewController class]];
  26 + NSURL *url = [bundle URLForResource:@"CNLiveDemo_LXG" withExtension:@"bundle"];
  27 + NSBundle *imageBundle = [NSBundle bundleWithURL:url];
  28 + NSString *imagePath = [imageBundle pathForResource:@"fb_xiangji@2x" ofType:@"png"];
  29 + imageView.image = [UIImage imageWithContentsOfFile:imagePath];
  30 +
  31 +
  32 +
22 33 }
23 34  
24 35 /*
... ...
Example/CNLiveDemo_LXG.xcodeproj/project.pbxproj
... ... @@ -21,7 +21,6 @@
21 21 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
22 22 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
23 23 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
24   - 7A5F273D0A9D35DA1C467C1C /* Pods_CNLiveDemo_LXG_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4996BC0054173713A29BD1E6 /* Pods_CNLiveDemo_LXG_Tests.framework */; };
25 24 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
26 25 D9A49D7D9FDD7D2FEBCDE4EB /* Pods_CNLiveDemo_LXG_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D7A30A6B42383721C14BAB78 /* Pods_CNLiveDemo_LXG_Example.framework */; };
27 26 /* End PBXBuildFile section */
... ... @@ -50,7 +49,6 @@
50 49 /* End PBXCopyFilesBuildPhase section */
51 50  
52 51 /* Begin PBXFileReference section */
53   - 21AC0234CE77E05CB4FC9CE1 /* Pods-CNLiveDemo_LXG_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveDemo_LXG_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveDemo_LXG_Tests/Pods-CNLiveDemo_LXG_Tests.release.xcconfig"; sourceTree = "<group>"; };
54 52 4996BC0054173713A29BD1E6 /* Pods_CNLiveDemo_LXG_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveDemo_LXG_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
55 53 6003F58A195388D20070C39A /* CNLiveDemo_LXG_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveDemo_LXG_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
56 54 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
... ... @@ -73,7 +71,6 @@
73 71 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
74 72 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
75 73 84AA50303963D04398FF0837 /* CNLiveDemo_LXG.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveDemo_LXG.podspec; path = ../CNLiveDemo_LXG.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
76   - 8582A7BE36646E14DEAD6DAE /* Pods-CNLiveDemo_LXG_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveDemo_LXG_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveDemo_LXG_Tests/Pods-CNLiveDemo_LXG_Tests.debug.xcconfig"; sourceTree = "<group>"; };
77 74 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
78 75 999737C7013D1CAA2792FD88 /* Pods-CNLiveDemo_LXG_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveDemo_LXG_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveDemo_LXG_Example/Pods-CNLiveDemo_LXG_Example.release.xcconfig"; sourceTree = "<group>"; };
79 76 A28BD966BF399775DBCC01FF /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
... ... @@ -101,7 +98,6 @@
101 98 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
102 99 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
103 100 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
104   - 7A5F273D0A9D35DA1C467C1C /* Pods_CNLiveDemo_LXG_Tests.framework in Frameworks */,
105 101 );
106 102 runOnlyForDeploymentPostprocessing = 0;
107 103 };
... ... @@ -113,8 +109,6 @@
113 109 children = (
114 110 AF694B95BEE8B3085ECE1208 /* Pods-CNLiveDemo_LXG_Example.debug.xcconfig */,
115 111 999737C7013D1CAA2792FD88 /* Pods-CNLiveDemo_LXG_Example.release.xcconfig */,
116   - 8582A7BE36646E14DEAD6DAE /* Pods-CNLiveDemo_LXG_Tests.debug.xcconfig */,
117   - 21AC0234CE77E05CB4FC9CE1 /* Pods-CNLiveDemo_LXG_Tests.release.xcconfig */,
118 112 );
119 113 name = Pods;
120 114 sourceTree = "<group>";
... ... @@ -236,11 +230,9 @@
236 230 isa = PBXNativeTarget;
237 231 buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveDemo_LXG_Tests" */;
238 232 buildPhases = (
239   - AB69D32924CE219D3B98AD1D /* [CP] Check Pods Manifest.lock */,
240 233 6003F5AA195388D20070C39A /* Sources */,
241 234 6003F5AB195388D20070C39A /* Frameworks */,
242 235 6003F5AC195388D20070C39A /* Resources */,
243   - A636E9920207F965CF12DF60 /* [CP] Embed Pods Frameworks */,
244 236 39089F0221B622C3001B0ABB /* ShellScript */,
245 237 );
246 238 buildRules = (
... ... @@ -352,50 +344,6 @@
352 344 shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
353 345 showEnvVarsInLog = 0;
354 346 };
355   - A636E9920207F965CF12DF60 /* [CP] Embed Pods Frameworks */ = {
356   - isa = PBXShellScriptBuildPhase;
357   - buildActionMask = 2147483647;
358   - files = (
359   - );
360   - inputFileListPaths = (
361   - );
362   - inputPaths = (
363   - "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDemo_LXG_Tests/Pods-CNLiveDemo_LXG_Tests-frameworks.sh",
364   - "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
365   - );
366   - name = "[CP] Embed Pods Frameworks";
367   - outputFileListPaths = (
368   - );
369   - outputPaths = (
370   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
371   - );
372   - runOnlyForDeploymentPostprocessing = 0;
373   - shellPath = /bin/sh;
374   - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDemo_LXG_Tests/Pods-CNLiveDemo_LXG_Tests-frameworks.sh\"\n";
375   - showEnvVarsInLog = 0;
376   - };
377   - AB69D32924CE219D3B98AD1D /* [CP] Check Pods Manifest.lock */ = {
378   - isa = PBXShellScriptBuildPhase;
379   - buildActionMask = 2147483647;
380   - files = (
381   - );
382   - inputFileListPaths = (
383   - );
384   - inputPaths = (
385   - "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
386   - "${PODS_ROOT}/Manifest.lock",
387   - );
388   - name = "[CP] Check Pods Manifest.lock";
389   - outputFileListPaths = (
390   - );
391   - outputPaths = (
392   - "$(DERIVED_FILE_DIR)/Pods-CNLiveDemo_LXG_Tests-checkManifestLockResult.txt",
393   - );
394   - runOnlyForDeploymentPostprocessing = 0;
395   - shellPath = /bin/sh;
396   - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
397   - showEnvVarsInLog = 0;
398   - };
399 347 F5F61125C4CDE99900978B41 /* [CP] Embed Pods Frameworks */ = {
400 348 isa = PBXShellScriptBuildPhase;
401 349 buildActionMask = 2147483647;
... ... @@ -588,7 +536,6 @@
588 536 };
589 537 6003F5C3195388D20070C39A /* Debug */ = {
590 538 isa = XCBuildConfiguration;
591   - baseConfigurationReference = 8582A7BE36646E14DEAD6DAE /* Pods-CNLiveDemo_LXG_Tests.debug.xcconfig */;
592 539 buildSettings = {
593 540 BUNDLE_LOADER = "$(TEST_HOST)";
594 541 FRAMEWORK_SEARCH_PATHS = (
... ... @@ -612,7 +559,6 @@
612 559 };
613 560 6003F5C4195388D20070C39A /* Release */ = {
614 561 isa = XCBuildConfiguration;
615   - baseConfigurationReference = 21AC0234CE77E05CB4FC9CE1 /* Pods-CNLiveDemo_LXG_Tests.release.xcconfig */;
616 562 buildSettings = {
617 563 BUNDLE_LOADER = "$(TEST_HOST)";
618 564 FRAMEWORK_SEARCH_PATHS = (
... ...
Example/CNLiveDemo_LXG/CNLiveViewController.m
... ... @@ -38,9 +38,9 @@
38 38 CNLiveTestController *testVC = [[CNLiveTestController alloc]init];
39 39 [testVC testLog];
40 40 [self presentViewController:testVC animated:YES completion:^{
41   -
  41 +
42 42 }];
43   -
  43 +
44 44 }
45 45  
46 46 - (void)didReceiveMemoryWarning
... ...
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking deleted 100755 → 0
No preview for this file type
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFHTTPRequestOperation.h deleted 100644 → 0
1   -// AFHTTPRequestOperation.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -#import "AFURLConnectionOperation.h"
24   -
25   -NS_ASSUME_NONNULL_BEGIN
26   -
27   -/**
28   - `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` 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.
29   - */
30   -@interface AFHTTPRequestOperation : AFURLConnectionOperation
31   -
32   -///------------------------------------------------
33   -/// @name Getting HTTP URL Connection Information
34   -///------------------------------------------------
35   -
36   -/**
37   - The last HTTP response received by the operation's connection.
38   - */
39   -@property (readonly, nonatomic, strong, nullable) NSHTTPURLResponse *response;
40   -
41   -/**
42   - Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an AFHTTPResponse serializer, which uses the raw data as its response object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed.
43   -
44   - @warning `responseSerializer` must not be `nil`. Setting a response serializer will clear out any cached value
45   - */
46   -@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
47   -
48   -/**
49   - An object constructed by the `responseSerializer` from the response and response data. Returns `nil` unless the operation `isFinished`, has a `response`, and has `responseData` with non-zero content length. If an error occurs during serialization, `nil` will be returned, and the `error` property will be populated with the serialization error.
50   - */
51   -@property (readonly, nonatomic, strong, nullable) id responseObject;
52   -
53   -///-----------------------------------------------------------
54   -/// @name Setting Completion Block Success / Failure Callbacks
55   -///-----------------------------------------------------------
56   -
57   -/**
58   - Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed.
59   -
60   - This method should be overridden in subclasses in order to specify the response object passed into the success block.
61   -
62   - @param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request.
63   - @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request.
64   - */
65   -- (void)setCompletionBlockWithSuccess:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
66   - failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
67   -
68   -@end
69   -
70   -NS_ASSUME_NONNULL_END
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFHTTPRequestOperationManager.h deleted 100644 → 0
1   -// AFHTTPRequestOperationManager.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -#import <SystemConfiguration/SystemConfiguration.h>
24   -#import <Availability.h>
25   -
26   -#if __IPHONE_OS_VERSION_MIN_REQUIRED
27   -#import <MobileCoreServices/MobileCoreServices.h>
28   -#else
29   -#import <CoreServices/CoreServices.h>
30   -#endif
31   -
32   -#import "AFHTTPRequestOperation.h"
33   -#import "AFURLResponseSerialization.h"
34   -#import "AFURLRequestSerialization.h"
35   -#import "AFSecurityPolicy.h"
36   -#import "AFNetworkReachabilityManager.h"
37   -
38   -#ifndef NS_DESIGNATED_INITIALIZER
39   -#if __has_attribute(objc_designated_initializer)
40   -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
41   -#else
42   -#define NS_DESIGNATED_INITIALIZER
43   -#endif
44   -#endif
45   -
46   -NS_ASSUME_NONNULL_BEGIN
47   -
48   -/**
49   - `AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management.
50   -
51   - ## Subclassing Notes
52   -
53   - Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application.
54   -
55   - For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect.
56   -
57   - ## Methods to Override
58   -
59   - To change the behavior of all request operation construction for an `AFHTTPRequestOperationManager` subclass, override `HTTPRequestOperationWithRequest:success:failure`.
60   -
61   - ## Serialization
62   -
63   - Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to `<AFURLRequestSerialization>`.
64   -
65   - Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`
66   -
67   - ## URL Construction Using Relative Paths
68   -
69   - For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`.
70   -
71   - Below are a few examples of how `baseURL` and relative paths interact:
72   -
73   - NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"];
74   - [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo
75   - [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz
76   - [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo
77   - [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo
78   - [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/
79   - [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/
80   -
81   - Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash.
82   -
83   - ## Network Reachability Monitoring
84   -
85   - Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details.
86   -
87   - ## NSSecureCoding & NSCopying Caveats
88   -
89   - `AFHTTPRequestOperationManager` conforms to the `NSSecureCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. There are a few minor caveats to keep in mind, however:
90   -
91   - - Archives and copies of HTTP clients will be initialized with an empty operation queue.
92   - - NSSecureCoding cannot serialize / deserialize block properties, so an archive of an HTTP client will not include any reachability callback block that may be set.
93   - */
94   -@interface AFHTTPRequestOperationManager : NSObject <NSSecureCoding, NSCopying>
95   -
96   -/**
97   - The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.
98   - */
99   -@property (readonly, nonatomic, strong, nullable) NSURL *baseURL;
100   -
101   -/**
102   - Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.
103   -
104   - @warning `requestSerializer` must not be `nil`.
105   - */
106   -@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;
107   -
108   -/**
109   - Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to a JSON serializer, which serializes data from responses with a `application/json` MIME type, and falls back to the raw data object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed.
110   -
111   - @warning `responseSerializer` must not be `nil`.
112   - */
113   -@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
114   -
115   -/**
116   - The operation queue on which request operations are scheduled and run.
117   - */
118   -@property (nonatomic, strong) NSOperationQueue *operationQueue;
119   -
120   -///-------------------------------
121   -/// @name Managing URL Credentials
122   -///-------------------------------
123   -
124   -/**
125   - Whether request operations should consult the credential storage for authenticating the connection. `YES` by default.
126   -
127   - @see AFURLConnectionOperation -shouldUseCredentialStorage
128   - */
129   -@property (nonatomic, assign) BOOL shouldUseCredentialStorage;
130   -
131   -/**
132   - The credential used by request operations for authentication challenges.
133   -
134   - @see AFURLConnectionOperation -credential
135   - */
136   -@property (nonatomic, strong, nullable) NSURLCredential *credential;
137   -
138   -///-------------------------------
139   -/// @name Managing Security Policy
140   -///-------------------------------
141   -
142   -/**
143   - The security policy used by created request operations to evaluate server trust for secure connections. `AFHTTPRequestOperationManager` uses the `defaultPolicy` unless otherwise specified.
144   - */
145   -@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
146   -
147   -///------------------------------------
148   -/// @name Managing Network Reachability
149   -///------------------------------------
150   -
151   -/**
152   - The network reachability manager. `AFHTTPRequestOperationManager` uses the `sharedManager` by default.
153   - */
154   -@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;
155   -
156   -///-------------------------------
157   -/// @name Managing Callback Queues
158   -///-------------------------------
159   -
160   -/**
161   - The dispatch queue for the `completionBlock` of request operations. If `NULL` (default), the main queue is used.
162   - */
163   -#if OS_OBJECT_USE_OBJC
164   -@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
165   -#else
166   -@property (nonatomic, assign, nullable) dispatch_queue_t completionQueue;
167   -#endif
168   -
169   -/**
170   - The dispatch group for the `completionBlock` of request operations. If `NULL` (default), a private dispatch group is used.
171   - */
172   -#if OS_OBJECT_USE_OBJC
173   -@property (nonatomic, strong, nullable) dispatch_group_t completionGroup;
174   -#else
175   -@property (nonatomic, assign, nullable) dispatch_group_t completionGroup;
176   -#endif
177   -
178   -///---------------------------------------------
179   -/// @name Creating and Initializing HTTP Clients
180   -///---------------------------------------------
181   -
182   -/**
183   - Creates and returns an `AFHTTPRequestOperationManager` object.
184   - */
185   -+ (instancetype)manager;
186   -
187   -/**
188   - Initializes an `AFHTTPRequestOperationManager` object with the specified base URL.
189   -
190   - This is the designated initializer.
191   -
192   - @param url The base URL for the HTTP client.
193   -
194   - @return The newly-initialized HTTP client
195   - */
196   -- (instancetype)initWithBaseURL:(nullable NSURL *)url NS_DESIGNATED_INITIALIZER;
197   -
198   -///---------------------------------------
199   -/// @name Managing HTTP Request Operations
200   -///---------------------------------------
201   -
202   -/**
203   - Creates an `AFHTTPRequestOperation`, and sets the response serializers to that of the HTTP client.
204   -
205   - @param request The request object to be loaded asynchronously during execution of the operation.
206   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request.
207   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred.
208   - */
209   -- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request
210   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
211   - failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
212   -
213   -///---------------------------
214   -/// @name Making HTTP Requests
215   -///---------------------------
216   -
217   -/**
218   - Creates and runs an `AFHTTPRequestOperation` with a `GET` request.
219   -
220   - @param URLString The URL string used to create the request URL.
221   - @param parameters The parameters to be encoded according to the client request serializer.
222   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
223   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
224   -
225   - @see -HTTPRequestOperationWithRequest:success:failure:
226   - */
227   -- (nullable AFHTTPRequestOperation *)GET:(NSString *)URLString
228   - parameters:(nullable id)parameters
229   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
230   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
231   -
232   -/**
233   - Creates and runs an `AFHTTPRequestOperation` with a `HEAD` request.
234   -
235   - @param URLString The URL string used to create the request URL.
236   - @param parameters The parameters to be encoded according to the client request serializer.
237   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes a single arguments: the request operation.
238   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
239   -
240   - @see -HTTPRequestOperationWithRequest:success:failure:
241   - */
242   -- (nullable AFHTTPRequestOperation *)HEAD:(NSString *)URLString
243   - parameters:(nullable id)parameters
244   - success:(nullable void (^)(AFHTTPRequestOperation *operation))success
245   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
246   -
247   -/**
248   - Creates and runs an `AFHTTPRequestOperation` with a `POST` request.
249   -
250   - @param URLString The URL string used to create the request URL.
251   - @param parameters The parameters to be encoded according to the client request serializer.
252   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
253   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
254   -
255   - @see -HTTPRequestOperationWithRequest:success:failure:
256   - */
257   -- (nullable AFHTTPRequestOperation *)POST:(NSString *)URLString
258   - parameters:(nullable id)parameters
259   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
260   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
261   -
262   -/**
263   - Creates and runs an `AFHTTPRequestOperation` with a multipart `POST` request.
264   -
265   - @param URLString The URL string used to create the request URL.
266   - @param parameters The parameters to be encoded according to the client request serializer.
267   - @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
268   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
269   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
270   -
271   - @see -HTTPRequestOperationWithRequest:success:failure:
272   - */
273   -- (nullable AFHTTPRequestOperation *)POST:(NSString *)URLString
274   - parameters:(nullable id)parameters
275   - constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
276   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
277   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
278   -
279   -/**
280   - Creates and runs an `AFHTTPRequestOperation` with a `PUT` request.
281   -
282   - @param URLString The URL string used to create the request URL.
283   - @param parameters The parameters to be encoded according to the client request serializer.
284   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
285   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
286   -
287   - @see -HTTPRequestOperationWithRequest:success:failure:
288   - */
289   -- (nullable AFHTTPRequestOperation *)PUT:(NSString *)URLString
290   - parameters:(nullable id)parameters
291   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
292   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
293   -
294   -/**
295   - Creates and runs an `AFHTTPRequestOperation` with a `PATCH` request.
296   -
297   - @param URLString The URL string used to create the request URL.
298   - @param parameters The parameters to be encoded according to the client request serializer.
299   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
300   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
301   -
302   - @see -HTTPRequestOperationWithRequest:success:failure:
303   - */
304   -- (nullable AFHTTPRequestOperation *)PATCH:(NSString *)URLString
305   - parameters:(nullable id)parameters
306   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
307   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
308   -
309   -/**
310   - Creates and runs an `AFHTTPRequestOperation` with a `DELETE` request.
311   -
312   - @param URLString The URL string used to create the request URL.
313   - @param parameters The parameters to be encoded according to the client request serializer.
314   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
315   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
316   -
317   - @see -HTTPRequestOperationWithRequest:success:failure:
318   - */
319   -- (nullable AFHTTPRequestOperation *)DELETE:(NSString *)URLString
320   - parameters:(nullable id)parameters
321   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
322   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
323   -
324   -@end
325   -
326   -NS_ASSUME_NONNULL_END
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFHTTPSessionManager.h deleted 100644 → 0
1   -// AFHTTPSessionManager.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -#if !TARGET_OS_WATCH
24   -#import <SystemConfiguration/SystemConfiguration.h>
25   -#endif
26   -#import <Availability.h>
27   -
28   -#if __IPHONE_OS_VERSION_MIN_REQUIRED
29   -#import <MobileCoreServices/MobileCoreServices.h>
30   -#else
31   -#import <CoreServices/CoreServices.h>
32   -#endif
33   -
34   -#import "AFURLSessionManager.h"
35   -
36   -#ifndef NS_DESIGNATED_INITIALIZER
37   -#if __has_attribute(objc_designated_initializer)
38   -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
39   -#else
40   -#define NS_DESIGNATED_INITIALIZER
41   -#endif
42   -#endif
43   -
44   -/**
45   - `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths.
46   -
47   - ## Subclassing Notes
48   -
49   - Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application.
50   -
51   - For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect.
52   -
53   - ## Methods to Override
54   -
55   - To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:completionHandler:`.
56   -
57   - ## Serialization
58   -
59   - Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to `<AFURLRequestSerialization>`.
60   -
61   - Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`
62   -
63   - ## URL Construction Using Relative Paths
64   -
65   - For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`.
66   -
67   - Below are a few examples of how `baseURL` and relative paths interact:
68   -
69   - NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"];
70   - [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo
71   - [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz
72   - [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo
73   - [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo
74   - [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/
75   - [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/
76   -
77   - Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash.
78   -
79   - @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.
80   - */
81   -
82   -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || TARGET_OS_WATCH
83   -
84   -NS_ASSUME_NONNULL_BEGIN
85   -
86   -@interface AFHTTPSessionManager : AFURLSessionManager <NSSecureCoding, NSCopying>
87   -
88   -/**
89   - The URL used to construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.
90   - */
91   -@property (readonly, nonatomic, strong, nullable) NSURL *baseURL;
92   -
93   -/**
94   - Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.
95   -
96   - @warning `requestSerializer` must not be `nil`.
97   - */
98   -@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;
99   -
100   -/**
101   - Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`.
102   -
103   - @warning `responseSerializer` must not be `nil`.
104   - */
105   -@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
106   -
107   -///---------------------
108   -/// @name Initialization
109   -///---------------------
110   -
111   -/**
112   - Creates and returns an `AFHTTPSessionManager` object.
113   - */
114   -+ (instancetype)manager;
115   -
116   -/**
117   - Initializes an `AFHTTPSessionManager` object with the specified base URL.
118   -
119   - @param url The base URL for the HTTP client.
120   -
121   - @return The newly-initialized HTTP client
122   - */
123   -- (instancetype)initWithBaseURL:(nullable NSURL *)url;
124   -
125   -/**
126   - Initializes an `AFHTTPSessionManager` object with the specified base URL.
127   -
128   - This is the designated initializer.
129   -
130   - @param url The base URL for the HTTP client.
131   - @param configuration The configuration used to create the managed session.
132   -
133   - @return The newly-initialized HTTP client
134   - */
135   -- (instancetype)initWithBaseURL:(nullable NSURL *)url
136   - sessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
137   -
138   -///---------------------------
139   -/// @name Making HTTP Requests
140   -///---------------------------
141   -
142   -/**
143   - Creates and runs an `NSURLSessionDataTask` with a `GET` request.
144   -
145   - @param URLString The URL string used to create the request URL.
146   - @param parameters The parameters to be encoded according to the client request serializer.
147   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
148   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
149   -
150   - @see -dataTaskWithRequest:completionHandler:
151   - */
152   -- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
153   - parameters:(nullable id)parameters
154   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
155   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
156   -
157   -/**
158   - Creates and runs an `NSURLSessionDataTask` with a `HEAD` request.
159   -
160   - @param URLString The URL string used to create the request URL.
161   - @param parameters The parameters to be encoded according to the client request serializer.
162   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task.
163   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
164   -
165   - @see -dataTaskWithRequest:completionHandler:
166   - */
167   -- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString
168   - parameters:(nullable id)parameters
169   - success:(nullable void (^)(NSURLSessionDataTask *task))success
170   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
171   -
172   -/**
173   - Creates and runs an `NSURLSessionDataTask` with a `POST` request.
174   -
175   - @param URLString The URL string used to create the request URL.
176   - @param parameters The parameters to be encoded according to the client request serializer.
177   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
178   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
179   -
180   - @see -dataTaskWithRequest:completionHandler:
181   - */
182   -- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
183   - parameters:(nullable id)parameters
184   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
185   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
186   -
187   -/**
188   - Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request.
189   -
190   - @param URLString The URL string used to create the request URL.
191   - @param parameters The parameters to be encoded according to the client request serializer.
192   - @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
193   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
194   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
195   -
196   - @see -dataTaskWithRequest:completionHandler:
197   - */
198   -- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
199   - parameters:(nullable id)parameters
200   - constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
201   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
202   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
203   -
204   -/**
205   - Creates and runs an `NSURLSessionDataTask` with a `PUT` request.
206   -
207   - @param URLString The URL string used to create the request URL.
208   - @param parameters The parameters to be encoded according to the client request serializer.
209   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
210   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
211   -
212   - @see -dataTaskWithRequest:completionHandler:
213   - */
214   -- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString
215   - parameters:(nullable id)parameters
216   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
217   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
218   -
219   -/**
220   - Creates and runs an `NSURLSessionDataTask` with a `PATCH` request.
221   -
222   - @param URLString The URL string used to create the request URL.
223   - @param parameters The parameters to be encoded according to the client request serializer.
224   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
225   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
226   -
227   - @see -dataTaskWithRequest:completionHandler:
228   - */
229   -- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString
230   - parameters:(nullable id)parameters
231   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
232   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
233   -
234   -/**
235   - Creates and runs an `NSURLSessionDataTask` with a `DELETE` request.
236   -
237   - @param URLString The URL string used to create the request URL.
238   - @param parameters The parameters to be encoded according to the client request serializer.
239   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
240   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
241   -
242   - @see -dataTaskWithRequest:completionHandler:
243   - */
244   -- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString
245   - parameters:(nullable id)parameters
246   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
247   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
248   -
249   -@end
250   -
251   -NS_ASSUME_NONNULL_END
252   -
253   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFNetworkActivityIndicatorManager.h deleted 100644 → 0
1   -// AFNetworkActivityIndicatorManager.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import <Availability.h>
25   -
26   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
27   -
28   -#import <UIKit/UIKit.h>
29   -
30   -NS_ASSUME_NONNULL_BEGIN
31   -
32   -/**
33   - `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero.
34   -
35   - You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code:
36   -
37   - [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];
38   -
39   - By setting `enabled` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself.
40   -
41   - See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information:
42   - http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44
43   - */
44   -NS_EXTENSION_UNAVAILABLE_IOS("Use view controller based solutions where appropriate instead.")
45   -@interface AFNetworkActivityIndicatorManager : NSObject
46   -
47   -/**
48   - A Boolean value indicating whether the manager is enabled.
49   -
50   - If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO.
51   - */
52   -@property (nonatomic, assign, getter = isEnabled) BOOL enabled;
53   -
54   -/**
55   - A Boolean value indicating whether the network activity indicator is currently displayed in the status bar.
56   - */
57   -@property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible;
58   -
59   -/**
60   - Returns the shared network activity indicator manager object for the system.
61   -
62   - @return The systemwide network activity indicator manager.
63   - */
64   -+ (instancetype)sharedManager;
65   -
66   -/**
67   - Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator.
68   - */
69   -- (void)incrementActivityCount;
70   -
71   -/**
72   - Decrements the number of active network requests. If this number becomes zero after decrementing, this will stop animating the status bar network activity indicator.
73   - */
74   -- (void)decrementActivityCount;
75   -
76   -@end
77   -
78   -NS_ASSUME_NONNULL_END
79   -
80   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFNetworkReachabilityManager.h deleted 100644 → 0
1   -// AFNetworkReachabilityManager.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#if !TARGET_OS_WATCH
25   -#import <SystemConfiguration/SystemConfiguration.h>
26   -
27   -#ifndef NS_DESIGNATED_INITIALIZER
28   -#if __has_attribute(objc_designated_initializer)
29   -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
30   -#else
31   -#define NS_DESIGNATED_INITIALIZER
32   -#endif
33   -#endif
34   -
35   -typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) {
36   - AFNetworkReachabilityStatusUnknown = -1,
37   - AFNetworkReachabilityStatusNotReachable = 0,
38   - AFNetworkReachabilityStatusReachableViaWWAN = 1,
39   - AFNetworkReachabilityStatusReachableViaWiFi = 2,
40   -};
41   -
42   -NS_ASSUME_NONNULL_BEGIN
43   -
44   -/**
45   - `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.
46   -
47   - Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability.
48   -
49   - See Apple's Reachability Sample Code (https://developer.apple.com/library/ios/samplecode/reachability/)
50   -
51   - @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined.
52   - */
53   -@interface AFNetworkReachabilityManager : NSObject
54   -
55   -/**
56   - The current network reachability status.
57   - */
58   -@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
59   -
60   -/**
61   - Whether or not the network is currently reachable.
62   - */
63   -@property (readonly, nonatomic, assign, getter = isReachable) BOOL reachable;
64   -
65   -/**
66   - Whether or not the network is currently reachable via WWAN.
67   - */
68   -@property (readonly, nonatomic, assign, getter = isReachableViaWWAN) BOOL reachableViaWWAN;
69   -
70   -/**
71   - Whether or not the network is currently reachable via WiFi.
72   - */
73   -@property (readonly, nonatomic, assign, getter = isReachableViaWiFi) BOOL reachableViaWiFi;
74   -
75   -///---------------------
76   -/// @name Initialization
77   -///---------------------
78   -
79   -/**
80   - Returns the shared network reachability manager.
81   - */
82   -+ (instancetype)sharedManager;
83   -
84   -/**
85   - Creates and returns a network reachability manager for the specified domain.
86   -
87   - @param domain The domain used to evaluate network reachability.
88   -
89   - @return An initialized network reachability manager, actively monitoring the specified domain.
90   - */
91   -+ (instancetype)managerForDomain:(NSString *)domain;
92   -
93   -/**
94   - Creates and returns a network reachability manager for the socket address.
95   -
96   - @param address The socket address (`sockaddr_in`) used to evaluate network reachability.
97   -
98   - @return An initialized network reachability manager, actively monitoring the specified socket address.
99   - */
100   -+ (instancetype)managerForAddress:(const void *)address;
101   -
102   -/**
103   - Initializes an instance of a network reachability manager from the specified reachability object.
104   -
105   - @param reachability The reachability object to monitor.
106   -
107   - @return An initialized network reachability manager, actively monitoring the specified reachability.
108   - */
109   -- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;
110   -
111   -///--------------------------------------------------
112   -/// @name Starting & Stopping Reachability Monitoring
113   -///--------------------------------------------------
114   -
115   -/**
116   - Starts monitoring for changes in network reachability status.
117   - */
118   -- (void)startMonitoring;
119   -
120   -/**
121   - Stops monitoring for changes in network reachability status.
122   - */
123   -- (void)stopMonitoring;
124   -
125   -///-------------------------------------------------
126   -/// @name Getting Localized Reachability Description
127   -///-------------------------------------------------
128   -
129   -/**
130   - Returns a localized string representation of the current network reachability status.
131   - */
132   -- (NSString *)localizedNetworkReachabilityStatusString;
133   -
134   -///---------------------------------------------------
135   -/// @name Setting Network Reachability Change Callback
136   -///---------------------------------------------------
137   -
138   -/**
139   - Sets a callback to be executed when the network availability of the `baseURL` host changes.
140   -
141   - @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`.
142   - */
143   -- (void)setReachabilityStatusChangeBlock:(nullable void (^)(AFNetworkReachabilityStatus status))block;
144   -
145   -@end
146   -
147   -///----------------
148   -/// @name Constants
149   -///----------------
150   -
151   -/**
152   - ## Network Reachability
153   -
154   - The following constants are provided by `AFNetworkReachabilityManager` as possible network reachability statuses.
155   -
156   - enum {
157   - AFNetworkReachabilityStatusUnknown,
158   - AFNetworkReachabilityStatusNotReachable,
159   - AFNetworkReachabilityStatusReachableViaWWAN,
160   - AFNetworkReachabilityStatusReachableViaWiFi,
161   - }
162   -
163   - `AFNetworkReachabilityStatusUnknown`
164   - The `baseURL` host reachability is not known.
165   -
166   - `AFNetworkReachabilityStatusNotReachable`
167   - The `baseURL` host cannot be reached.
168   -
169   - `AFNetworkReachabilityStatusReachableViaWWAN`
170   - The `baseURL` host can be reached via a cellular connection, such as EDGE or GPRS.
171   -
172   - `AFNetworkReachabilityStatusReachableViaWiFi`
173   - The `baseURL` host can be reached via a Wi-Fi connection.
174   -
175   - ### Keys for Notification UserInfo Dictionary
176   -
177   - Strings that are used as keys in a `userInfo` dictionary in a network reachability status change notification.
178   -
179   - `AFNetworkingReachabilityNotificationStatusItem`
180   - A key in the userInfo dictionary in a `AFNetworkingReachabilityDidChangeNotification` notification.
181   - The corresponding value is an `NSNumber` object representing the `AFNetworkReachabilityStatus` value for the current reachability status.
182   - */
183   -
184   -///--------------------
185   -/// @name Notifications
186   -///--------------------
187   -
188   -/**
189   - Posted when network reachability changes.
190   - This notification assigns no notification object. The `userInfo` dictionary contains an `NSNumber` object under the `AFNetworkingReachabilityNotificationStatusItem` key, representing the `AFNetworkReachabilityStatus` value for the current network reachability.
191   -
192   - @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import <SystemConfiguration/SystemConfiguration.h>` to the header prefix of the project (`Prefix.pch`).
193   - */
194   -FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityDidChangeNotification;
195   -FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusItem;
196   -
197   -///--------------------
198   -/// @name Functions
199   -///--------------------
200   -
201   -/**
202   - Returns a localized string representation of an `AFNetworkReachabilityStatus` value.
203   - */
204   -FOUNDATION_EXPORT NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status);
205   -
206   -NS_ASSUME_NONNULL_END
207   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFNetworking-umbrella.h deleted 100644 → 0
1   -#ifdef __OBJC__
2   -#import <UIKit/UIKit.h>
3   -#else
4   -#ifndef FOUNDATION_EXPORT
5   -#if defined(__cplusplus)
6   -#define FOUNDATION_EXPORT extern "C"
7   -#else
8   -#define FOUNDATION_EXPORT extern
9   -#endif
10   -#endif
11   -#endif
12   -
13   -#import "AFNetworking.h"
14   -#import "AFURLConnectionOperation.h"
15   -#import "AFHTTPRequestOperation.h"
16   -#import "AFHTTPRequestOperationManager.h"
17   -#import "AFHTTPSessionManager.h"
18   -#import "AFURLSessionManager.h"
19   -#import "AFNetworkReachabilityManager.h"
20   -#import "AFSecurityPolicy.h"
21   -#import "AFURLRequestSerialization.h"
22   -#import "AFURLResponseSerialization.h"
23   -#import "AFNetworkActivityIndicatorManager.h"
24   -#import "UIActivityIndicatorView+AFNetworking.h"
25   -#import "UIAlertView+AFNetworking.h"
26   -#import "UIButton+AFNetworking.h"
27   -#import "UIImage+AFNetworking.h"
28   -#import "UIImageView+AFNetworking.h"
29   -#import "UIKit+AFNetworking.h"
30   -#import "UIProgressView+AFNetworking.h"
31   -#import "UIRefreshControl+AFNetworking.h"
32   -#import "UIWebView+AFNetworking.h"
33   -
34   -FOUNDATION_EXPORT double AFNetworkingVersionNumber;
35   -FOUNDATION_EXPORT const unsigned char AFNetworkingVersionString[];
36   -
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFNetworking.h deleted 100644 → 0
1   -// AFNetworking.h
2   -//
3   -// Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
4   -//
5   -// Permission is hereby granted, free of charge, to any person obtaining a copy
6   -// of this software and associated documentation files (the "Software"), to deal
7   -// in the Software without restriction, including without limitation the rights
8   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9   -// copies of the Software, and to permit persons to whom the Software is
10   -// furnished to do so, subject to the following conditions:
11   -//
12   -// The above copyright notice and this permission notice shall be included in
13   -// all copies or substantial portions of the Software.
14   -//
15   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21   -// THE SOFTWARE.
22   -
23   -#import <Foundation/Foundation.h>
24   -#import <Availability.h>
25   -
26   -#ifndef _AFNETWORKING_
27   - #define _AFNETWORKING_
28   -
29   - #import "AFURLRequestSerialization.h"
30   - #import "AFURLResponseSerialization.h"
31   - #import "AFSecurityPolicy.h"
32   -#if !TARGET_OS_WATCH
33   - #import "AFNetworkReachabilityManager.h"
34   - #import "AFURLConnectionOperation.h"
35   - #import "AFHTTPRequestOperation.h"
36   - #import "AFHTTPRequestOperationManager.h"
37   -#endif
38   -
39   -#if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \
40   - ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) || \
41   - TARGET_OS_WATCH )
42   - #import "AFURLSessionManager.h"
43   - #import "AFHTTPSessionManager.h"
44   -#endif
45   -
46   -#endif /* _AFNETWORKING_ */
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFSecurityPolicy.h deleted 100644 → 0
1   -// AFSecurityPolicy.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -#import <Security/Security.h>
24   -
25   -typedef NS_ENUM(NSUInteger, AFSSLPinningMode) {
26   - AFSSLPinningModeNone,
27   - AFSSLPinningModePublicKey,
28   - AFSSLPinningModeCertificate,
29   -};
30   -
31   -/**
32   - `AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections.
33   -
34   - Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled.
35   - */
36   -
37   -NS_ASSUME_NONNULL_BEGIN
38   -
39   -@interface AFSecurityPolicy : NSObject <NSSecureCoding, NSCopying>
40   -
41   -/**
42   - The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`.
43   - */
44   -@property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode;
45   -
46   -/**
47   - The certificates used to evaluate server trust according to the SSL pinning mode. By default, this property is set to any (`.cer`) certificates included in the app bundle. Note that if you create an array with duplicate certificates, the duplicate certificates will be removed. Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches.
48   - */
49   -@property (nonatomic, strong, nullable) NSArray *pinnedCertificates;
50   -
51   -/**
52   - Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`.
53   - */
54   -@property (nonatomic, assign) BOOL allowInvalidCertificates;
55   -
56   -/**
57   - Whether or not to validate the domain name in the certificate's CN field. Defaults to `YES`.
58   - */
59   -@property (nonatomic, assign) BOOL validatesDomainName;
60   -
61   -///-----------------------------------------
62   -/// @name Getting Specific Security Policies
63   -///-----------------------------------------
64   -
65   -/**
66   - Returns the shared default security policy, which does not allow invalid certificates, validates domain name, and does not validate against pinned certificates or public keys.
67   -
68   - @return The default security policy.
69   - */
70   -+ (instancetype)defaultPolicy;
71   -
72   -///---------------------
73   -/// @name Initialization
74   -///---------------------
75   -
76   -/**
77   - Creates and returns a security policy with the specified pinning mode.
78   -
79   - @param pinningMode The SSL pinning mode.
80   -
81   - @return A new security policy.
82   - */
83   -+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode;
84   -
85   -///------------------------------
86   -/// @name Evaluating Server Trust
87   -///------------------------------
88   -
89   -/**
90   - Whether or not the specified server trust should be accepted, based on the security policy.
91   -
92   - This method should be used when responding to an authentication challenge from a server.
93   -
94   - @param serverTrust The X.509 certificate trust of the server.
95   -
96   - @return Whether or not to trust the server.
97   -
98   - @warning This method has been deprecated in favor of `-evaluateServerTrust:forDomain:`.
99   - */
100   -- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust DEPRECATED_ATTRIBUTE;
101   -
102   -/**
103   - Whether or not the specified server trust should be accepted, based on the security policy.
104   -
105   - This method should be used when responding to an authentication challenge from a server.
106   -
107   - @param serverTrust The X.509 certificate trust of the server.
108   - @param domain The domain of serverTrust. If `nil`, the domain will not be validated.
109   -
110   - @return Whether or not to trust the server.
111   - */
112   -- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
113   - forDomain:(nullable NSString *)domain;
114   -
115   -@end
116   -
117   -NS_ASSUME_NONNULL_END
118   -
119   -///----------------
120   -/// @name Constants
121   -///----------------
122   -
123   -/**
124   - ## SSL Pinning Modes
125   -
126   - The following constants are provided by `AFSSLPinningMode` as possible SSL pinning modes.
127   -
128   - enum {
129   - AFSSLPinningModeNone,
130   - AFSSLPinningModePublicKey,
131   - AFSSLPinningModeCertificate,
132   - }
133   -
134   - `AFSSLPinningModeNone`
135   - Do not used pinned certificates to validate servers.
136   -
137   - `AFSSLPinningModePublicKey`
138   - Validate host certificates against public keys of pinned certificates.
139   -
140   - `AFSSLPinningModeCertificate`
141   - Validate host certificates against pinned certificates.
142   -*/
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFURLConnectionOperation.h deleted 100644 → 0
1   -// AFURLConnectionOperation.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import <Availability.h>
25   -#import "AFURLRequestSerialization.h"
26   -#import "AFURLResponseSerialization.h"
27   -#import "AFSecurityPolicy.h"
28   -
29   -#ifndef NS_DESIGNATED_INITIALIZER
30   -#if __has_attribute(objc_designated_initializer)
31   -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
32   -#else
33   -#define NS_DESIGNATED_INITIALIZER
34   -#endif
35   -#endif
36   -
37   -/**
38   - `AFURLConnectionOperation` is a subclass of `NSOperation` that implements `NSURLConnection` delegate methods.
39   -
40   - ## Subclassing Notes
41   -
42   - This is the base class of all network request operations. You may wish to create your own subclass in order to implement additional `NSURLConnection` delegate methods (see "`NSURLConnection` Delegate Methods" below), or to provide additional properties and/or class constructors.
43   -
44   - If you are creating a subclass that communicates over the HTTP or HTTPS protocols, you may want to consider subclassing `AFHTTPRequestOperation` instead, as it supports specifying acceptable content types or status codes.
45   -
46   - ## NSURLConnection Delegate Methods
47   -
48   - `AFURLConnectionOperation` implements the following `NSURLConnection` delegate methods:
49   -
50   - - `connection:didReceiveResponse:`
51   - - `connection:didReceiveData:`
52   - - `connectionDidFinishLoading:`
53   - - `connection:didFailWithError:`
54   - - `connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:`
55   - - `connection:willCacheResponse:`
56   - - `connectionShouldUseCredentialStorage:`
57   - - `connection:needNewBodyStream:`
58   - - `connection:willSendRequestForAuthenticationChallenge:`
59   -
60   - If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first.
61   -
62   - ## Callbacks and Completion Blocks
63   -
64   - The built-in `completionBlock` provided by `NSOperation` allows for custom behavior to be executed after the request finishes. It is a common pattern for class constructors in subclasses to take callback block parameters, and execute them conditionally in the body of its `completionBlock`. Make sure to handle cancelled operations appropriately when setting a `completionBlock` (i.e. returning early before parsing response data). See the implementation of any of the `AFHTTPRequestOperation` subclasses for an example of this.
65   -
66   - Subclasses are strongly discouraged from overriding `setCompletionBlock:`, as `AFURLConnectionOperation`'s implementation includes a workaround to mitigate retain cycles, and what Apple rather ominously refers to as ["The Deallocation Problem"](http://developer.apple.com/library/ios/#technotes/tn2109/).
67   -
68   - ## SSL Pinning
69   -
70   - Relying on the CA trust model to validate SSL certificates exposes your app to security vulnerabilities, such as man-in-the-middle attacks. For applications that connect to known servers, SSL certificate pinning provides an increased level of security, by checking server certificate validity against those specified in the app bundle.
71   -
72   - SSL with certificate pinning is strongly recommended for any application that transmits sensitive information to an external webservice.
73   -
74   - Connections will be validated on all matching certificates with a `.cer` extension in the bundle root.
75   -
76   - ## NSCoding & NSCopying Conformance
77   -
78   - `AFURLConnectionOperation` conforms to the `NSCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. However, because of the intrinsic limitations of capturing the exact state of an operation at a particular moment, there are some important caveats to keep in mind:
79   -
80   - ### NSCoding Caveats
81   -
82   - - Encoded operations do not include any block or stream properties. Be sure to set `completionBlock`, `outputStream`, and any callback blocks as necessary when using `-initWithCoder:` or `NSKeyedUnarchiver`.
83   - - Operations are paused on `encodeWithCoder:`. If the operation was encoded while paused or still executing, its archived state will return `YES` for `isReady`. Otherwise, the state of an operation when encoding will remain unchanged.
84   -
85   - ### NSCopying Caveats
86   -
87   - - `-copy` and `-copyWithZone:` return a new operation with the `NSURLRequest` of the original. So rather than an exact copy of the operation at that particular instant, the copying mechanism returns a completely new instance, which can be useful for retrying operations.
88   - - A copy of an operation will not include the `outputStream` of the original.
89   - - Operation copies do not include `completionBlock`, as it often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ operation when copied.
90   - */
91   -
92   -NS_ASSUME_NONNULL_BEGIN
93   -
94   -@interface AFURLConnectionOperation : NSOperation <NSURLConnectionDelegate, NSURLConnectionDataDelegate, NSSecureCoding, NSCopying>
95   -
96   -///-------------------------------
97   -/// @name Accessing Run Loop Modes
98   -///-------------------------------
99   -
100   -/**
101   - The run loop modes in which the operation will run on the network thread. By default, this is a single-member set containing `NSRunLoopCommonModes`.
102   - */
103   -@property (nonatomic, strong) NSSet *runLoopModes;
104   -
105   -///-----------------------------------------
106   -/// @name Getting URL Connection Information
107   -///-----------------------------------------
108   -
109   -/**
110   - The request used by the operation's connection.
111   - */
112   -@property (readonly, nonatomic, strong) NSURLRequest *request;
113   -
114   -/**
115   - The last response received by the operation's connection.
116   - */
117   -@property (readonly, nonatomic, strong, nullable) NSURLResponse *response;
118   -
119   -/**
120   - The error, if any, that occurred in the lifecycle of the request.
121   - */
122   -@property (readonly, nonatomic, strong, nullable) NSError *error;
123   -
124   -///----------------------------
125   -/// @name Getting Response Data
126   -///----------------------------
127   -
128   -/**
129   - The data received during the request.
130   - */
131   -@property (readonly, nonatomic, strong, nullable) NSData *responseData;
132   -
133   -/**
134   - The string representation of the response data.
135   - */
136   -@property (readonly, nonatomic, copy, nullable) NSString *responseString;
137   -
138   -/**
139   - The string encoding of the response.
140   -
141   - If the response does not specify a valid string encoding, `responseStringEncoding` will return `NSUTF8StringEncoding`.
142   - */
143   -@property (readonly, nonatomic, assign) NSStringEncoding responseStringEncoding;
144   -
145   -///-------------------------------
146   -/// @name Managing URL Credentials
147   -///-------------------------------
148   -
149   -/**
150   - Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default.
151   -
152   - This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`.
153   - */
154   -@property (nonatomic, assign) BOOL shouldUseCredentialStorage;
155   -
156   -/**
157   - The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`.
158   -
159   - This will be overridden by any shared credentials that exist for the username or password of the request URL, if present.
160   - */
161   -@property (nonatomic, strong, nullable) NSURLCredential *credential;
162   -
163   -///-------------------------------
164   -/// @name Managing Security Policy
165   -///-------------------------------
166   -
167   -/**
168   - The security policy used to evaluate server trust for secure connections.
169   - */
170   -@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
171   -
172   -///------------------------
173   -/// @name Accessing Streams
174   -///------------------------
175   -
176   -/**
177   - The input stream used to read data to be sent during the request.
178   -
179   - This property acts as a proxy to the `HTTPBodyStream` property of `request`.
180   - */
181   -@property (nonatomic, strong) NSInputStream *inputStream;
182   -
183   -/**
184   - The output stream that is used to write data received until the request is finished.
185   -
186   - By default, data is accumulated into a buffer that is stored into `responseData` upon completion of the request, with the intermediary `outputStream` property set to `nil`. When `outputStream` is set, the data will not be accumulated into an internal buffer, and as a result, the `responseData` property of the completed request will be `nil`. The output stream will be scheduled in the network thread runloop upon being set.
187   - */
188   -@property (nonatomic, strong, nullable) NSOutputStream *outputStream;
189   -
190   -///---------------------------------
191   -/// @name Managing Callback Queues
192   -///---------------------------------
193   -
194   -/**
195   - The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used.
196   - */
197   -#if OS_OBJECT_USE_OBJC
198   -@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
199   -#else
200   -@property (nonatomic, assign, nullable) dispatch_queue_t completionQueue;
201   -#endif
202   -
203   -/**
204   - The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.
205   - */
206   -#if OS_OBJECT_USE_OBJC
207   -@property (nonatomic, strong, nullable) dispatch_group_t completionGroup;
208   -#else
209   -@property (nonatomic, assign, nullable) dispatch_group_t completionGroup;
210   -#endif
211   -
212   -///---------------------------------------------
213   -/// @name Managing Request Operation Information
214   -///---------------------------------------------
215   -
216   -/**
217   - The user info dictionary for the receiver.
218   - */
219   -@property (nonatomic, strong) NSDictionary *userInfo;
220   -// FIXME: It doesn't seem that this userInfo is used anywhere in the implementation.
221   -
222   -///------------------------------------------------------
223   -/// @name Initializing an AFURLConnectionOperation Object
224   -///------------------------------------------------------
225   -
226   -/**
227   - Initializes and returns a newly allocated operation object with a url connection configured with the specified url request.
228   -
229   - This is the designated initializer.
230   -
231   - @param urlRequest The request object to be used by the operation connection.
232   - */
233   -- (instancetype)initWithRequest:(NSURLRequest *)urlRequest NS_DESIGNATED_INITIALIZER;
234   -
235   -///----------------------------------
236   -/// @name Pausing / Resuming Requests
237   -///----------------------------------
238   -
239   -/**
240   - Pauses the execution of the request operation.
241   -
242   - A paused operation returns `NO` for `-isReady`, `-isExecuting`, and `-isFinished`. As such, it will remain in an `NSOperationQueue` until it is either cancelled or resumed. Pausing a finished, cancelled, or paused operation has no effect.
243   - */
244   -- (void)pause;
245   -
246   -/**
247   - Whether the request operation is currently paused.
248   -
249   - @return `YES` if the operation is currently paused, otherwise `NO`.
250   - */
251   -- (BOOL)isPaused;
252   -
253   -/**
254   - Resumes the execution of the paused request operation.
255   -
256   - Pause/Resume behavior varies depending on the underlying implementation for the operation class. In its base implementation, resuming a paused requests restarts the original request. However, since HTTP defines a specification for how to request a specific content range, `AFHTTPRequestOperation` will resume downloading the request from where it left off, instead of restarting the original request.
257   - */
258   -- (void)resume;
259   -
260   -///----------------------------------------------
261   -/// @name Configuring Backgrounding Task Behavior
262   -///----------------------------------------------
263   -
264   -/**
265   - Specifies that the operation should continue execution after the app has entered the background, and the expiration handler for that background task.
266   -
267   - @param handler A handler to be called shortly before the application’s remaining background time reaches 0. The handler is wrapped in a block that cancels the operation, and cleans up and marks the end of execution, unlike the `handler` parameter in `UIApplication -beginBackgroundTaskWithExpirationHandler:`, which expects this to be done in the handler itself. The handler is called synchronously on the main thread, thus blocking the application’s suspension momentarily while the application is notified.
268   - */
269   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
270   -- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(nullable void (^)(void))handler NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions.");
271   -#endif
272   -
273   -///---------------------------------
274   -/// @name Setting Progress Callbacks
275   -///---------------------------------
276   -
277   -/**
278   - Sets a callback to be called when an undetermined number of bytes have been uploaded to the server.
279   -
280   - @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes three arguments: the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread.
281   - */
282   -- (void)setUploadProgressBlock:(nullable void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block;
283   -
284   -/**
285   - Sets a callback to be called when an undetermined number of bytes have been downloaded from the server.
286   -
287   - @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread.
288   - */
289   -- (void)setDownloadProgressBlock:(nullable void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block;
290   -
291   -///-------------------------------------------------
292   -/// @name Setting NSURLConnection Delegate Callbacks
293   -///-------------------------------------------------
294   -
295   -/**
296   - Sets a block to be executed when the connection will authenticate a challenge in order to download its request, as handled by the `NSURLConnectionDelegate` method `connection:willSendRequestForAuthenticationChallenge:`.
297   -
298   - @param block A block object to be executed when the connection will authenticate a challenge in order to download its request. The block has no return type and takes two arguments: the URL connection object, and the challenge that must be authenticated. This block must invoke one of the challenge-responder methods (NSURLAuthenticationChallengeSender protocol).
299   -
300   - If `allowsInvalidSSLCertificate` is set to YES, `connection:willSendRequestForAuthenticationChallenge:` will attempt to have the challenge sender use credentials with invalid SSL certificates.
301   - */
302   -- (void)setWillSendRequestForAuthenticationChallengeBlock:(nullable void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block;
303   -
304   -/**
305   - Sets a block to be executed when the server redirects the request from one URL to another URL, or when the request URL changed by the `NSURLProtocol` subclass handling the request in order to standardize its format, as handled by the `NSURLConnectionDataDelegate` method `connection:willSendRequest:redirectResponse:`.
306   -
307   - @param block A block object to be executed when the request URL was changed. The block returns an `NSURLRequest` object, the URL request to redirect, and takes three arguments: the URL connection object, the the proposed redirected request, and the URL response that caused the redirect.
308   - */
309   -- (void)setRedirectResponseBlock:(nullable NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block;
310   -
311   -
312   -/**
313   - Sets a block to be executed to modify the response a connection will cache, if any, as handled by the `NSURLConnectionDelegate` method `connection:willCacheResponse:`.
314   -
315   - @param block A block object to be executed to determine what response a connection will cache, if any. The block returns an `NSCachedURLResponse` object, the cached response to store in memory or `nil` to prevent the response from being cached, and takes two arguments: the URL connection object, and the cached response provided for the request.
316   - */
317   -- (void)setCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block;
318   -
319   -///
320   -
321   -/**
322   -
323   - */
324   -+ (NSArray *)batchOfRequestOperations:(nullable NSArray *)operations
325   - progressBlock:(nullable void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock
326   - completionBlock:(nullable void (^)(NSArray *operations))completionBlock;
327   -
328   -@end
329   -
330   -///--------------------
331   -/// @name Notifications
332   -///--------------------
333   -
334   -/**
335   - Posted when an operation begins executing.
336   - */
337   -FOUNDATION_EXPORT NSString * const AFNetworkingOperationDidStartNotification;
338   -
339   -/**
340   - Posted when an operation finishes.
341   - */
342   -FOUNDATION_EXPORT NSString * const AFNetworkingOperationDidFinishNotification;
343   -
344   -NS_ASSUME_NONNULL_END
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFURLRequestSerialization.h deleted 100644 → 0
1   -// AFURLRequestSerialization.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -#if TARGET_OS_IOS
24   -#import <UIKit/UIKit.h>
25   -#elif TARGET_OS_WATCH
26   -#import <WatchKit/WatchKit.h>
27   -#endif
28   -
29   -NS_ASSUME_NONNULL_BEGIN
30   -
31   -/**
32   - The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary.
33   -
34   - For example, a JSON request serializer may set the HTTP body of the request to a JSON representation, and set the `Content-Type` HTTP header field value to `application/json`.
35   - */
36   -@protocol AFURLRequestSerialization <NSObject, NSSecureCoding, NSCopying>
37   -
38   -/**
39   - Returns a request with the specified parameters encoded into a copy of the original request.
40   -
41   - @param request The original request.
42   - @param parameters The parameters to be encoded.
43   - @param error The error that occurred while attempting to encode the request parameters.
44   -
45   - @return A serialized request.
46   - */
47   -- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
48   - withParameters:(nullable id)parameters
49   - error:(NSError * __nullable __autoreleasing *)error
50   -#ifdef NS_SWIFT_NOTHROW
51   -NS_SWIFT_NOTHROW
52   -#endif
53   -;
54   -@end
55   -
56   -#pragma mark -
57   -
58   -/**
59   -
60   - */
61   -typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) {
62   - AFHTTPRequestQueryStringDefaultStyle = 0,
63   -};
64   -
65   -@protocol AFMultipartFormData;
66   -
67   -/**
68   - `AFHTTPRequestSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation.
69   -
70   - Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPRequestSerializer` in order to ensure consistent default behavior.
71   - */
72   -@interface AFHTTPRequestSerializer : NSObject <AFURLRequestSerialization>
73   -
74   -/**
75   - The string encoding used to serialize parameters. `NSUTF8StringEncoding` by default.
76   - */
77   -@property (nonatomic, assign) NSStringEncoding stringEncoding;
78   -
79   -/**
80   - Whether created requests can use the device’s cellular radio (if present). `YES` by default.
81   -
82   - @see NSMutableURLRequest -setAllowsCellularAccess:
83   - */
84   -@property (nonatomic, assign) BOOL allowsCellularAccess;
85   -
86   -/**
87   - The cache policy of created requests. `NSURLRequestUseProtocolCachePolicy` by default.
88   -
89   - @see NSMutableURLRequest -setCachePolicy:
90   - */
91   -@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy;
92   -
93   -/**
94   - Whether created requests should use the default cookie handling. `YES` by default.
95   -
96   - @see NSMutableURLRequest -setHTTPShouldHandleCookies:
97   - */
98   -@property (nonatomic, assign) BOOL HTTPShouldHandleCookies;
99   -
100   -/**
101   - Whether created requests can continue transmitting data before receiving a response from an earlier transmission. `NO` by default
102   -
103   - @see NSMutableURLRequest -setHTTPShouldUsePipelining:
104   - */
105   -@property (nonatomic, assign) BOOL HTTPShouldUsePipelining;
106   -
107   -/**
108   - The network service type for created requests. `NSURLNetworkServiceTypeDefault` by default.
109   -
110   - @see NSMutableURLRequest -setNetworkServiceType:
111   - */
112   -@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType;
113   -
114   -/**
115   - The timeout interval, in seconds, for created requests. The default timeout interval is 60 seconds.
116   -
117   - @see NSMutableURLRequest -setTimeoutInterval:
118   - */
119   -@property (nonatomic, assign) NSTimeInterval timeoutInterval;
120   -
121   -///---------------------------------------
122   -/// @name Configuring HTTP Request Headers
123   -///---------------------------------------
124   -
125   -/**
126   - Default HTTP header field values to be applied to serialized requests. By default, these include the following:
127   -
128   - - `Accept-Language` with the contents of `NSLocale +preferredLanguages`
129   - - `User-Agent` with the contents of various bundle identifiers and OS designations
130   -
131   - @discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`.
132   - */
133   -@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders;
134   -
135   -/**
136   - Creates and returns a serializer with default configuration.
137   - */
138   -+ (instancetype)serializer;
139   -
140   -/**
141   - Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header.
142   -
143   - @param field The HTTP header to set a default value for
144   - @param value The value set as default for the specified header, or `nil`
145   - */
146   -- (void)setValue:(nullable NSString *)value
147   -forHTTPHeaderField:(NSString *)field;
148   -
149   -/**
150   - Returns the value for the HTTP headers set in the request serializer.
151   -
152   - @param field The HTTP header to retrieve the default value for
153   -
154   - @return The value set as default for the specified header, or `nil`
155   - */
156   -- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;
157   -
158   -/**
159   - Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header.
160   -
161   - @param username The HTTP basic auth username
162   - @param password The HTTP basic auth password
163   - */
164   -- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username
165   - password:(NSString *)password;
166   -
167   -/**
168   - @deprecated This method has been deprecated. Use -setValue:forHTTPHeaderField: instead.
169   - */
170   -- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token DEPRECATED_ATTRIBUTE;
171   -
172   -
173   -/**
174   - Clears any existing value for the "Authorization" HTTP header.
175   - */
176   -- (void)clearAuthorizationHeader;
177   -
178   -///-------------------------------------------------------
179   -/// @name Configuring Query String Parameter Serialization
180   -///-------------------------------------------------------
181   -
182   -/**
183   - HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default.
184   - */
185   -@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI;
186   -
187   -/**
188   - Set the method of query string serialization according to one of the pre-defined styles.
189   -
190   - @param style The serialization style.
191   -
192   - @see AFHTTPRequestQueryStringSerializationStyle
193   - */
194   -- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style;
195   -
196   -/**
197   - Set the a custom method of query string serialization according to the specified block.
198   -
199   - @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request.
200   - */
201   -- (void)setQueryStringSerializationWithBlock:(nullable NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block;
202   -
203   -///-------------------------------
204   -/// @name Creating Request Objects
205   -///-------------------------------
206   -
207   -/**
208   - @deprecated This method has been deprecated. Use -requestWithMethod:URLString:parameters:error: instead.
209   - */
210   -- (NSMutableURLRequest *)requestWithMethod:(NSString *)method
211   - URLString:(NSString *)URLString
212   - parameters:(id)parameters DEPRECATED_ATTRIBUTE;
213   -
214   -/**
215   - Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string.
216   -
217   - If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body.
218   -
219   - @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`.
220   - @param URLString The URL string used to create the request URL.
221   - @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body.
222   - @param error The error that occurred while constructing the request.
223   -
224   - @return An `NSMutableURLRequest` object.
225   - */
226   -- (NSMutableURLRequest *)requestWithMethod:(NSString *)method
227   - URLString:(NSString *)URLString
228   - parameters:(nullable id)parameters
229   - error:(NSError * __nullable __autoreleasing *)error;
230   -
231   -/**
232   - @deprecated This method has been deprecated. Use -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error: instead.
233   - */
234   -- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
235   - URLString:(NSString *)URLString
236   - parameters:(NSDictionary *)parameters
237   - constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block DEPRECATED_ATTRIBUTE;
238   -
239   -/**
240   - Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2
241   -
242   - Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream.
243   -
244   - @param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`.
245   - @param URLString The URL string used to create the request URL.
246   - @param parameters The parameters to be encoded and set in the request HTTP body.
247   - @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
248   - @param error The error that occurred while constructing the request.
249   -
250   - @return An `NSMutableURLRequest` object
251   - */
252   -- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
253   - URLString:(NSString *)URLString
254   - parameters:(nullable NSDictionary *)parameters
255   - constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
256   - error:(NSError * __nullable __autoreleasing *)error;
257   -
258   -/**
259   - Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished.
260   -
261   - @param request The multipart form request. The `HTTPBodyStream` property of `request` must not be `nil`.
262   - @param fileURL The file URL to write multipart form contents to.
263   - @param handler A handler block to execute.
264   -
265   - @discussion There is a bug in `NSURLSessionTask` that causes requests to not send a `Content-Length` header when streaming contents from an HTTP body, which is notably problematic when interacting with the Amazon S3 webservice. As a workaround, this method takes a request constructed with `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:`, or any other request with an `HTTPBodyStream`, writes the contents to the specified file and returns a copy of the original request with the `HTTPBodyStream` property set to `nil`. From here, the file can either be passed to `AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`, or have its contents read into an `NSData` that's assigned to the `HTTPBody` property of the request.
266   -
267   - @see https://github.com/AFNetworking/AFNetworking/issues/1398
268   - */
269   -- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request
270   - writingStreamContentsToFile:(NSURL *)fileURL
271   - completionHandler:(nullable void (^)(NSError * __nullable error))handler;
272   -
273   -@end
274   -
275   -#pragma mark -
276   -
277   -/**
278   - The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:`.
279   - */
280   -@protocol AFMultipartFormData
281   -
282   -/**
283   - Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary.
284   -
285   - The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively.
286   -
287   - @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.
288   - @param name The name to be associated with the specified data. This parameter must not be `nil`.
289   - @param error If an error occurs, upon return contains an `NSError` object that describes the problem.
290   -
291   - @return `YES` if the file data was successfully appended, otherwise `NO`.
292   - */
293   -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
294   - name:(NSString *)name
295   - error:(NSError * __nullable __autoreleasing *)error;
296   -
297   -/**
298   - Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.
299   -
300   - @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.
301   - @param name The name to be associated with the specified data. This parameter must not be `nil`.
302   - @param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`.
303   - @param mimeType The declared MIME type of the file data. This parameter must not be `nil`.
304   - @param error If an error occurs, upon return contains an `NSError` object that describes the problem.
305   -
306   - @return `YES` if the file data was successfully appended otherwise `NO`.
307   - */
308   -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
309   - name:(NSString *)name
310   - fileName:(NSString *)fileName
311   - mimeType:(NSString *)mimeType
312   - error:(NSError * __nullable __autoreleasing *)error;
313   -
314   -/**
315   - Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary.
316   -
317   - @param inputStream The input stream to be appended to the form data
318   - @param name The name to be associated with the specified input stream. This parameter must not be `nil`.
319   - @param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`.
320   - @param length The length of the specified input stream in bytes.
321   - @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.
322   - */
323   -- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream
324   - name:(NSString *)name
325   - fileName:(NSString *)fileName
326   - length:(int64_t)length
327   - mimeType:(NSString *)mimeType;
328   -
329   -/**
330   - Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.
331   -
332   - @param data The data to be encoded and appended to the form data.
333   - @param name The name to be associated with the specified data. This parameter must not be `nil`.
334   - @param fileName The filename to be associated with the specified data. This parameter must not be `nil`.
335   - @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.
336   - */
337   -- (void)appendPartWithFileData:(NSData *)data
338   - name:(NSString *)name
339   - fileName:(NSString *)fileName
340   - mimeType:(NSString *)mimeType;
341   -
342   -/**
343   - Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary.
344   -
345   - @param data The data to be encoded and appended to the form data.
346   - @param name The name to be associated with the specified data. This parameter must not be `nil`.
347   - */
348   -
349   -- (void)appendPartWithFormData:(NSData *)data
350   - name:(NSString *)name;
351   -
352   -
353   -/**
354   - Appends HTTP headers, followed by the encoded data and the multipart form boundary.
355   -
356   - @param headers The HTTP headers to be appended to the form data.
357   - @param body The data to be encoded and appended to the form data. This parameter must not be `nil`.
358   - */
359   -- (void)appendPartWithHeaders:(nullable NSDictionary *)headers
360   - body:(NSData *)body;
361   -
362   -/**
363   - Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream.
364   -
365   - When uploading over a 3G or EDGE connection, requests may fail with "request body stream exhausted". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, there is no definite way to distinguish between a 3G, EDGE, or LTE connection over `NSURLConnection`. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the "request body stream exhausted" in a failure block, and then retrying the request with throttled bandwidth.
366   -
367   - @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 16kb.
368   - @param delay Duration of delay each time a packet is read. By default, no delay is set.
369   - */
370   -- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes
371   - delay:(NSTimeInterval)delay;
372   -
373   -@end
374   -
375   -#pragma mark -
376   -
377   -/**
378   - `AFJSONRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSJSONSerialization`, setting the `Content-Type` of the encoded request to `application/json`.
379   - */
380   -@interface AFJSONRequestSerializer : AFHTTPRequestSerializer
381   -
382   -/**
383   - Options for writing the request JSON data from Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONWritingOptions". `0` by default.
384   - */
385   -@property (nonatomic, assign) NSJSONWritingOptions writingOptions;
386   -
387   -/**
388   - Creates and returns a JSON serializer with specified reading and writing options.
389   -
390   - @param writingOptions The specified JSON writing options.
391   - */
392   -+ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions;
393   -
394   -@end
395   -
396   -#pragma mark -
397   -
398   -/**
399   - `AFPropertyListRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSPropertyListSerializer`, setting the `Content-Type` of the encoded request to `application/x-plist`.
400   - */
401   -@interface AFPropertyListRequestSerializer : AFHTTPRequestSerializer
402   -
403   -/**
404   - The property list format. Possible values are described in "NSPropertyListFormat".
405   - */
406   -@property (nonatomic, assign) NSPropertyListFormat format;
407   -
408   -/**
409   - @warning The `writeOptions` property is currently unused.
410   - */
411   -@property (nonatomic, assign) NSPropertyListWriteOptions writeOptions;
412   -
413   -/**
414   - Creates and returns a property list serializer with a specified format, read options, and write options.
415   -
416   - @param format The property list format.
417   - @param writeOptions The property list write options.
418   -
419   - @warning The `writeOptions` property is currently unused.
420   - */
421   -+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
422   - writeOptions:(NSPropertyListWriteOptions)writeOptions;
423   -
424   -@end
425   -
426   -#pragma mark -
427   -
428   -///----------------
429   -/// @name Constants
430   -///----------------
431   -
432   -/**
433   - ## Error Domains
434   -
435   - The following error domain is predefined.
436   -
437   - - `NSString * const AFURLRequestSerializationErrorDomain`
438   -
439   - ### Constants
440   -
441   - `AFURLRequestSerializationErrorDomain`
442   - AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`.
443   - */
444   -FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain;
445   -
446   -/**
447   - ## User info dictionary keys
448   -
449   - These keys may exist in the user info dictionary, in addition to those defined for NSError.
450   -
451   - - `NSString * const AFNetworkingOperationFailingURLRequestErrorKey`
452   -
453   - ### Constants
454   -
455   - `AFNetworkingOperationFailingURLRequestErrorKey`
456   - The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`.
457   - */
458   -FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKey;
459   -
460   -/**
461   - ## Throttling Bandwidth for HTTP Request Input Streams
462   -
463   - @see -throttleBandwidthWithPacketSize:delay:
464   -
465   - ### Constants
466   -
467   - `kAFUploadStream3GSuggestedPacketSize`
468   - Maximum packet size, in number of bytes. Equal to 16kb.
469   -
470   - `kAFUploadStream3GSuggestedDelay`
471   - Duration of delay each time a packet is read. Equal to 0.2 seconds.
472   - */
473   -FOUNDATION_EXPORT NSUInteger const kAFUploadStream3GSuggestedPacketSize;
474   -FOUNDATION_EXPORT NSTimeInterval const kAFUploadStream3GSuggestedDelay;
475   -
476   -NS_ASSUME_NONNULL_END
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFURLResponseSerialization.h deleted 100644 → 0
1   -// AFURLResponseSerialization.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -#import <CoreGraphics/CoreGraphics.h>
24   -
25   -NS_ASSUME_NONNULL_BEGIN
26   -
27   -/**
28   - The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data.
29   -
30   - For example, a JSON response serializer may check for an acceptable status code (`2XX` range) and content type (`application/json`), decoding a valid JSON response into an object.
31   - */
32   -@protocol AFURLResponseSerialization <NSObject, NSSecureCoding, NSCopying>
33   -
34   -/**
35   - The response object decoded from the data associated with a specified response.
36   -
37   - @param response The response to be processed.
38   - @param data The response data to be decoded.
39   - @param error The error that occurred while attempting to decode the response data.
40   -
41   - @return The object decoded from the specified response data.
42   - */
43   -- (nullable id)responseObjectForResponse:(nullable NSURLResponse *)response
44   - data:(nullable NSData *)data
45   - error:(NSError * __nullable __autoreleasing *)error
46   -#ifdef NS_SWIFT_NOTHROW
47   -NS_SWIFT_NOTHROW
48   -#endif
49   -;
50   -
51   -@end
52   -
53   -#pragma mark -
54   -
55   -/**
56   - `AFHTTPResponseSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation.
57   -
58   - Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPResponseSerializer` in order to ensure consistent default behavior.
59   - */
60   -@interface AFHTTPResponseSerializer : NSObject <AFURLResponseSerialization>
61   -
62   -- (instancetype)init;
63   -
64   -/**
65   - The string encoding used to serialize data received from the server, when no string encoding is specified by the response. `NSUTF8StringEncoding` by default.
66   - */
67   -@property (nonatomic, assign) NSStringEncoding stringEncoding;
68   -
69   -/**
70   - Creates and returns a serializer with default configuration.
71   - */
72   -+ (instancetype)serializer;
73   -
74   -///-----------------------------------------
75   -/// @name Configuring Response Serialization
76   -///-----------------------------------------
77   -
78   -/**
79   - The acceptable HTTP status codes for responses. When non-`nil`, responses with status codes not contained by the set will result in an error during validation.
80   -
81   - See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
82   - */
83   -@property (nonatomic, copy, nullable) NSIndexSet *acceptableStatusCodes;
84   -
85   -/**
86   - The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation.
87   - */
88   -@property (nonatomic, copy, nullable) NSSet *acceptableContentTypes;
89   -
90   -/**
91   - Validates the specified response and data.
92   -
93   - In its base implementation, this method checks for an acceptable status code and content type. Subclasses may wish to add other domain-specific checks.
94   -
95   - @param response The response to be validated.
96   - @param data The data associated with the response.
97   - @param error The error that occurred while attempting to validate the response.
98   -
99   - @return `YES` if the response is valid, otherwise `NO`.
100   - */
101   -- (BOOL)validateResponse:(nullable NSHTTPURLResponse *)response
102   - data:(nullable NSData *)data
103   - error:(NSError * __nullable __autoreleasing *)error;
104   -
105   -@end
106   -
107   -#pragma mark -
108   -
109   -
110   -/**
111   - `AFJSONResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes JSON responses.
112   -
113   - By default, `AFJSONResponseSerializer` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types:
114   -
115   - - `application/json`
116   - - `text/json`
117   - - `text/javascript`
118   - */
119   -@interface AFJSONResponseSerializer : AFHTTPResponseSerializer
120   -
121   -- (instancetype)init;
122   -
123   -/**
124   - Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
125   - */
126   -@property (nonatomic, assign) NSJSONReadingOptions readingOptions;
127   -
128   -/**
129   - Whether to remove keys with `NSNull` values from response JSON. Defaults to `NO`.
130   - */
131   -@property (nonatomic, assign) BOOL removesKeysWithNullValues;
132   -
133   -/**
134   - Creates and returns a JSON serializer with specified reading and writing options.
135   -
136   - @param readingOptions The specified JSON reading options.
137   - */
138   -+ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions;
139   -
140   -@end
141   -
142   -#pragma mark -
143   -
144   -/**
145   - `AFXMLParserResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLParser` objects.
146   -
147   - By default, `AFXMLParserResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:
148   -
149   - - `application/xml`
150   - - `text/xml`
151   - */
152   -@interface AFXMLParserResponseSerializer : AFHTTPResponseSerializer
153   -
154   -@end
155   -
156   -#pragma mark -
157   -
158   -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
159   -
160   -/**
161   - `AFXMLDocumentResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.
162   -
163   - By default, `AFXMLDocumentResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:
164   -
165   - - `application/xml`
166   - - `text/xml`
167   - */
168   -@interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer
169   -
170   -- (instancetype)init;
171   -
172   -/**
173   - Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
174   - */
175   -@property (nonatomic, assign) NSUInteger options;
176   -
177   -/**
178   - Creates and returns an XML document serializer with the specified options.
179   -
180   - @param mask The XML document options.
181   - */
182   -+ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask;
183   -
184   -@end
185   -
186   -#endif
187   -
188   -#pragma mark -
189   -
190   -/**
191   - `AFPropertyListResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.
192   -
193   - By default, `AFPropertyListResponseSerializer` accepts the following MIME types:
194   -
195   - - `application/x-plist`
196   - */
197   -@interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer
198   -
199   -- (instancetype)init;
200   -
201   -/**
202   - The property list format. Possible values are described in "NSPropertyListFormat".
203   - */
204   -@property (nonatomic, assign) NSPropertyListFormat format;
205   -
206   -/**
207   - The property list reading options. Possible values are described in "NSPropertyListMutabilityOptions."
208   - */
209   -@property (nonatomic, assign) NSPropertyListReadOptions readOptions;
210   -
211   -/**
212   - Creates and returns a property list serializer with a specified format, read options, and write options.
213   -
214   - @param format The property list format.
215   - @param readOptions The property list reading options.
216   - */
217   -+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
218   - readOptions:(NSPropertyListReadOptions)readOptions;
219   -
220   -@end
221   -
222   -#pragma mark -
223   -
224   -/**
225   - `AFImageResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes image responses.
226   -
227   - By default, `AFImageResponseSerializer` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage:
228   -
229   - - `image/tiff`
230   - - `image/jpeg`
231   - - `image/gif`
232   - - `image/png`
233   - - `image/ico`
234   - - `image/x-icon`
235   - - `image/bmp`
236   - - `image/x-bmp`
237   - - `image/x-xbitmap`
238   - - `image/x-win-bitmap`
239   - */
240   -@interface AFImageResponseSerializer : AFHTTPResponseSerializer
241   -
242   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
243   -/**
244   - The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance.
245   - */
246   -@property (nonatomic, assign) CGFloat imageScale;
247   -
248   -/**
249   - Whether to automatically inflate response image data for compressed formats (such as PNG or JPEG). Enabling this can significantly improve drawing performance on iOS when used with `setCompletionBlockWithSuccess:failure:`, as it allows a bitmap representation to be constructed in the background rather than on the main thread. `YES` by default.
250   - */
251   -@property (nonatomic, assign) BOOL automaticallyInflatesResponseImage;
252   -#endif
253   -
254   -@end
255   -
256   -#pragma mark -
257   -
258   -/**
259   - `AFCompoundSerializer` is a subclass of `AFHTTPResponseSerializer` that delegates the response serialization to the first `AFHTTPResponseSerializer` object that returns an object for `responseObjectForResponse:data:error:`, falling back on the default behavior of `AFHTTPResponseSerializer`. This is useful for supporting multiple potential types and structures of server responses with a single serializer.
260   - */
261   -@interface AFCompoundResponseSerializer : AFHTTPResponseSerializer
262   -
263   -/**
264   - The component response serializers.
265   - */
266   -@property (readonly, nonatomic, copy) NSArray *responseSerializers;
267   -
268   -/**
269   - Creates and returns a compound serializer comprised of the specified response serializers.
270   -
271   - @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`.
272   - */
273   -+ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers;
274   -
275   -@end
276   -
277   -///----------------
278   -/// @name Constants
279   -///----------------
280   -
281   -/**
282   - ## Error Domains
283   -
284   - The following error domain is predefined.
285   -
286   - - `NSString * const AFURLResponseSerializationErrorDomain`
287   -
288   - ### Constants
289   -
290   - `AFURLResponseSerializationErrorDomain`
291   - AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`.
292   - */
293   -FOUNDATION_EXPORT NSString * const AFURLResponseSerializationErrorDomain;
294   -
295   -/**
296   - ## User info dictionary keys
297   -
298   - These keys may exist in the user info dictionary, in addition to those defined for NSError.
299   -
300   - - `NSString * const AFNetworkingOperationFailingURLResponseErrorKey`
301   - - `NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey`
302   -
303   - ### Constants
304   -
305   - `AFNetworkingOperationFailingURLResponseErrorKey`
306   - The corresponding value is an `NSURLResponse` containing the response of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`.
307   -
308   - `AFNetworkingOperationFailingURLResponseDataErrorKey`
309   - The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`.
310   - */
311   -FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseErrorKey;
312   -
313   -FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey;
314   -
315   -NS_ASSUME_NONNULL_END
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/AFURLSessionManager.h deleted 100644 → 0
1   -// AFURLSessionManager.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import "AFURLResponseSerialization.h"
25   -#import "AFURLRequestSerialization.h"
26   -#import "AFSecurityPolicy.h"
27   -#if !TARGET_OS_WATCH
28   -#import "AFNetworkReachabilityManager.h"
29   -#endif
30   -
31   -#ifndef NS_DESIGNATED_INITIALIZER
32   -#if __has_attribute(objc_designated_initializer)
33   -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
34   -#else
35   -#define NS_DESIGNATED_INITIALIZER
36   -#endif
37   -#endif
38   -
39   -/**
40   - `AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to `<NSURLSessionTaskDelegate>`, `<NSURLSessionDataDelegate>`, `<NSURLSessionDownloadDelegate>`, and `<NSURLSessionDelegate>`.
41   -
42   - ## Subclassing Notes
43   -
44   - This is the base class for `AFHTTPSessionManager`, which adds functionality specific to making HTTP requests. If you are looking to extend `AFURLSessionManager` specifically for HTTP, consider subclassing `AFHTTPSessionManager` instead.
45   -
46   - ## NSURLSession & NSURLSessionTask Delegate Methods
47   -
48   - `AFURLSessionManager` implements the following delegate methods:
49   -
50   - ### `NSURLSessionDelegate`
51   -
52   - - `URLSession:didBecomeInvalidWithError:`
53   - - `URLSession:didReceiveChallenge:completionHandler:`
54   - - `URLSessionDidFinishEventsForBackgroundURLSession:`
55   -
56   - ### `NSURLSessionTaskDelegate`
57   -
58   - - `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`
59   - - `URLSession:task:didReceiveChallenge:completionHandler:`
60   - - `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`
61   - - `URLSession:task:didCompleteWithError:`
62   -
63   - ### `NSURLSessionDataDelegate`
64   -
65   - - `URLSession:dataTask:didReceiveResponse:completionHandler:`
66   - - `URLSession:dataTask:didBecomeDownloadTask:`
67   - - `URLSession:dataTask:didReceiveData:`
68   - - `URLSession:dataTask:willCacheResponse:completionHandler:`
69   -
70   - ### `NSURLSessionDownloadDelegate`
71   -
72   - - `URLSession:downloadTask:didFinishDownloadingToURL:`
73   - - `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`
74   - - `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`
75   -
76   - If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first.
77   -
78   - ## Network Reachability Monitoring
79   -
80   - Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details.
81   -
82   - ## NSCoding Caveats
83   -
84   - - Encoded managers do not include any block properties. Be sure to set delegate callback blocks when using `-initWithCoder:` or `NSKeyedUnarchiver`.
85   -
86   - ## NSCopying Caveats
87   -
88   - - `-copy` and `-copyWithZone:` return a new manager with a new `NSURLSession` created from the configuration of the original.
89   - - Operation copies do not include any delegate callback blocks, as they often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ session manager when copied.
90   -
91   - @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.
92   - */
93   -
94   -NS_ASSUME_NONNULL_BEGIN
95   -
96   -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || TARGET_OS_WATCH
97   -
98   -@interface AFURLSessionManager : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate, NSSecureCoding, NSCopying>
99   -
100   -/**
101   - The managed session.
102   - */
103   -@property (readonly, nonatomic, strong) NSURLSession *session;
104   -
105   -/**
106   - The operation queue on which delegate callbacks are run.
107   - */
108   -@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue;
109   -
110   -/**
111   - Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`.
112   -
113   - @warning `responseSerializer` must not be `nil`.
114   - */
115   -@property (nonatomic, strong) id <AFURLResponseSerialization> responseSerializer;
116   -
117   -///-------------------------------
118   -/// @name Managing Security Policy
119   -///-------------------------------
120   -
121   -/**
122   - The security policy used by created request operations to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified.
123   - */
124   -@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
125   -
126   -#if !TARGET_OS_WATCH
127   -///--------------------------------------
128   -/// @name Monitoring Network Reachability
129   -///--------------------------------------
130   -
131   -/**
132   - The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default.
133   - */
134   -@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;
135   -#endif
136   -
137   -///----------------------------
138   -/// @name Getting Session Tasks
139   -///----------------------------
140   -
141   -/**
142   - The data, upload, and download tasks currently run by the managed session.
143   - */
144   -@property (readonly, nonatomic, strong) NSArray *tasks;
145   -
146   -/**
147   - The data tasks currently run by the managed session.
148   - */
149   -@property (readonly, nonatomic, strong) NSArray *dataTasks;
150   -
151   -/**
152   - The upload tasks currently run by the managed session.
153   - */
154   -@property (readonly, nonatomic, strong) NSArray *uploadTasks;
155   -
156   -/**
157   - The download tasks currently run by the managed session.
158   - */
159   -@property (readonly, nonatomic, strong) NSArray *downloadTasks;
160   -
161   -///-------------------------------
162   -/// @name Managing Callback Queues
163   -///-------------------------------
164   -
165   -/**
166   - The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used.
167   - */
168   -#if OS_OBJECT_USE_OBJC
169   -@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
170   -#else
171   -@property (nonatomic, assign, nullable) dispatch_queue_t completionQueue;
172   -#endif
173   -
174   -/**
175   - The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.
176   - */
177   -#if OS_OBJECT_USE_OBJC
178   -@property (nonatomic, strong, nullable) dispatch_group_t completionGroup;
179   -#else
180   -@property (nonatomic, assign, nullable) dispatch_group_t completionGroup;
181   -#endif
182   -
183   -///---------------------------------
184   -/// @name Working Around System Bugs
185   -///---------------------------------
186   -
187   -/**
188   - Whether to attempt to retry creation of upload tasks for background sessions when initial call returns `nil`. `NO` by default.
189   -
190   - @bug As of iOS 7.0, there is a bug where upload tasks created for background tasks are sometimes `nil`. As a workaround, if this property is `YES`, AFNetworking will follow Apple's recommendation to try creating the task again.
191   -
192   - @see https://github.com/AFNetworking/AFNetworking/issues/1675
193   - */
194   -@property (nonatomic, assign) BOOL attemptsToRecreateUploadTasksForBackgroundSessions;
195   -
196   -///---------------------
197   -/// @name Initialization
198   -///---------------------
199   -
200   -/**
201   - Creates and returns a manager for a session created with the specified configuration. This is the designated initializer.
202   -
203   - @param configuration The configuration used to create the managed session.
204   -
205   - @return A manager for a newly-created session.
206   - */
207   -- (instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
208   -
209   -/**
210   - Invalidates the managed session, optionally canceling pending tasks.
211   -
212   - @param cancelPendingTasks Whether or not to cancel pending tasks.
213   - */
214   -- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks;
215   -
216   -///-------------------------
217   -/// @name Running Data Tasks
218   -///-------------------------
219   -
220   -/**
221   - Creates an `NSURLSessionDataTask` with the specified request.
222   -
223   - @param request The HTTP request for the request.
224   - @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
225   - */
226   -- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
227   - completionHandler:(nullable void (^)(NSURLResponse *response, id __nullable responseObject, NSError * __nullable error))completionHandler;
228   -
229   -///---------------------------
230   -/// @name Running Upload Tasks
231   -///---------------------------
232   -
233   -/**
234   - Creates an `NSURLSessionUploadTask` with the specified request for a local file.
235   -
236   - @param request The HTTP request for the request.
237   - @param fileURL A URL to the local file to be uploaded.
238   - @param progress A progress object monitoring the current upload progress.
239   - @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
240   -
241   - @see `attemptsToRecreateUploadTasksForBackgroundSessions`
242   - */
243   -- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
244   - fromFile:(NSURL *)fileURL
245   - progress:(NSProgress * __nullable __autoreleasing * __nullable)progress
246   - completionHandler:(nullable void (^)(NSURLResponse *response, id __nullable responseObject, NSError * __nullable error))completionHandler;
247   -
248   -/**
249   - Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body.
250   -
251   - @param request The HTTP request for the request.
252   - @param bodyData A data object containing the HTTP body to be uploaded.
253   - @param progress A progress object monitoring the current upload progress.
254   - @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
255   - */
256   -- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
257   - fromData:(nullable NSData *)bodyData
258   - progress:(NSProgress * __nullable __autoreleasing * __nullable)progress
259   - completionHandler:(nullable void (^)(NSURLResponse *response, id __nullable responseObject, NSError * __nullable error))completionHandler;
260   -
261   -/**
262   - Creates an `NSURLSessionUploadTask` with the specified streaming request.
263   -
264   - @param request The HTTP request for the request.
265   - @param progress A progress object monitoring the current upload progress.
266   - @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
267   - */
268   -- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request
269   - progress:(NSProgress * __nullable __autoreleasing * __nullable)progress
270   - completionHandler:(nullable void (^)(NSURLResponse *response, id __nullable responseObject, NSError * __nullable error))completionHandler;
271   -
272   -///-----------------------------
273   -/// @name Running Download Tasks
274   -///-----------------------------
275   -
276   -/**
277   - Creates an `NSURLSessionDownloadTask` with the specified request.
278   -
279   - @param request The HTTP request for the request.
280   - @param progress A progress object monitoring the current download progress.
281   - @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
282   - @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
283   -
284   - @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method.
285   - */
286   -- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request
287   - progress:(NSProgress * __nullable __autoreleasing * __nullable)progress
288   - destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
289   - completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * __nullable filePath, NSError * __nullable error))completionHandler;
290   -
291   -/**
292   - Creates an `NSURLSessionDownloadTask` with the specified resume data.
293   -
294   - @param resumeData The data used to resume downloading.
295   - @param progress A progress object monitoring the current download progress.
296   - @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
297   - @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
298   - */
299   -- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData
300   - progress:(NSProgress * __nullable __autoreleasing * __nullable)progress
301   - destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
302   - completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * __nullable filePath, NSError * __nullable error))completionHandler;
303   -
304   -///---------------------------------
305   -/// @name Getting Progress for Tasks
306   -///---------------------------------
307   -
308   -/**
309   - Returns the upload progress of the specified task.
310   -
311   - @param uploadTask The session upload task. Must not be `nil`.
312   -
313   - @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable.
314   - */
315   -- (nullable NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask;
316   -
317   -/**
318   - Returns the download progress of the specified task.
319   -
320   - @param downloadTask The session download task. Must not be `nil`.
321   -
322   - @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable.
323   - */
324   -- (nullable NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask;
325   -
326   -///-----------------------------------------
327   -/// @name Setting Session Delegate Callbacks
328   -///-----------------------------------------
329   -
330   -/**
331   - Sets a block to be executed when the managed session becomes invalid, as handled by the `NSURLSessionDelegate` method `URLSession:didBecomeInvalidWithError:`.
332   -
333   - @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation.
334   - */
335   -- (void)setSessionDidBecomeInvalidBlock:(nullable void (^)(NSURLSession *session, NSError *error))block;
336   -
337   -/**
338   - Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`.
339   -
340   - @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.
341   - */
342   -- (void)setSessionDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __nullable __autoreleasing * __nullable credential))block;
343   -
344   -///--------------------------------------
345   -/// @name Setting Task Delegate Callbacks
346   -///--------------------------------------
347   -
348   -/**
349   - Sets a block to be executed when a task requires a new request body stream to send to the remote server, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:needNewBodyStream:`.
350   -
351   - @param block A block object to be executed when a task requires a new request body stream.
352   - */
353   -- (void)setTaskNeedNewBodyStreamBlock:(nullable NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block;
354   -
355   -/**
356   - Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`.
357   -
358   - @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response.
359   - */
360   -- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block;
361   -
362   -/**
363   - Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`.
364   -
365   - @param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.
366   - */
367   -- (void)setTaskDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __nullable __autoreleasing * __nullable credential))block;
368   -
369   -/**
370   - Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`.
371   -
372   - @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread.
373   - */
374   -- (void)setTaskDidSendBodyDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block;
375   -
376   -/**
377   - Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`.
378   -
379   - @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task.
380   - */
381   -- (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * __nullable error))block;
382   -
383   -///-------------------------------------------
384   -/// @name Setting Data Task Delegate Callbacks
385   -///-------------------------------------------
386   -
387   -/**
388   - Sets a block to be executed when a data task has received a response, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveResponse:completionHandler:`.
389   -
390   - @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response.
391   - */
392   -- (void)setDataTaskDidReceiveResponseBlock:(nullable NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block;
393   -
394   -/**
395   - Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`.
396   -
397   - @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become.
398   - */
399   -- (void)setDataTaskDidBecomeDownloadTaskBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block;
400   -
401   -/**
402   - Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`.
403   -
404   - @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue.
405   - */
406   -- (void)setDataTaskDidReceiveDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block;
407   -
408   -/**
409   - Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`.
410   -
411   - @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response.
412   - */
413   -- (void)setDataTaskWillCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block;
414   -
415   -/**
416   - Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`.
417   -
418   - @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session.
419   - */
420   -- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block;
421   -
422   -///-----------------------------------------------
423   -/// @name Setting Download Task Delegate Callbacks
424   -///-----------------------------------------------
425   -
426   -/**
427   - Sets a block to be executed when a download task has completed a download, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didFinishDownloadingToURL:`.
428   -
429   - @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error.
430   - */
431   -- (void)setDownloadTaskDidFinishDownloadingBlock:(nullable NSURL * __nullable (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block;
432   -
433   -/**
434   - Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`.
435   -
436   - @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue.
437   - */
438   -- (void)setDownloadTaskDidWriteDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block;
439   -
440   -/**
441   - Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`.
442   -
443   - @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded.
444   - */
445   -- (void)setDownloadTaskDidResumeBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block;
446   -
447   -@end
448   -
449   -#endif
450   -
451   -///--------------------
452   -/// @name Notifications
453   -///--------------------
454   -
455   -/**
456   - Posted when a task begins executing.
457   -
458   - @deprecated Use `AFNetworkingTaskDidResumeNotification` instead.
459   - */
460   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidStartNotification DEPRECATED_ATTRIBUTE;
461   -
462   -/**
463   - Posted when a task resumes.
464   - */
465   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidResumeNotification;
466   -
467   -/**
468   - Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task.
469   -
470   - @deprecated Use `AFNetworkingTaskDidCompleteNotification` instead.
471   - */
472   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidFinishNotification DEPRECATED_ATTRIBUTE;
473   -
474   -/**
475   - Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task.
476   - */
477   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteNotification;
478   -
479   -/**
480   - Posted when a task suspends its execution.
481   - */
482   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidSuspendNotification;
483   -
484   -/**
485   - Posted when a session is invalidated.
486   - */
487   -FOUNDATION_EXPORT NSString * const AFURLSessionDidInvalidateNotification;
488   -
489   -/**
490   - Posted when a session download task encountered an error when moving the temporary download file to a specified destination.
491   - */
492   -FOUNDATION_EXPORT NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification;
493   -
494   -/**
495   - The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task.
496   -
497   - @deprecated Use `AFNetworkingTaskDidCompleteResponseDataKey` instead.
498   - */
499   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidFinishResponseDataKey DEPRECATED_ATTRIBUTE;
500   -
501   -/**
502   - The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task.
503   - */
504   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseDataKey;
505   -
506   -/**
507   - The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized.
508   -
509   - @deprecated Use `AFNetworkingTaskDidCompleteSerializedResponseKey` instead.
510   - */
511   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidFinishSerializedResponseKey DEPRECATED_ATTRIBUTE;
512   -
513   -/**
514   - The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized.
515   - */
516   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey;
517   -
518   -/**
519   - The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer.
520   -
521   - @deprecated Use `AFNetworkingTaskDidCompleteResponseSerializerKey` instead.
522   - */
523   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidFinishResponseSerializerKey DEPRECATED_ATTRIBUTE;
524   -
525   -/**
526   - The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer.
527   - */
528   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey;
529   -
530   -/**
531   - The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk.
532   -
533   - @deprecated Use `AFNetworkingTaskDidCompleteAssetPathKey` instead.
534   - */
535   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidFinishAssetPathKey DEPRECATED_ATTRIBUTE;
536   -
537   -/**
538   - The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk.
539   - */
540   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteAssetPathKey;
541   -
542   -/**
543   - Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists.
544   -
545   - @deprecated Use `AFNetworkingTaskDidCompleteErrorKey` instead.
546   - */
547   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidFinishErrorKey DEPRECATED_ATTRIBUTE;
548   -
549   -/**
550   - Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists.
551   - */
552   -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey;
553   -
554   -NS_ASSUME_NONNULL_END
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/UIActivityIndicatorView+AFNetworking.h deleted 100644 → 0
1   -// UIActivityIndicatorView+AFNetworking.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import <Availability.h>
25   -
26   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
27   -
28   -#import <UIKit/UIKit.h>
29   -
30   -@class AFURLConnectionOperation;
31   -
32   -/**
33   - This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a request operation or session task.
34   - */
35   -@interface UIActivityIndicatorView (AFNetworking)
36   -
37   -///----------------------------------
38   -/// @name Animating for Session Tasks
39   -///----------------------------------
40   -
41   -/**
42   - Binds the animating state to the state of the specified task.
43   -
44   - @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled.
45   - */
46   -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
47   -- (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task;
48   -#endif
49   -
50   -///---------------------------------------
51   -/// @name Animating for Request Operations
52   -///---------------------------------------
53   -
54   -/**
55   - Binds the animating state to the execution state of the specified operation.
56   -
57   - @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled.
58   - */
59   -- (void)setAnimatingWithStateOfOperation:(nullable AFURLConnectionOperation *)operation;
60   -
61   -@end
62   -
63   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/UIAlertView+AFNetworking.h deleted 100644 → 0
1   -// UIAlertView+AFNetworking.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import <Availability.h>
25   -
26   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
27   -
28   -#import <UIKit/UIKit.h>
29   -
30   -NS_ASSUME_NONNULL_BEGIN
31   -
32   -@class AFURLConnectionOperation;
33   -
34   -/**
35   - This category adds methods to the UIKit framework's `UIAlertView` class. The methods in this category provide support for automatically showing an alert if a session task or request operation finishes with an error. Alert title and message are filled from the corresponding `localizedDescription` & `localizedRecoverySuggestion` or `localizedFailureReason` of the error.
36   - */
37   -@interface UIAlertView (AFNetworking)
38   -
39   -///-------------------------------------
40   -/// @name Showing Alert for Session Task
41   -///-------------------------------------
42   -
43   -/**
44   - Shows an alert view with the error of the specified session task, if any.
45   -
46   - @param task The session task.
47   - @param delegate The alert view delegate.
48   - */
49   -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
50   -+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task
51   - delegate:(nullable id)delegate NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions.");
52   -#endif
53   -
54   -/**
55   - Shows an alert view with the error of the specified session task, if any, with a custom cancel button title and other button titles.
56   -
57   - @param task The session task.
58   - @param delegate The alert view delegate.
59   - @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title.
60   - @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see "Temporary Views". Titles of additional buttons to add to the receiver, terminated with `nil`.
61   - */
62   -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
63   -+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task
64   - delegate:(nullable id)delegate
65   - cancelButtonTitle:(nullable NSString *)cancelButtonTitle
66   - otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions.");
67   -#endif
68   -
69   -///------------------------------------------
70   -/// @name Showing Alert for Request Operation
71   -///------------------------------------------
72   -
73   -/**
74   - Shows an alert view with the error of the specified request operation, if any.
75   -
76   - @param operation The request operation.
77   - @param delegate The alert view delegate.
78   - */
79   -+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation
80   - delegate:(nullable id)delegate NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions.");
81   -
82   -/**
83   - Shows an alert view with the error of the specified request operation, if any, with a custom cancel button title and other button titles.
84   -
85   - @param operation The request operation.
86   - @param delegate The alert view delegate.
87   - @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title.
88   - @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see "Temporary Views". Titles of additional buttons to add to the receiver, terminated with `nil`.
89   - */
90   -+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation
91   - delegate:(nullable id)delegate
92   - cancelButtonTitle:(nullable NSString *)cancelButtonTitle
93   - otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extensions.");
94   -
95   -@end
96   -
97   -NS_ASSUME_NONNULL_END
98   -
99   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/UIButton+AFNetworking.h deleted 100644 → 0
1   -// UIButton+AFNetworking.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import <Availability.h>
25   -
26   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
27   -
28   -#import <UIKit/UIKit.h>
29   -
30   -NS_ASSUME_NONNULL_BEGIN
31   -
32   -@protocol AFURLResponseSerialization, AFImageCache;
33   -
34   -/**
35   - This category adds methods to the UIKit framework's `UIButton` class. The methods in this category provide support for loading remote images and background images asynchronously from a URL.
36   -
37   - @warning Compound values for control `state` (such as `UIControlStateHighlighted | UIControlStateDisabled`) are unsupported.
38   - */
39   -@interface UIButton (AFNetworking)
40   -
41   -///----------------------------
42   -/// @name Accessing Image Cache
43   -///----------------------------
44   -
45   -/**
46   - The image cache used to improve image loading performance on scroll views. By default, `UIButton` will use the `sharedImageCache` of `UIImageView`.
47   - */
48   -+ (id <AFImageCache>)sharedImageCache;
49   -
50   -/**
51   - Set the cache used for image loading.
52   -
53   - @param imageCache The image cache.
54   - */
55   -+ (void)setSharedImageCache:(__nullable id <AFImageCache>)imageCache;
56   -
57   -///------------------------------------
58   -/// @name Accessing Response Serializer
59   -///------------------------------------
60   -
61   -/**
62   - The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`.
63   -
64   - @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer
65   - */
66   -@property (nonatomic, strong) id <AFURLResponseSerialization> imageResponseSerializer;
67   -
68   -///--------------------
69   -/// @name Setting Image
70   -///--------------------
71   -
72   -/**
73   - Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.
74   -
75   - If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.
76   -
77   - @param state The control state.
78   - @param url The URL used for the image request.
79   - */
80   -- (void)setImageForState:(UIControlState)state
81   - withURL:(NSURL *)url;
82   -
83   -/**
84   - Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.
85   -
86   - If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.
87   -
88   - @param state The control state.
89   - @param url The URL used for the image request.
90   - @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes.
91   - */
92   -- (void)setImageForState:(UIControlState)state
93   - withURL:(NSURL *)url
94   - placeholderImage:(nullable UIImage *)placeholderImage;
95   -
96   -/**
97   - Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.
98   -
99   - If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.
100   -
101   - If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setImage:forState:` is applied.
102   -
103   - @param state The control state.
104   - @param urlRequest The URL request used for the image request.
105   - @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes.
106   - @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes two arguments: the server response and the image. If the image was returned from cache, the response parameter will be `nil`.
107   - @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes a single argument: the error that occurred.
108   - */
109   -- (void)setImageForState:(UIControlState)state
110   - withURLRequest:(NSURLRequest *)urlRequest
111   - placeholderImage:(nullable UIImage *)placeholderImage
112   - success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * __nullable response, UIImage *image))success
113   - failure:(nullable void (^)(NSError *error))failure;
114   -
115   -
116   -///-------------------------------
117   -/// @name Setting Background Image
118   -///-------------------------------
119   -
120   -/**
121   - Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous background image request for the receiver will be cancelled.
122   -
123   - If the background image is cached locally, the background image is set immediately, otherwise the specified placeholder background image will be set immediately, and then the remote background image will be set once the request is finished.
124   -
125   - @param state The control state.
126   - @param url The URL used for the background image request.
127   - */
128   -- (void)setBackgroundImageForState:(UIControlState)state
129   - withURL:(NSURL *)url;
130   -
131   -/**
132   - Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.
133   -
134   - If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.
135   -
136   - @param state The control state.
137   - @param url The URL used for the background image request.
138   - @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes.
139   - */
140   -- (void)setBackgroundImageForState:(UIControlState)state
141   - withURL:(NSURL *)url
142   - placeholderImage:(nullable UIImage *)placeholderImage;
143   -
144   -/**
145   - Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.
146   -
147   - If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.
148   -
149   - If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setBackgroundImage:forState:` is applied.
150   -
151   - @param state The control state.
152   - @param urlRequest The URL request used for the image request.
153   - @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes.
154   - @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes two arguments: the server response and the image. If the image was returned from cache, the response parameter will be `nil`.
155   - @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes a single argument: the error that occurred.
156   - */
157   -- (void)setBackgroundImageForState:(UIControlState)state
158   - withURLRequest:(NSURLRequest *)urlRequest
159   - placeholderImage:(nullable UIImage *)placeholderImage
160   - success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * __nullable response, UIImage *image))success
161   - failure:(nullable void (^)(NSError *error))failure;
162   -
163   -
164   -///------------------------------
165   -/// @name Canceling Image Loading
166   -///------------------------------
167   -
168   -/**
169   - Cancels any executing image operation for the specified control state of the receiver, if one exists.
170   -
171   - @param state The control state.
172   - */
173   -- (void)cancelImageRequestOperationForState:(UIControlState)state;
174   -
175   -/**
176   - Cancels any executing background image operation for the specified control state of the receiver, if one exists.
177   -
178   - @param state The control state.
179   - */
180   -- (void)cancelBackgroundImageRequestOperationForState:(UIControlState)state;
181   -
182   -@end
183   -
184   -NS_ASSUME_NONNULL_END
185   -
186   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/UIImage+AFNetworking.h deleted 100644 → 0
1   -//
2   -// UIImage+AFNetworking.h
3   -//
4   -//
5   -// Created by Paulo Ferreira on 08/07/15.
6   -//
7   -// Permission is hereby granted, free of charge, to any person obtaining a copy
8   -// of this software and associated documentation files (the "Software"), to deal
9   -// in the Software without restriction, including without limitation the rights
10   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11   -// copies of the Software, and to permit persons to whom the Software is
12   -// furnished to do so, subject to the following conditions:
13   -//
14   -// The above copyright notice and this permission notice shall be included in
15   -// all copies or substantial portions of the Software.
16   -//
17   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23   -// THE SOFTWARE.
24   -
25   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
26   -
27   -#import <UIKit/UIKit.h>
28   -
29   -@interface UIImage (AFNetworking)
30   -
31   -+ (UIImage*) safeImageWithData:(NSData*)data;
32   -
33   -@end
34   -
35   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/UIImageView+AFNetworking.h deleted 100644 → 0
1   -// UIImageView+AFNetworking.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import <Availability.h>
25   -
26   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
27   -
28   -#import <UIKit/UIKit.h>
29   -
30   -NS_ASSUME_NONNULL_BEGIN
31   -
32   -@protocol AFURLResponseSerialization, AFImageCache;
33   -
34   -/**
35   - This category adds methods to the UIKit framework's `UIImageView` class. The methods in this category provide support for loading remote images asynchronously from a URL.
36   - */
37   -@interface UIImageView (AFNetworking)
38   -
39   -///----------------------------
40   -/// @name Accessing Image Cache
41   -///----------------------------
42   -
43   -/**
44   - The image cache used to improve image loading performance on scroll views. By default, this is an `NSCache` subclass conforming to the `AFImageCache` protocol, which listens for notification warnings and evicts objects accordingly.
45   -*/
46   -+ (id <AFImageCache>)sharedImageCache;
47   -
48   -/**
49   - Set the cache used for image loading.
50   -
51   - @param imageCache The image cache.
52   - */
53   -+ (void)setSharedImageCache:(__nullable id <AFImageCache>)imageCache;
54   -
55   -///------------------------------------
56   -/// @name Accessing Response Serializer
57   -///------------------------------------
58   -
59   -/**
60   - The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`.
61   -
62   - @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer
63   - */
64   -@property (nonatomic, strong) id <AFURLResponseSerialization> imageResponseSerializer;
65   -
66   -///--------------------
67   -/// @name Setting Image
68   -///--------------------
69   -
70   -/**
71   - Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled.
72   -
73   - If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.
74   -
75   - By default, URL requests have a `Accept` header field value of "image / *", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:`
76   -
77   - @param url The URL used for the image request.
78   - */
79   -- (void)setImageWithURL:(NSURL *)url;
80   -
81   -/**
82   - Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled.
83   -
84   - If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.
85   -
86   - By default, URL requests have a `Accept` header field value of "image / *", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:`
87   -
88   - @param url The URL used for the image request.
89   - @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes.
90   - */
91   -- (void)setImageWithURL:(NSURL *)url
92   - placeholderImage:(nullable UIImage *)placeholderImage;
93   -
94   -/**
95   - Asynchronously downloads an image from the specified URL request, and sets it once the request is finished. Any previous image request for the receiver will be cancelled.
96   -
97   - If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.
98   -
99   - If a success block is specified, it is the responsibility of the block to set the image of the image view before returning. If no success block is specified, the default behavior of setting the image with `self.image = image` is applied.
100   -
101   - @param urlRequest The URL request used for the image request.
102   - @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes.
103   - @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`.
104   - @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred.
105   - */
106   -- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest
107   - placeholderImage:(nullable UIImage *)placeholderImage
108   - success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * __nullable response, UIImage *image))success
109   - failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * __nullable response, NSError *error))failure;
110   -
111   -/**
112   - Cancels any executing image operation for the receiver, if one exists.
113   - */
114   -- (void)cancelImageRequestOperation;
115   -
116   -@end
117   -
118   -#pragma mark -
119   -
120   -/**
121   - The `AFImageCache` protocol is adopted by an object used to cache images loaded by the AFNetworking category on `UIImageView`.
122   - */
123   -@protocol AFImageCache <NSObject>
124   -
125   -/**
126   - Returns a cached image for the specified request, if available.
127   -
128   - @param request The image request.
129   -
130   - @return The cached image.
131   - */
132   -- (nullable UIImage *)cachedImageForRequest:(NSURLRequest *)request;
133   -
134   -/**
135   - Caches a particular image for the specified request.
136   -
137   - @param image The image to cache.
138   - @param request The request to be used as a cache key.
139   - */
140   -- (void)cacheImage:(UIImage *)image
141   - forRequest:(NSURLRequest *)request;
142   -@end
143   -
144   -NS_ASSUME_NONNULL_END
145   -
146   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/UIKit+AFNetworking.h deleted 100644 → 0
1   -// UIKit+AFNetworking.h
2   -//
3   -// Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
4   -//
5   -// Permission is hereby granted, free of charge, to any person obtaining a copy
6   -// of this software and associated documentation files (the "Software"), to deal
7   -// in the Software without restriction, including without limitation the rights
8   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9   -// copies of the Software, and to permit persons to whom the Software is
10   -// furnished to do so, subject to the following conditions:
11   -//
12   -// The above copyright notice and this permission notice shall be included in
13   -// all copies or substantial portions of the Software.
14   -//
15   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21   -// THE SOFTWARE.
22   -
23   -#if TARGET_OS_IOS
24   -#import <UIKit/UIKit.h>
25   -
26   -#ifndef _UIKIT_AFNETWORKING_
27   - #define _UIKIT_AFNETWORKING_
28   -
29   - #import "AFNetworkActivityIndicatorManager.h"
30   -
31   - #import "UIActivityIndicatorView+AFNetworking.h"
32   - #import "UIAlertView+AFNetworking.h"
33   - #import "UIButton+AFNetworking.h"
34   - #import "UIImageView+AFNetworking.h"
35   - #import "UIProgressView+AFNetworking.h"
36   - #import "UIRefreshControl+AFNetworking.h"
37   - #import "UIWebView+AFNetworking.h"
38   -#endif /* _UIKIT_AFNETWORKING_ */
39   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/UIProgressView+AFNetworking.h deleted 100644 → 0
1   -// UIProgressView+AFNetworking.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import <Availability.h>
25   -
26   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
27   -
28   -#import <UIKit/UIKit.h>
29   -
30   -NS_ASSUME_NONNULL_BEGIN
31   -
32   -@class AFURLConnectionOperation;
33   -
34   -/**
35   - This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task or request operation.
36   - */
37   -@interface UIProgressView (AFNetworking)
38   -
39   -///------------------------------------
40   -/// @name Setting Session Task Progress
41   -///------------------------------------
42   -
43   -/**
44   - Binds the progress to the upload progress of the specified session task.
45   -
46   - @param task The session task.
47   - @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.
48   - */
49   -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
50   -- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task
51   - animated:(BOOL)animated;
52   -#endif
53   -
54   -/**
55   - Binds the progress to the download progress of the specified session task.
56   -
57   - @param task The session task.
58   - @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.
59   - */
60   -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
61   -- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task
62   - animated:(BOOL)animated;
63   -#endif
64   -
65   -///------------------------------------
66   -/// @name Setting Session Task Progress
67   -///------------------------------------
68   -
69   -/**
70   - Binds the progress to the upload progress of the specified request operation.
71   -
72   - @param operation The request operation.
73   - @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.
74   - */
75   -- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation
76   - animated:(BOOL)animated;
77   -
78   -/**
79   - Binds the progress to the download progress of the specified request operation.
80   -
81   - @param operation The request operation.
82   - @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.
83   - */
84   -- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation
85   - animated:(BOOL)animated;
86   -
87   -@end
88   -
89   -NS_ASSUME_NONNULL_END
90   -
91   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/UIRefreshControl+AFNetworking.h deleted 100644 → 0
1   -// UIRefreshControl+AFNetworking.m
2   -//
3   -// Copyright (c) 2014 AFNetworking (http://afnetworking.com)
4   -//
5   -// Permission is hereby granted, free of charge, to any person obtaining a copy
6   -// of this software and associated documentation files (the "Software"), to deal
7   -// in the Software without restriction, including without limitation the rights
8   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9   -// copies of the Software, and to permit persons to whom the Software is
10   -// furnished to do so, subject to the following conditions:
11   -//
12   -// The above copyright notice and this permission notice shall be included in
13   -// all copies or substantial portions of the Software.
14   -//
15   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21   -// THE SOFTWARE.
22   -
23   -#import <Foundation/Foundation.h>
24   -
25   -#import <Availability.h>
26   -
27   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
28   -
29   -#import <UIKit/UIKit.h>
30   -
31   -NS_ASSUME_NONNULL_BEGIN
32   -
33   -@class AFURLConnectionOperation;
34   -
35   -/**
36   - This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a request operation or session task.
37   - */
38   -@interface UIRefreshControl (AFNetworking)
39   -
40   -///-----------------------------------
41   -/// @name Refreshing for Session Tasks
42   -///-----------------------------------
43   -
44   -/**
45   - Binds the refreshing state to the state of the specified task.
46   -
47   - @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled.
48   - */
49   -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
50   -- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task;
51   -#endif
52   -
53   -///----------------------------------------
54   -/// @name Refreshing for Request Operations
55   -///----------------------------------------
56   -
57   -/**
58   - Binds the refreshing state to the execution state of the specified operation.
59   -
60   - @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled.
61   - */
62   -- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation;
63   -
64   -@end
65   -
66   -NS_ASSUME_NONNULL_END
67   -
68   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Headers/UIWebView+AFNetworking.h deleted 100644 → 0
1   -// UIWebView+AFNetworking.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import <Availability.h>
25   -
26   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
27   -
28   -#import <UIKit/UIKit.h>
29   -
30   -NS_ASSUME_NONNULL_BEGIN
31   -
32   -@class AFHTTPRequestSerializer, AFHTTPResponseSerializer;
33   -@protocol AFURLRequestSerialization, AFURLResponseSerialization;
34   -
35   -/**
36   - This category adds methods to the UIKit framework's `UIWebView` class. The methods in this category provide increased control over the request cycle, including progress monitoring and success / failure handling.
37   -
38   - @discussion When using these category methods, make sure to assign `delegate` for the web view, which implements `–webView:shouldStartLoadWithRequest:navigationType:` appropriately. This allows for tapped links to be loaded through AFNetworking, and can ensure that `canGoBack` & `canGoForward` update their values correctly.
39   - */
40   -@interface UIWebView (AFNetworking)
41   -
42   -/**
43   - The request serializer used to serialize requests made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPRequestSerializer`.
44   - */
45   -@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;
46   -
47   -/**
48   - The response serializer used to serialize responses made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPResponseSerializer`.
49   - */
50   -@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
51   -
52   -/**
53   - Asynchronously loads the specified request.
54   -
55   - @param request A URL request identifying the location of the content to load. This must not be `nil`.
56   - @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread.
57   - @param success A block object to be executed when the request finishes loading successfully. This block returns the HTML string to be loaded by the web view, and takes two arguments: the response, and the response string.
58   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred.
59   - */
60   -- (void)loadRequest:(NSURLRequest *)request
61   - progress:(nullable void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress
62   - success:(nullable NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success
63   - failure:(nullable void (^)(NSError *error))failure;
64   -
65   -/**
66   - Asynchronously loads the data associated with a particular request with a specified MIME type and text encoding.
67   -
68   - @param request A URL request identifying the location of the content to load. This must not be `nil`.
69   - @param MIMEType The MIME type of the content. Defaults to the content type of the response if not specified.
70   - @param textEncodingName The IANA encoding name, as in `utf-8` or `utf-16`. Defaults to the response text encoding if not specified.
71   - @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread.
72   - @param success A block object to be executed when the request finishes loading successfully. This block returns the data to be loaded by the web view and takes two arguments: the response, and the downloaded data.
73   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred.
74   - */
75   -- (void)loadRequest:(NSURLRequest *)request
76   - MIMEType:(nullable NSString *)MIMEType
77   - textEncodingName:(nullable NSString *)textEncodingName
78   - progress:(nullable void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress
79   - success:(nullable NSData * (^)(NSHTTPURLResponse *response, NSData *data))success
80   - failure:(nullable void (^)(NSError *error))failure;
81   -
82   -@end
83   -
84   -NS_ASSUME_NONNULL_END
85   -
86   -#endif
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Info.plist deleted 100644 → 0
No preview for this file type
Example/build/Debug-iphoneos/AFNetworking/AFNetworking.framework/Modules/module.modulemap deleted 100644 → 0
1   -framework module AFNetworking {
2   - umbrella header "AFNetworking-umbrella.h"
3   -
4   - export *
5   - module * { export * }
6   -}
Example/build/Debug-iphoneos/CNLiveDemo_LXG/CNLiveDemo_LXG.bundle/Assets.car 0 → 100644
No preview for this file type
Example/build/Debug-iphoneos/CNLiveDemo_LXG/CNLiveDemo_LXG.bundle/Info.plist 0 → 100644
No preview for this file type
Example/build/Debug-iphoneos/CNLiveDemo_LXG/CNLiveDemo_LXG.framework/CNLiveDemo_LXG deleted 100644 → 0
No preview for this file type
Example/build/Debug-iphoneos/CNLiveDemo_LXG/CNLiveDemo_LXG.framework/Headers/CNLiveDemo_LXG-umbrella.h deleted 100644 → 0
1   -#ifdef __OBJC__
2   -#import <UIKit/UIKit.h>
3   -#else
4   -#ifndef FOUNDATION_EXPORT
5   -#if defined(__cplusplus)
6   -#define FOUNDATION_EXPORT extern "C"
7   -#else
8   -#define FOUNDATION_EXPORT extern
9   -#endif
10   -#endif
11   -#endif
12   -
13   -#import "CNLiveTestController.h"
14   -
15   -FOUNDATION_EXPORT double CNLiveDemo_LXGVersionNumber;
16   -FOUNDATION_EXPORT const unsigned char CNLiveDemo_LXGVersionString[];
17   -
Example/build/Debug-iphoneos/CNLiveDemo_LXG/CNLiveDemo_LXG.framework/Headers/CNLiveTestController.h deleted 100644 → 0
1   -//
2   -// CNLiveTestController.h
3   -// CNLiveDemo_LXG_Example
4   -//
5   -// Created by 梁星国 on 2018/12/3.
6   -// Copyright © 2018年 jyyjkt. All rights reserved.
7   -//
8   -
9   -#import <UIKit/UIKit.h>
10   -
11   -NS_ASSUME_NONNULL_BEGIN
12   -
13   -@interface CNLiveTestController : UIViewController
14   -
15   -- (void)testLog;
16   -
17   -
18   -@end
19   -
20   -NS_ASSUME_NONNULL_END
Example/build/Debug-iphoneos/CNLiveDemo_LXG/CNLiveDemo_LXG.framework/Info.plist deleted 100644 → 0
No preview for this file type
Example/build/Debug-iphoneos/CNLiveDemo_LXG/CNLiveDemo_LXG.framework/Modules/module.modulemap deleted 100644 → 0
1   -framework module CNLiveDemo_LXG {
2   - umbrella header "CNLiveDemo_LXG-umbrella.h"
3   -
4   - export *
5   - module * { export * }
6   -}
Example/build/Debug-iphonesimulator/AFNetworking/AFNetworking.framework/AFNetworking deleted 100755 → 0
No preview for this file type
Example/build/Debug-iphonesimulator/AFNetworking/AFNetworking.framework/Headers/AFHTTPRequestOperation.h deleted 100644 → 0
1   -// AFHTTPRequestOperation.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -#import "AFURLConnectionOperation.h"
24   -
25   -NS_ASSUME_NONNULL_BEGIN
26   -
27   -/**
28   - `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` 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.
29   - */
30   -@interface AFHTTPRequestOperation : AFURLConnectionOperation
31   -
32   -///------------------------------------------------
33   -/// @name Getting HTTP URL Connection Information
34   -///------------------------------------------------
35   -
36   -/**
37   - The last HTTP response received by the operation's connection.
38   - */
39   -@property (readonly, nonatomic, strong, nullable) NSHTTPURLResponse *response;
40   -
41   -/**
42   - Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an AFHTTPResponse serializer, which uses the raw data as its response object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed.
43   -
44   - @warning `responseSerializer` must not be `nil`. Setting a response serializer will clear out any cached value
45   - */
46   -@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
47   -
48   -/**
49   - An object constructed by the `responseSerializer` from the response and response data. Returns `nil` unless the operation `isFinished`, has a `response`, and has `responseData` with non-zero content length. If an error occurs during serialization, `nil` will be returned, and the `error` property will be populated with the serialization error.
50   - */
51   -@property (readonly, nonatomic, strong, nullable) id responseObject;
52   -
53   -///-----------------------------------------------------------
54   -/// @name Setting Completion Block Success / Failure Callbacks
55   -///-----------------------------------------------------------
56   -
57   -/**
58   - Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed.
59   -
60   - This method should be overridden in subclasses in order to specify the response object passed into the success block.
61   -
62   - @param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request.
63   - @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request.
64   - */
65   -- (void)setCompletionBlockWithSuccess:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
66   - failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
67   -
68   -@end
69   -
70   -NS_ASSUME_NONNULL_END
Example/build/Debug-iphonesimulator/AFNetworking/AFNetworking.framework/Headers/AFHTTPRequestOperationManager.h deleted 100644 → 0
1   -// AFHTTPRequestOperationManager.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -#import <SystemConfiguration/SystemConfiguration.h>
24   -#import <Availability.h>
25   -
26   -#if __IPHONE_OS_VERSION_MIN_REQUIRED
27   -#import <MobileCoreServices/MobileCoreServices.h>
28   -#else
29   -#import <CoreServices/CoreServices.h>
30   -#endif
31   -
32   -#import "AFHTTPRequestOperation.h"
33   -#import "AFURLResponseSerialization.h"
34   -#import "AFURLRequestSerialization.h"
35   -#import "AFSecurityPolicy.h"
36   -#import "AFNetworkReachabilityManager.h"
37   -
38   -#ifndef NS_DESIGNATED_INITIALIZER
39   -#if __has_attribute(objc_designated_initializer)
40   -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
41   -#else
42   -#define NS_DESIGNATED_INITIALIZER
43   -#endif
44   -#endif
45   -
46   -NS_ASSUME_NONNULL_BEGIN
47   -
48   -/**
49   - `AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management.
50   -
51   - ## Subclassing Notes
52   -
53   - Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application.
54   -
55   - For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect.
56   -
57   - ## Methods to Override
58   -
59   - To change the behavior of all request operation construction for an `AFHTTPRequestOperationManager` subclass, override `HTTPRequestOperationWithRequest:success:failure`.
60   -
61   - ## Serialization
62   -
63   - Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to `<AFURLRequestSerialization>`.
64   -
65   - Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`
66   -
67   - ## URL Construction Using Relative Paths
68   -
69   - For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`.
70   -
71   - Below are a few examples of how `baseURL` and relative paths interact:
72   -
73   - NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"];
74   - [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo
75   - [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz
76   - [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo
77   - [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo
78   - [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/
79   - [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/
80   -
81   - Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash.
82   -
83   - ## Network Reachability Monitoring
84   -
85   - Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details.
86   -
87   - ## NSSecureCoding & NSCopying Caveats
88   -
89   - `AFHTTPRequestOperationManager` conforms to the `NSSecureCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. There are a few minor caveats to keep in mind, however:
90   -
91   - - Archives and copies of HTTP clients will be initialized with an empty operation queue.
92   - - NSSecureCoding cannot serialize / deserialize block properties, so an archive of an HTTP client will not include any reachability callback block that may be set.
93   - */
94   -@interface AFHTTPRequestOperationManager : NSObject <NSSecureCoding, NSCopying>
95   -
96   -/**
97   - The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.
98   - */
99   -@property (readonly, nonatomic, strong, nullable) NSURL *baseURL;
100   -
101   -/**
102   - Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.
103   -
104   - @warning `requestSerializer` must not be `nil`.
105   - */
106   -@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;
107   -
108   -/**
109   - Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to a JSON serializer, which serializes data from responses with a `application/json` MIME type, and falls back to the raw data object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed.
110   -
111   - @warning `responseSerializer` must not be `nil`.
112   - */
113   -@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
114   -
115   -/**
116   - The operation queue on which request operations are scheduled and run.
117   - */
118   -@property (nonatomic, strong) NSOperationQueue *operationQueue;
119   -
120   -///-------------------------------
121   -/// @name Managing URL Credentials
122   -///-------------------------------
123   -
124   -/**
125   - Whether request operations should consult the credential storage for authenticating the connection. `YES` by default.
126   -
127   - @see AFURLConnectionOperation -shouldUseCredentialStorage
128   - */
129   -@property (nonatomic, assign) BOOL shouldUseCredentialStorage;
130   -
131   -/**
132   - The credential used by request operations for authentication challenges.
133   -
134   - @see AFURLConnectionOperation -credential
135   - */
136   -@property (nonatomic, strong, nullable) NSURLCredential *credential;
137   -
138   -///-------------------------------
139   -/// @name Managing Security Policy
140   -///-------------------------------
141   -
142   -/**
143   - The security policy used by created request operations to evaluate server trust for secure connections. `AFHTTPRequestOperationManager` uses the `defaultPolicy` unless otherwise specified.
144   - */
145   -@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
146   -
147   -///------------------------------------
148   -/// @name Managing Network Reachability
149   -///------------------------------------
150   -
151   -/**
152   - The network reachability manager. `AFHTTPRequestOperationManager` uses the `sharedManager` by default.
153   - */
154   -@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;
155   -
156   -///-------------------------------
157   -/// @name Managing Callback Queues
158   -///-------------------------------
159   -
160   -/**
161   - The dispatch queue for the `completionBlock` of request operations. If `NULL` (default), the main queue is used.
162   - */
163   -#if OS_OBJECT_USE_OBJC
164   -@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
165   -#else
166   -@property (nonatomic, assign, nullable) dispatch_queue_t completionQueue;
167   -#endif
168   -
169   -/**
170   - The dispatch group for the `completionBlock` of request operations. If `NULL` (default), a private dispatch group is used.
171   - */
172   -#if OS_OBJECT_USE_OBJC
173   -@property (nonatomic, strong, nullable) dispatch_group_t completionGroup;
174   -#else
175   -@property (nonatomic, assign, nullable) dispatch_group_t completionGroup;
176   -#endif
177   -
178   -///---------------------------------------------
179   -/// @name Creating and Initializing HTTP Clients
180   -///---------------------------------------------
181   -
182   -/**
183   - Creates and returns an `AFHTTPRequestOperationManager` object.
184   - */
185   -+ (instancetype)manager;
186   -
187   -/**
188   - Initializes an `AFHTTPRequestOperationManager` object with the specified base URL.
189   -
190   - This is the designated initializer.
191   -
192   - @param url The base URL for the HTTP client.
193   -
194   - @return The newly-initialized HTTP client
195   - */
196   -- (instancetype)initWithBaseURL:(nullable NSURL *)url NS_DESIGNATED_INITIALIZER;
197   -
198   -///---------------------------------------
199   -/// @name Managing HTTP Request Operations
200   -///---------------------------------------
201   -
202   -/**
203   - Creates an `AFHTTPRequestOperation`, and sets the response serializers to that of the HTTP client.
204   -
205   - @param request The request object to be loaded asynchronously during execution of the operation.
206   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request.
207   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred.
208   - */
209   -- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request
210   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
211   - failure:(nullable void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
212   -
213   -///---------------------------
214   -/// @name Making HTTP Requests
215   -///---------------------------
216   -
217   -/**
218   - Creates and runs an `AFHTTPRequestOperation` with a `GET` request.
219   -
220   - @param URLString The URL string used to create the request URL.
221   - @param parameters The parameters to be encoded according to the client request serializer.
222   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
223   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
224   -
225   - @see -HTTPRequestOperationWithRequest:success:failure:
226   - */
227   -- (nullable AFHTTPRequestOperation *)GET:(NSString *)URLString
228   - parameters:(nullable id)parameters
229   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
230   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
231   -
232   -/**
233   - Creates and runs an `AFHTTPRequestOperation` with a `HEAD` request.
234   -
235   - @param URLString The URL string used to create the request URL.
236   - @param parameters The parameters to be encoded according to the client request serializer.
237   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes a single arguments: the request operation.
238   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
239   -
240   - @see -HTTPRequestOperationWithRequest:success:failure:
241   - */
242   -- (nullable AFHTTPRequestOperation *)HEAD:(NSString *)URLString
243   - parameters:(nullable id)parameters
244   - success:(nullable void (^)(AFHTTPRequestOperation *operation))success
245   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
246   -
247   -/**
248   - Creates and runs an `AFHTTPRequestOperation` with a `POST` request.
249   -
250   - @param URLString The URL string used to create the request URL.
251   - @param parameters The parameters to be encoded according to the client request serializer.
252   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
253   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
254   -
255   - @see -HTTPRequestOperationWithRequest:success:failure:
256   - */
257   -- (nullable AFHTTPRequestOperation *)POST:(NSString *)URLString
258   - parameters:(nullable id)parameters
259   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
260   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
261   -
262   -/**
263   - Creates and runs an `AFHTTPRequestOperation` with a multipart `POST` request.
264   -
265   - @param URLString The URL string used to create the request URL.
266   - @param parameters The parameters to be encoded according to the client request serializer.
267   - @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
268   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
269   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
270   -
271   - @see -HTTPRequestOperationWithRequest:success:failure:
272   - */
273   -- (nullable AFHTTPRequestOperation *)POST:(NSString *)URLString
274   - parameters:(nullable id)parameters
275   - constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
276   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
277   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
278   -
279   -/**
280   - Creates and runs an `AFHTTPRequestOperation` with a `PUT` request.
281   -
282   - @param URLString The URL string used to create the request URL.
283   - @param parameters The parameters to be encoded according to the client request serializer.
284   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
285   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
286   -
287   - @see -HTTPRequestOperationWithRequest:success:failure:
288   - */
289   -- (nullable AFHTTPRequestOperation *)PUT:(NSString *)URLString
290   - parameters:(nullable id)parameters
291   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
292   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
293   -
294   -/**
295   - Creates and runs an `AFHTTPRequestOperation` with a `PATCH` request.
296   -
297   - @param URLString The URL string used to create the request URL.
298   - @param parameters The parameters to be encoded according to the client request serializer.
299   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
300   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
301   -
302   - @see -HTTPRequestOperationWithRequest:success:failure:
303   - */
304   -- (nullable AFHTTPRequestOperation *)PATCH:(NSString *)URLString
305   - parameters:(nullable id)parameters
306   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
307   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
308   -
309   -/**
310   - Creates and runs an `AFHTTPRequestOperation` with a `DELETE` request.
311   -
312   - @param URLString The URL string used to create the request URL.
313   - @param parameters The parameters to be encoded according to the client request serializer.
314   - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.
315   - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.
316   -
317   - @see -HTTPRequestOperationWithRequest:success:failure:
318   - */
319   -- (nullable AFHTTPRequestOperation *)DELETE:(NSString *)URLString
320   - parameters:(nullable id)parameters
321   - success:(nullable void (^)(AFHTTPRequestOperation *operation, id responseObject))success
322   - failure:(nullable void (^)(AFHTTPRequestOperation * __nullable operation, NSError *error))failure;
323   -
324   -@end
325   -
326   -NS_ASSUME_NONNULL_END
Example/build/Debug-iphonesimulator/AFNetworking/AFNetworking.framework/Headers/AFHTTPSessionManager.h deleted 100644 → 0
1   -// AFHTTPSessionManager.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -#if !TARGET_OS_WATCH
24   -#import <SystemConfiguration/SystemConfiguration.h>
25   -#endif
26   -#import <Availability.h>
27   -
28   -#if __IPHONE_OS_VERSION_MIN_REQUIRED
29   -#import <MobileCoreServices/MobileCoreServices.h>
30   -#else
31   -#import <CoreServices/CoreServices.h>
32   -#endif
33   -
34   -#import "AFURLSessionManager.h"
35   -
36   -#ifndef NS_DESIGNATED_INITIALIZER
37   -#if __has_attribute(objc_designated_initializer)
38   -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
39   -#else
40   -#define NS_DESIGNATED_INITIALIZER
41   -#endif
42   -#endif
43   -
44   -/**
45   - `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths.
46   -
47   - ## Subclassing Notes
48   -
49   - Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application.
50   -
51   - For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect.
52   -
53   - ## Methods to Override
54   -
55   - To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:completionHandler:`.
56   -
57   - ## Serialization
58   -
59   - Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to `<AFURLRequestSerialization>`.
60   -
61   - Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`
62   -
63   - ## URL Construction Using Relative Paths
64   -
65   - For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`.
66   -
67   - Below are a few examples of how `baseURL` and relative paths interact:
68   -
69   - NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"];
70   - [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo
71   - [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz
72   - [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo
73   - [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo
74   - [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/
75   - [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/
76   -
77   - Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash.
78   -
79   - @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.
80   - */
81   -
82   -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || TARGET_OS_WATCH
83   -
84   -NS_ASSUME_NONNULL_BEGIN
85   -
86   -@interface AFHTTPSessionManager : AFURLSessionManager <NSSecureCoding, NSCopying>
87   -
88   -/**
89   - The URL used to construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.
90   - */
91   -@property (readonly, nonatomic, strong, nullable) NSURL *baseURL;
92   -
93   -/**
94   - Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.
95   -
96   - @warning `requestSerializer` must not be `nil`.
97   - */
98   -@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;
99   -
100   -/**
101   - Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`.
102   -
103   - @warning `responseSerializer` must not be `nil`.
104   - */
105   -@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
106   -
107   -///---------------------
108   -/// @name Initialization
109   -///---------------------
110   -
111   -/**
112   - Creates and returns an `AFHTTPSessionManager` object.
113   - */
114   -+ (instancetype)manager;
115   -
116   -/**
117   - Initializes an `AFHTTPSessionManager` object with the specified base URL.
118   -
119   - @param url The base URL for the HTTP client.
120   -
121   - @return The newly-initialized HTTP client
122   - */
123   -- (instancetype)initWithBaseURL:(nullable NSURL *)url;
124   -
125   -/**
126   - Initializes an `AFHTTPSessionManager` object with the specified base URL.
127   -
128   - This is the designated initializer.
129   -
130   - @param url The base URL for the HTTP client.
131   - @param configuration The configuration used to create the managed session.
132   -
133   - @return The newly-initialized HTTP client
134   - */
135   -- (instancetype)initWithBaseURL:(nullable NSURL *)url
136   - sessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
137   -
138   -///---------------------------
139   -/// @name Making HTTP Requests
140   -///---------------------------
141   -
142   -/**
143   - Creates and runs an `NSURLSessionDataTask` with a `GET` request.
144   -
145   - @param URLString The URL string used to create the request URL.
146   - @param parameters The parameters to be encoded according to the client request serializer.
147   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
148   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
149   -
150   - @see -dataTaskWithRequest:completionHandler:
151   - */
152   -- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
153   - parameters:(nullable id)parameters
154   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
155   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
156   -
157   -/**
158   - Creates and runs an `NSURLSessionDataTask` with a `HEAD` request.
159   -
160   - @param URLString The URL string used to create the request URL.
161   - @param parameters The parameters to be encoded according to the client request serializer.
162   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task.
163   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
164   -
165   - @see -dataTaskWithRequest:completionHandler:
166   - */
167   -- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString
168   - parameters:(nullable id)parameters
169   - success:(nullable void (^)(NSURLSessionDataTask *task))success
170   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
171   -
172   -/**
173   - Creates and runs an `NSURLSessionDataTask` with a `POST` request.
174   -
175   - @param URLString The URL string used to create the request URL.
176   - @param parameters The parameters to be encoded according to the client request serializer.
177   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
178   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
179   -
180   - @see -dataTaskWithRequest:completionHandler:
181   - */
182   -- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
183   - parameters:(nullable id)parameters
184   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
185   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
186   -
187   -/**
188   - Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request.
189   -
190   - @param URLString The URL string used to create the request URL.
191   - @param parameters The parameters to be encoded according to the client request serializer.
192   - @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
193   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
194   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
195   -
196   - @see -dataTaskWithRequest:completionHandler:
197   - */
198   -- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
199   - parameters:(nullable id)parameters
200   - constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
201   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
202   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
203   -
204   -/**
205   - Creates and runs an `NSURLSessionDataTask` with a `PUT` request.
206   -
207   - @param URLString The URL string used to create the request URL.
208   - @param parameters The parameters to be encoded according to the client request serializer.
209   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
210   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
211   -
212   - @see -dataTaskWithRequest:completionHandler:
213   - */
214   -- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString
215   - parameters:(nullable id)parameters
216   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
217   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
218   -
219   -/**
220   - Creates and runs an `NSURLSessionDataTask` with a `PATCH` request.
221   -
222   - @param URLString The URL string used to create the request URL.
223   - @param parameters The parameters to be encoded according to the client request serializer.
224   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
225   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
226   -
227   - @see -dataTaskWithRequest:completionHandler:
228   - */
229   -- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString
230   - parameters:(nullable id)parameters
231   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
232   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
233   -
234   -/**
235   - Creates and runs an `NSURLSessionDataTask` with a `DELETE` request.
236   -
237   - @param URLString The URL string used to create the request URL.
238   - @param parameters The parameters to be encoded according to the client request serializer.
239   - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
240   - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
241   -
242   - @see -dataTaskWithRequest:completionHandler:
243   - */
244   -- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString
245   - parameters:(nullable id)parameters
246   - success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success
247   - failure:(nullable void (^)(NSURLSessionDataTask * __nullable task, NSError *error))failure;
248   -
249   -@end
250   -
251   -NS_ASSUME_NONNULL_END
252   -
253   -#endif
Example/build/Debug-iphonesimulator/AFNetworking/AFNetworking.framework/Headers/AFNetworkActivityIndicatorManager.h deleted 100644 → 0
1   -// AFNetworkActivityIndicatorManager.h
2   -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3   -//
4   -// Permission is hereby granted, free of charge, to any person obtaining a copy
5   -// of this software and associated documentation files (the "Software"), to deal
6   -// in the Software without restriction, including without limitation the rights
7   -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8   -// copies of the Software, and to permit persons to whom the Software is
9   -// furnished to do so, subject to the following conditions:
10   -//
11   -// The above copyright notice and this permission notice shall be included in
12   -// all copies or substantial portions of the Software.
13   -//
14   -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20   -// THE SOFTWARE.
21   -
22   -#import <Foundation/Foundation.h>
23   -
24   -#import <Availability.h>
25   -
26   -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
27   -
28   -#import <UIKit/UIKit.h>
29   -
30   -NS_ASSUME_NONNULL_BEGIN
31   -
32   -/**
33   - `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero.
34   -
35   - You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code:
36   -
37   - [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];
38   -
39   - By setting `enabled` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself.
40   -
41   - See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information:
42   - http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44
43   - */
44   -NS_EXTENSION_UNAVAILABLE_IOS("Use view controller based solutions where appropriate instead.")
45   -@interface AFNetworkActivityIndicatorManager : NSObject
46   -
47   -/**
48   - A Boolean value indicating whether the manager is enabled.
49   -
50   - If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO.
51   - */
52   -@property (nonatomic, assign, getter = isEnabled) BOOL enabled;
53   -
54   -/**
55   - A Boolean value indicating whether the network activity indicator is currently displayed in the status bar.
56   - */
57   -@property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible;
58   -
59   -/**
60   - Returns the shared network activity indicator manager object for the system.
61   -
62   - @return The systemwide network activity indicator manager.
63   - */
64   -+ (instancetype)sharedManager;
65   -
66   -/**
67   - Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator.
68   - */
69   -- (void)incrementActivityCount;
70   -
71   -/**
72   - Decrements the number of active network requests. If this number becomes zero after decrementing, this will stop animating the status bar network activity indicator.
73   - */
74   -- (void)decrementActivityCount;
75   -
76   -@end
77   -
78   -NS_ASSUME_NONNULL_END
79   -
80   -#endif