pod-builder 1.9.3 → 2.0.0.beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +9 -0
  3. data/README.md +50 -13
  4. data/exe/pod_builder +39 -28
  5. data/lib/pod_builder/analyze.rb +32 -7
  6. data/lib/pod_builder/analyzer.rb +16 -0
  7. data/lib/pod_builder/command/build.rb +44 -161
  8. data/lib/pod_builder/command/build_all.rb +2 -2
  9. data/lib/pod_builder/command/clean.rb +34 -55
  10. data/lib/pod_builder/command/clear_lldbinit.rb +7 -3
  11. data/lib/pod_builder/command/deintegrate.rb +29 -7
  12. data/lib/pod_builder/command/generate_lfs.rb +3 -3
  13. data/lib/pod_builder/command/generate_podspec.rb +3 -2
  14. data/lib/pod_builder/command/info.rb +1 -1
  15. data/lib/pod_builder/command/init.rb +37 -14
  16. data/lib/pod_builder/command/install_sources.rb +21 -14
  17. data/lib/pod_builder/command/none.rb +2 -2
  18. data/lib/pod_builder/command/restore_all.rb +4 -4
  19. data/lib/pod_builder/command/switch.rb +137 -95
  20. data/lib/pod_builder/command/sync_podfile.rb +5 -3
  21. data/lib/pod_builder/command/update.rb +5 -6
  22. data/lib/pod_builder/command/update_lldbinit.rb +11 -9
  23. data/lib/pod_builder/configuration.rb +88 -13
  24. data/lib/pod_builder/core.rb +93 -12
  25. data/lib/pod_builder/info.rb +32 -98
  26. data/lib/pod_builder/install.rb +255 -195
  27. data/lib/pod_builder/licenses.rb +4 -4
  28. data/lib/pod_builder/podfile.rb +283 -73
  29. data/lib/pod_builder/podfile/post_actions.rb +9 -15
  30. data/lib/pod_builder/podfile_cp.rb +93 -0
  31. data/lib/pod_builder/podfile_item.rb +181 -82
  32. data/lib/pod_builder/podspec.rb +144 -135
  33. data/lib/pod_builder/rome/post_install.rb +240 -0
  34. data/lib/pod_builder/rome/pre_install.rb +6 -0
  35. data/lib/pod_builder/templates/build_podfile.template +3 -3
  36. data/lib/pod_builder/version.rb +1 -1
  37. data/pod-builder.gemspec +6 -6
  38. metadata +27 -80
  39. data/Example/Frameworks/PodBuilder.json +0 -32
  40. data/Example/PodBuilderExample.xcodeproj/project.pbxproj +0 -416
  41. data/Example/PodBuilderExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  42. data/Example/PodBuilderExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  43. data/Example/PodBuilderExample.xcodeproj/project.xcworkspace/xcuserdata/tomas.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  44. data/Example/PodBuilderExample.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  45. data/Example/PodBuilderExample.xcworkspace/contents.xcworkspacedata +0 -10
  46. data/Example/PodBuilderExample/AppDelegate.swift +0 -47
  47. data/Example/PodBuilderExample/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -98
  48. data/Example/PodBuilderExample/Assets.xcassets/Contents.json +0 -6
  49. data/Example/PodBuilderExample/Base.lproj/LaunchScreen.storyboard +0 -25
  50. data/Example/PodBuilderExample/Base.lproj/Main.storyboard +0 -24
  51. data/Example/PodBuilderExample/Info.plist +0 -45
  52. data/Example/PodBuilderExample/ViewController.swift +0 -25
  53. data/Example/Podfile +0 -8
  54. data/Example/Podfile.lock +0 -16
  55. data/Example/Pods/Alamofire/LICENSE +0 -19
  56. data/Example/Pods/Alamofire/README.md +0 -242
  57. data/Example/Pods/Alamofire/Source/AFError.swift +0 -460
  58. data/Example/Pods/Alamofire/Source/Alamofire.swift +0 -465
  59. data/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +0 -37
  60. data/Example/Pods/Alamofire/Source/MultipartFormData.swift +0 -580
  61. data/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift +0 -233
  62. data/Example/Pods/Alamofire/Source/Notifications.swift +0 -55
  63. data/Example/Pods/Alamofire/Source/ParameterEncoding.swift +0 -483
  64. data/Example/Pods/Alamofire/Source/Request.swift +0 -654
  65. data/Example/Pods/Alamofire/Source/Response.swift +0 -567
  66. data/Example/Pods/Alamofire/Source/ResponseSerialization.swift +0 -715
  67. data/Example/Pods/Alamofire/Source/Result.swift +0 -300
  68. data/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift +0 -307
  69. data/Example/Pods/Alamofire/Source/SessionDelegate.swift +0 -725
  70. data/Example/Pods/Alamofire/Source/SessionManager.swift +0 -896
  71. data/Example/Pods/Alamofire/Source/TaskDelegate.swift +0 -466
  72. data/Example/Pods/Alamofire/Source/Timeline.swift +0 -136
  73. data/Example/Pods/Alamofire/Source/Validation.swift +0 -315
  74. data/Example/Pods/Manifest.lock +0 -16
  75. data/Example/Pods/Pods.xcodeproj/project.pbxproj +0 -673
  76. data/Example/Pods/Pods.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/Alamofire.xcscheme +0 -60
  77. data/Example/Pods/Pods.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/Pods-PodBuilderExample.xcscheme +0 -60
  78. data/Example/Pods/Pods.xcodeproj/xcuserdata/tomas.xcuserdatad/xcschemes/xcschememanagement.plist +0 -21
  79. data/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +0 -5
  80. data/Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +0 -12
  81. data/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +0 -16
  82. data/Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap +0 -6
  83. data/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +0 -9
  84. data/Example/Pods/Target Support Files/Alamofire/Info.plist +0 -26
  85. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Info.plist +0 -26
  86. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-acknowledgements.markdown +0 -26
  87. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-acknowledgements.plist +0 -58
  88. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-dummy.m +0 -5
  89. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-frameworks.sh +0 -153
  90. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-resources.sh +0 -118
  91. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample-umbrella.h +0 -16
  92. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.debug.xcconfig +0 -11
  93. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.modulemap +0 -6
  94. data/Example/Pods/Target Support Files/Pods-PodBuilderExample/Pods-PodBuilderExample.release.xcconfig +0 -11
  95. data/lib/pod_builder/cocoapods/specification.rb +0 -27
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "self:PodBuilderExample.xcodeproj">
6
- </FileRef>
7
- </Workspace>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>PodBuilderExample.xcscheme</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>
@@ -1,10 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "group:PodBuilderExample.xcodeproj">
6
- </FileRef>
7
- <FileRef
8
- location = "group:Pods/Pods.xcodeproj">
9
- </FileRef>
10
- </Workspace>
@@ -1,47 +0,0 @@
1
- //
2
- // AppDelegate.swift
3
- // PodBuilderExample
4
- //
5
- // Created by Tomas Camin on 24/08/2018.
6
- // Copyright © 2018 Subito. All rights reserved.
7
- //
8
-
9
- import UIKit
10
- import Alamofire
11
-
12
- @UIApplicationMain
13
- class AppDelegate: UIResponder, UIApplicationDelegate {
14
-
15
- var window: UIWindow?
16
-
17
-
18
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
19
- // Override point for customization after application launch.
20
- return true
21
- }
22
-
23
- func applicationWillResignActive(_ application: UIApplication) {
24
- // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25
- // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
26
- }
27
-
28
- func applicationDidEnterBackground(_ application: UIApplication) {
29
- // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30
- // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31
- }
32
-
33
- func applicationWillEnterForeground(_ application: UIApplication) {
34
- // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
35
- }
36
-
37
- func applicationDidBecomeActive(_ application: UIApplication) {
38
- // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39
- }
40
-
41
- func applicationWillTerminate(_ application: UIApplication) {
42
- // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43
- }
44
-
45
-
46
- }
47
-
@@ -1,98 +0,0 @@
1
- {
2
- "images" : [
3
- {
4
- "idiom" : "iphone",
5
- "size" : "20x20",
6
- "scale" : "2x"
7
- },
8
- {
9
- "idiom" : "iphone",
10
- "size" : "20x20",
11
- "scale" : "3x"
12
- },
13
- {
14
- "idiom" : "iphone",
15
- "size" : "29x29",
16
- "scale" : "2x"
17
- },
18
- {
19
- "idiom" : "iphone",
20
- "size" : "29x29",
21
- "scale" : "3x"
22
- },
23
- {
24
- "idiom" : "iphone",
25
- "size" : "40x40",
26
- "scale" : "2x"
27
- },
28
- {
29
- "idiom" : "iphone",
30
- "size" : "40x40",
31
- "scale" : "3x"
32
- },
33
- {
34
- "idiom" : "iphone",
35
- "size" : "60x60",
36
- "scale" : "2x"
37
- },
38
- {
39
- "idiom" : "iphone",
40
- "size" : "60x60",
41
- "scale" : "3x"
42
- },
43
- {
44
- "idiom" : "ipad",
45
- "size" : "20x20",
46
- "scale" : "1x"
47
- },
48
- {
49
- "idiom" : "ipad",
50
- "size" : "20x20",
51
- "scale" : "2x"
52
- },
53
- {
54
- "idiom" : "ipad",
55
- "size" : "29x29",
56
- "scale" : "1x"
57
- },
58
- {
59
- "idiom" : "ipad",
60
- "size" : "29x29",
61
- "scale" : "2x"
62
- },
63
- {
64
- "idiom" : "ipad",
65
- "size" : "40x40",
66
- "scale" : "1x"
67
- },
68
- {
69
- "idiom" : "ipad",
70
- "size" : "40x40",
71
- "scale" : "2x"
72
- },
73
- {
74
- "idiom" : "ipad",
75
- "size" : "76x76",
76
- "scale" : "1x"
77
- },
78
- {
79
- "idiom" : "ipad",
80
- "size" : "76x76",
81
- "scale" : "2x"
82
- },
83
- {
84
- "idiom" : "ipad",
85
- "size" : "83.5x83.5",
86
- "scale" : "2x"
87
- },
88
- {
89
- "idiom" : "ios-marketing",
90
- "size" : "1024x1024",
91
- "scale" : "1x"
92
- }
93
- ],
94
- "info" : {
95
- "version" : 1,
96
- "author" : "xcode"
97
- }
98
- }
@@ -1,6 +0,0 @@
1
- {
2
- "info" : {
3
- "version" : 1,
4
- "author" : "xcode"
5
- }
6
- }
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3
- <dependencies>
4
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5
- <capability name="Safe area layout guides" minToolsVersion="9.0"/>
6
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7
- </dependencies>
8
- <scenes>
9
- <!--View Controller-->
10
- <scene sceneID="EHf-IW-A2E">
11
- <objects>
12
- <viewController id="01J-lp-oVM" sceneMemberID="viewController">
13
- <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14
- <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
17
- <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
18
- </view>
19
- </viewController>
20
- <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
21
- </objects>
22
- <point key="canvasLocation" x="53" y="375"/>
23
- </scene>
24
- </scenes>
25
- </document>
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3
- <dependencies>
4
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5
- <capability name="Safe area layout guides" minToolsVersion="9.0"/>
6
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7
- </dependencies>
8
- <scenes>
9
- <!--View Controller-->
10
- <scene sceneID="tne-QT-ifu">
11
- <objects>
12
- <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
13
- <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
14
- <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
17
- <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
18
- </view>
19
- </viewController>
20
- <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
21
- </objects>
22
- </scene>
23
- </scenes>
24
- </document>
@@ -1,45 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>CFBundleDevelopmentRegion</key>
6
- <string>$(DEVELOPMENT_LANGUAGE)</string>
7
- <key>CFBundleExecutable</key>
8
- <string>$(EXECUTABLE_NAME)</string>
9
- <key>CFBundleIdentifier</key>
10
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
- <key>CFBundleInfoDictionaryVersion</key>
12
- <string>6.0</string>
13
- <key>CFBundleName</key>
14
- <string>$(PRODUCT_NAME)</string>
15
- <key>CFBundlePackageType</key>
16
- <string>APPL</string>
17
- <key>CFBundleShortVersionString</key>
18
- <string>1.0</string>
19
- <key>CFBundleVersion</key>
20
- <string>1</string>
21
- <key>LSRequiresIPhoneOS</key>
22
- <true/>
23
- <key>UILaunchStoryboardName</key>
24
- <string>LaunchScreen</string>
25
- <key>UIMainStoryboardFile</key>
26
- <string>Main</string>
27
- <key>UIRequiredDeviceCapabilities</key>
28
- <array>
29
- <string>armv7</string>
30
- </array>
31
- <key>UISupportedInterfaceOrientations</key>
32
- <array>
33
- <string>UIInterfaceOrientationPortrait</string>
34
- <string>UIInterfaceOrientationLandscapeLeft</string>
35
- <string>UIInterfaceOrientationLandscapeRight</string>
36
- </array>
37
- <key>UISupportedInterfaceOrientations~ipad</key>
38
- <array>
39
- <string>UIInterfaceOrientationPortrait</string>
40
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
41
- <string>UIInterfaceOrientationLandscapeLeft</string>
42
- <string>UIInterfaceOrientationLandscapeRight</string>
43
- </array>
44
- </dict>
45
- </plist>
@@ -1,25 +0,0 @@
1
- //
2
- // ViewController.swift
3
- // PodBuilderExample
4
- //
5
- // Created by Tomas Camin on 24/08/2018.
6
- // Copyright © 2018 Subito. All rights reserved.
7
- //
8
-
9
- import UIKit
10
-
11
- class ViewController: UIViewController {
12
-
13
- override func viewDidLoad() {
14
- super.viewDidLoad()
15
- // Do any additional setup after loading the view, typically from a nib.
16
- }
17
-
18
- override func didReceiveMemoryWarning() {
19
- super.didReceiveMemoryWarning()
20
- // Dispose of any resources that can be recreated.
21
- }
22
-
23
-
24
- }
25
-
@@ -1,8 +0,0 @@
1
- platform :ios, '9.0'
2
-
3
- target 'PodBuilderExample' do
4
- use_frameworks!
5
-
6
- # Pods for PodBuilderExample
7
- pod 'Alamofire'
8
- end
@@ -1,16 +0,0 @@
1
- PODS:
2
- - Alamofire (4.7.3)
3
-
4
- DEPENDENCIES:
5
- - Alamofire
6
-
7
- SPEC REPOS:
8
- https://github.com/cocoapods/specs.git:
9
- - Alamofire
10
-
11
- SPEC CHECKSUMS:
12
- Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
13
-
14
- PODFILE CHECKSUM: 2cbdf553ccaeb62b036a9d32d2b03c3437ec4c82
15
-
16
- COCOAPODS: 1.5.3
@@ -1,19 +0,0 @@
1
- Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
@@ -1,242 +0,0 @@
1
- ![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/master/alamofire.png)
2
-
3
- [![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg?branch=master)](https://travis-ci.org/Alamofire/Alamofire)
4
- [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg)
5
- [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
6
- [![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](https://alamofire.github.io/Alamofire)
7
- [![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](https://twitter.com/AlamofireSF)
8
- [![Gitter](https://badges.gitter.im/Alamofire/Alamofire.svg)](https://gitter.im/Alamofire/Alamofire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
9
-
10
- Alamofire is an HTTP networking library written in Swift.
11
-
12
- - [Features](#features)
13
- - [Component Libraries](#component-libraries)
14
- - [Requirements](#requirements)
15
- - [Migration Guides](#migration-guides)
16
- - [Communication](#communication)
17
- - [Installation](#installation)
18
- - [Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md)
19
- - **Intro -** [Making a Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#making-a-request), [Response Handling](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-handling), [Response Validation](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-validation), [Response Caching](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-caching)
20
- - **HTTP -** [HTTP Methods](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-methods), [Parameter Encoding](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#parameter-encoding), [HTTP Headers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-headers), [Authentication](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#authentication)
21
- - **Large Data -** [Downloading Data to a File](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#downloading-data-to-a-file), [Uploading Data to a Server](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#uploading-data-to-a-server)
22
- - **Tools -** [Statistical Metrics](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#statistical-metrics), [cURL Command Output](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#curl-command-output)
23
- - [Advanced Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md)
24
- - **URL Session -** [Session Manager](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-manager), [Session Delegate](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-delegate), [Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#request)
25
- - **Routing -** [Routing Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#routing-requests), [Adapting and Retrying Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#adapting-and-retrying-requests)
26
- - **Model Objects -** [Custom Response Serialization](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#custom-response-serialization)
27
- - **Connection -** [Security](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#security), [Network Reachability](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#network-reachability)
28
- - [Open Radars](#open-radars)
29
- - [FAQ](#faq)
30
- - [Credits](#credits)
31
- - [Donations](#donations)
32
- - [License](#license)
33
-
34
- ## Features
35
-
36
- - [x] Chainable Request / Response Methods
37
- - [x] URL / JSON / plist Parameter Encoding
38
- - [x] Upload File / Data / Stream / MultipartFormData
39
- - [x] Download File using Request or Resume Data
40
- - [x] Authentication with URLCredential
41
- - [x] HTTP Response Validation
42
- - [x] Upload and Download Progress Closures with Progress
43
- - [x] cURL Command Output
44
- - [x] Dynamically Adapt and Retry Requests
45
- - [x] TLS Certificate and Public Key Pinning
46
- - [x] Network Reachability
47
- - [x] Comprehensive Unit and Integration Test Coverage
48
- - [x] [Complete Documentation](https://alamofire.github.io/Alamofire)
49
-
50
- ## Component Libraries
51
-
52
- In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem.
53
-
54
- - [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system.
55
- - [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `URLSession` instances not managed by Alamofire.
56
-
57
- ## Requirements
58
-
59
- - iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
60
- - Xcode 8.3+
61
- - Swift 3.1+
62
-
63
- ## Migration Guides
64
-
65
- - [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md)
66
- - [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md)
67
- - [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md)
68
-
69
- ## Communication
70
-
71
- - If you **need help**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire). (Tag 'alamofire')
72
- - If you'd like to **ask a general question**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire).
73
- - If you **found a bug**, open an issue.
74
- - If you **have a feature request**, open an issue.
75
- - If you **want to contribute**, submit a pull request.
76
-
77
- ## Installation
78
-
79
- ### CocoaPods
80
-
81
- [CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
82
-
83
- ```bash
84
- $ gem install cocoapods
85
- ```
86
-
87
- > CocoaPods 1.1+ is required to build Alamofire 4.0+.
88
-
89
- To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`:
90
-
91
- ```ruby
92
- source 'https://github.com/CocoaPods/Specs.git'
93
- platform :ios, '10.0'
94
- use_frameworks!
95
-
96
- target '<Your Target Name>' do
97
- pod 'Alamofire', '~> 4.7'
98
- end
99
- ```
100
-
101
- Then, run the following command:
102
-
103
- ```bash
104
- $ pod install
105
- ```
106
-
107
- ### Carthage
108
-
109
- [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
110
-
111
- You can install Carthage with [Homebrew](https://brew.sh/) using the following command:
112
-
113
- ```bash
114
- $ brew update
115
- $ brew install carthage
116
- ```
117
-
118
- To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`:
119
-
120
- ```ogdl
121
- github "Alamofire/Alamofire" ~> 4.7
122
- ```
123
-
124
- Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project.
125
-
126
- ### Swift Package Manager
127
-
128
- The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms.
129
-
130
- Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
131
-
132
- #### Swift 3
133
-
134
- ```swift
135
- dependencies: [
136
- .Package(url: "https://github.com/Alamofire/Alamofire.git", majorVersion: 4)
137
- ]
138
- ```
139
-
140
- #### Swift 4
141
-
142
- ```swift
143
- dependencies: [
144
- .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.0.0")
145
- ]
146
- ```
147
-
148
- ### Manually
149
-
150
- If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually.
151
-
152
- #### Embedded Framework
153
-
154
- - Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:
155
-
156
- ```bash
157
- $ git init
158
- ```
159
-
160
- - Add Alamofire as a git [submodule](https://git-scm.com/docs/git-submodule) by running the following command:
161
-
162
- ```bash
163
- $ git submodule add https://github.com/Alamofire/Alamofire.git
164
- ```
165
-
166
- - Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project.
167
-
168
- > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter.
169
-
170
- - Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target.
171
- - Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.
172
- - In the tab bar at the top of that window, open the "General" panel.
173
- - Click on the `+` button under the "Embedded Binaries" section.
174
- - You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder.
175
-
176
- > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`.
177
-
178
- - Select the top `Alamofire.framework` for iOS and the bottom one for OS X.
179
-
180
- > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`.
181
-
182
- - And that's it!
183
-
184
- > The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.
185
-
186
- ## Open Radars
187
-
188
- The following radars have some effect on the current implementation of Alamofire.
189
-
190
- - [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case
191
- - `rdar://26870455` - Background URL Session Configurations do not work in the simulator
192
- - `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest`
193
- - [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+
194
-
195
- ## Resolved Radars
196
-
197
- The following radars have been resolved over time after being filed against the Alamofire project.
198
-
199
- - [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage (Resolved on 9/1/17 in Xcode 9 beta 6).
200
-
201
- ## FAQ
202
-
203
- ### What's the origin of the name Alamofire?
204
-
205
- Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas.
206
-
207
- ### What logic belongs in a Router vs. a Request Adapter?
208
-
209
- Simple, static data such as paths, parameters and common headers belong in the `Router`. Dynamic data such as an `Authorization` header whose value can changed based on an authentication system belongs in a `RequestAdapter`.
210
-
211
- The reason the dynamic data MUST be placed into the `RequestAdapter` is to support retry operations. When a `Request` is retried, the original request is not rebuilt meaning the `Router` will not be called again. The `RequestAdapter` is called again allowing the dynamic data to be updated on the original request before retrying the `Request`.
212
-
213
- ## Credits
214
-
215
- Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases.
216
-
217
- ### Security Disclosure
218
-
219
- If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker.
220
-
221
- ## Donations
222
-
223
- The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially stay registered as a federal non-profit organization.
224
- Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free.
225
- Donating to the ASF will enable us to:
226
-
227
- - Pay our yearly legal fees to keep the non-profit in good status
228
- - Pay for our mail servers to help us stay on top of all questions and security issues
229
- - Potentially fund test servers to make it easier for us to test the edge cases
230
- - Potentially fund developers to work on one of our projects full-time
231
-
232
- The community adoption of the ASF libraries has been amazing.
233
- We are greatly humbled by your enthusiasm around the projects, and want to continue to do everything we can to move the needle forward.
234
- With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members.
235
- If you use any of our libraries for work, see if your employers would be interested in donating.
236
- Any amount you can donate today to help us reach our goal would be greatly appreciated.
237
-
238
- [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W34WPEE74APJQ)
239
-
240
- ## License
241
-
242
- Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details.