Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
1385987f
Commit
1385987f
authored
Mar 21, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed rake examples:build
parent
f8d3ffb7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
28 additions
and
91 deletions
+28
-91
Rakefile
Rakefile
+2
-2
Podfile
examples/AFNetworking Example/Podfile
+1
-1
Alamofire.podspec
examples/Alamofire Example/Alamofire.podspec
+0
-16
AppDelegate.swift
examples/Alamofire Example/Example/AppDelegate.swift
+5
-7
DetailViewController.swift
...ples/Alamofire Example/Example/DetailViewController.swift
+14
-8
HTTPBin.swift
examples/Alamofire Example/Example/HTTPBin.swift
+1
-1
MasterViewController.swift
...ples/Alamofire Example/Example/MasterViewController.swift
+2
-2
Podfile
examples/Alamofire Example/Podfile
+2
-2
Alamofire.h
examples/Alamofire Example/Source/Alamofire.h
+0
-26
Alamofire.swift
examples/Alamofire Example/Source/Alamofire.swift
+0
-0
Info.plist
examples/Alamofire Example/Source/Info.plist
+0
-26
project.pbxproj
...s/Alamofire Example/iOS Example.xcodeproj/project.pbxproj
+1
-0
No files found.
Rakefile
View file @
1385987f
...
...
@@ -266,7 +266,7 @@ begin
project
=
Xcodeproj
::
Project
.
open
(
project_path
)
target
=
project
.
targets
.
first
case
target
case
target
.
platform_name
when
:osx
execute_command
"xcodebuild -workspace '
#{
workspace_path
}
' -scheme '
#{
scheme_name
}
' clean build"
when
:ios
...
...
@@ -274,7 +274,7 @@ begin
major_version
=
xcode_version
.
split
(
'.'
).
first
.
to_i
# Specifically build against the simulator SDK so we don't have to deal with code signing.
simulator_name
=
major_version
>
5
?
'iPhone 6'
:
'iPhone Retina (4-inch)'
execute_command
"xcodebuild -workspace '
#{
workspace_path
}
' -scheme '
#{
scheme_name
}
' clean build ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=
#{
simulator_name
}
"
execute_command
"xcodebuild -workspace '
#{
workspace_path
}
' -scheme '
#{
scheme_name
}
' clean build ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=
#{
simulator_name
}
'
"
end
end
end
...
...
examples/AFNetworking Example/Podfile
View file @
1385987f
### Implicit target definition :-/
xcodeproj
"AFNetworking Mac Example.xcodeproj"
project
"AFNetworking Mac Example.xcodeproj"
####
workspace
'Examples.xcworkspace'
...
...
examples/Alamofire Example/Alamofire.podspec
deleted
100644 → 0
View file @
f8d3ffb7
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'Alamofire'
s
.
version
=
'0.0.1'
s
.
license
=
'MIT'
s
.
summary
=
'Elegant HTTP Networking in Swift'
s
.
homepage
=
'https://github.com/Alamofire/Alamofire'
s
.
social_media_url
=
'http://twitter.com/mattt'
s
.
authors
=
{
'Mattt Thompson'
=>
'm@mattt.me'
}
s
.
source
=
{
:git
=>
'https://github.com/Alamofire/Alamofire.git'
,
:branch
=>
'master'
}
s
.
requires_arc
=
true
s
.
ios
.
deployment_target
=
'8.0'
s
.
osx
.
deployment_target
=
'10.10'
s
.
source_files
=
'Source/*.swift'
end
examples/Alamofire Example/Example/AppDelegate.swift
View file @
1385987f
...
...
@@ -28,19 +28,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
var
window
:
UIWindow
?
// MARK: - UIApplicationDelegate
func
application
(
application
:
UIApplication
!
,
didFinishLaunchingWithOptions
launchOptions
:
NSDictionary
!
)
->
Bool
{
let
splitViewController
=
self
.
window
!.
rootViewController
as
UISplitViewController
let
navigationController
=
splitViewController
.
viewControllers
.
last
as
UINavigationController
navigationController
.
topViewController
.
navigationItem
.
leftBarButtonItem
=
splitViewController
.
displayModeButtonItem
()
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
let
splitViewController
=
self
.
window
!.
rootViewController
as!
UISplitViewController
let
navigationController
=
splitViewController
.
viewControllers
.
last
as!
UINavigationController
navigationController
.
topViewController
?
.
navigationItem
.
leftBarButtonItem
=
splitViewController
.
displayModeButtonItem
()
splitViewController
.
delegate
=
self
return
true
}
// MARK: - UISplitViewControllerDelegate
func
splitViewController
(
splitViewController
:
UISplitViewController
!
,
collapseSecondaryViewController
secondaryViewController
:
UIViewController
!
,
ontoPrimaryViewController
primaryViewController
:
UIViewController
!
)
->
Bool
{
func
splitViewController
(
splitViewController
:
UISplitViewController
,
collapseSecondaryViewController
secondaryViewController
:
UIViewController
,
ontoPrimaryViewController
primaryViewController
:
UIViewController
)
->
Bool
{
if
let
secondaryAsNavController
=
secondaryViewController
as?
UINavigationController
{
if
let
topAsDetailController
=
secondaryAsNavController
.
topViewController
as?
DetailViewController
{
return
topAsDetailController
.
request
==
nil
...
...
examples/Alamofire Example/Example/DetailViewController.swift
View file @
1385987f
...
...
@@ -68,15 +68,21 @@ class DetailViewController: UITableViewController {
self
.
refreshControl
?
.
beginRefreshing
()
let
start
=
CACurrentMediaTime
()
self
.
request
?
.
responseString
{
(
request
,
response
,
body
,
error
)
in
self
.
request
?
.
response
self
.
request
?
.
responseString
{
response
in
let
end
=
CACurrentMediaTime
()
self
.
elapsedTime
=
end
-
start
for
(
field
,
value
)
in
response
!.
allHeaderFields
{
response
.
response
?
.
allHeaderFields
.
forEach
{
field
,
value
in
self
.
headers
[
"
\(
field
)
"
]
=
"
\(
value
)
"
}
self
.
body
=
body
switch
response
.
result
{
case
let
.
Success
(
body
):
self
.
body
=
body
default
:
break
}
self
.
tableView
.
reloadData
()
self
.
refreshControl
?
.
endRefreshing
()
...
...
@@ -100,18 +106,18 @@ class DetailViewController: UITableViewController {
switch
Sections
(
rawValue
:
indexPath
.
section
)
!
{
case
.
Headers
:
let
cell
=
self
.
tableView
.
dequeueReusableCellWithIdentifier
(
"Header"
)
as
UITableViewCell
let
field
=
self
.
headers
.
keys
.
array
.
sorted
(
<
)[
indexPath
.
row
]
let
cell
=
self
.
tableView
.
dequeueReusableCellWithIdentifier
(
"Header"
)
!
as
UITableViewCell
let
field
=
Array
(
self
.
headers
.
keys
)
.
sort
(
<
)[
indexPath
.
row
]
let
value
=
self
.
headers
[
field
]
cell
.
textLabel
.
text
=
field
cell
.
textLabel
!
.
text
=
field
cell
.
detailTextLabel
!.
text
=
value
return
cell
case
.
Body
:
let
cell
=
self
.
tableView
.
dequeueReusableCellWithIdentifier
(
"Body"
)
as
UITableViewCell
let
cell
=
self
.
tableView
.
dequeueReusableCellWithIdentifier
(
"Body"
)
!
as
UITableViewCell
cell
.
textLabel
.
text
=
self
.
body
cell
.
textLabel
!
.
text
=
self
.
body
return
cell
}
...
...
examples/Alamofire Example/Example/HTTPBin.swift
View file @
1385987f
...
...
@@ -38,7 +38,7 @@ enum HTTPBinRoute: URLStringConvertible {
}
}()
return
NSURL
(
string
:
path
,
relativeToURL
:
NSURL
(
string
:
baseURLString
))
!.
absoluteString
!
return
NSURL
(
string
:
path
,
relativeToURL
:
NSURL
(
string
:
baseURLString
))
!.
absoluteString
}
}
examples/Alamofire Example/Example/MasterViewController.swift
View file @
1385987f
...
...
@@ -43,14 +43,14 @@ class MasterViewController: UITableViewController {
if
let
split
=
self
.
splitViewController
{
let
controllers
=
split
.
viewControllers
self
.
detailViewController
=
controllers
.
last
?
.
topViewController
as?
DetailViewController
self
.
detailViewController
=
(
controllers
.
last
as!
UINavigationController
)
.
topViewController
as?
DetailViewController
}
}
// MARK: - UIStoryboardSegue
override
func
prepareForSegue
(
segue
:
UIStoryboardSegue
,
sender
:
AnyObject
?)
{
if
let
detailViewController
=
segue
.
destinationViewController
.
topViewController
as?
DetailViewController
{
if
let
detailViewController
=
(
segue
.
destinationViewController
as!
UINavigationController
)
.
topViewController
as?
DetailViewController
{
func
requestForSegue
(
segue
:
UIStoryboardSegue
)
->
Request
?
{
switch
segue
.
identifier
as
String
!
{
case
"GET"
:
...
...
examples/Alamofire Example/Podfile
View file @
1385987f
source
'https://github.com/CocoaPods/Specs.git'
workspace
'Examples.xcworkspace'
xcodeproj
'iOS Example.xcodeproj'
project
'iOS Example.xcodeproj'
target
'iOS Example'
do
platform
:ios
,
'8.0'
use_frameworks!
pod
'Alamofire'
,
:path
=>
'.
'
pod
'Alamofire'
,
'3.2.1
'
end
examples/Alamofire Example/Source/Alamofire.h
deleted
100644 → 0
View file @
f8d3ffb7
// Alamofire.h
//
// Copyright (c) 2014 Alamofire (http://alamofire.org)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <Foundation/Foundation.h>
FOUNDATION_EXPORT
double
AlamofireVersionNumber
;
FOUNDATION_EXPORT
const
unsigned
char
AlamofireVersionString
[];
examples/Alamofire Example/Source/Alamofire.swift
deleted
100644 → 0
View file @
f8d3ffb7
This diff is collapsed.
Click to expand it.
examples/Alamofire Example/Source/Info.plist
deleted
100644 → 0
View file @
f8d3ffb7
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
com.alamofire.$
(
PRODUCT_NAME:rfc1034identifier
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
FMWK
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
$
(
CURRENT_PROJECT_VERSION
)<
/string
>
<
k
e
y
>
NSPrincipalClass
<
/k
e
y
>
<
string
><
/string
>
<
/
d
i
c
t
>
<
/plist
>
examples/Alamofire Example/iOS Example.xcodeproj/project.pbxproj
View file @
1385987f
...
...
@@ -129,6 +129,7 @@
F8111DFD19A951050040E7D1
/* Project object */
=
{
isa
=
PBXProject
;
attributes
=
{
LastSwiftUpdateCheck
=
0730
;
LastUpgradeCheck
=
0600
;
ORGANIZATIONNAME
=
Alamofire
;
TargetAttributes
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment