Skip to content

Commit

Permalink
Adding Alamofire.playground
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Sep 24, 2014
1 parent fd74161 commit 559ef09
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
*.playground
7 changes: 7 additions & 0 deletions Alamofire.playground/contents.xcplayground
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='3.0' sdk='iphonesimulator'>
<sections>
<code source-file-name='section-1.swift'/>
</sections>
<timeline fileName='timeline.xctimeline'/>
</playground>
27 changes: 27 additions & 0 deletions Alamofire.playground/section-1.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import XCPlayground
import Foundation
import Alamofire

// Allow network requests to complete
XCPSetExecutionShouldContinueIndefinitely()

Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"])
.responseString { (request, response, string, error) in
println(request)
println(response)
println(string)
}

/*
[BUG] In Xcode 6.0.1, execution fails with the following error:

IDEPlaygroundExecution: Playground execution failed: error: Couldn't lookup symbols:
__TWPSS9Alamofire20URLStringConvertible
__TF9Alamofire7requestFTOS_6MethodPS_20URLStringConvertible_10parametersGSqGVSs10DictionarySSPSs9AnyObject___8encodingOS_17ParameterEncoding_CS_7Request
__TFO9Alamofire6Method3GETFMS0_S0_
__TIF9Alamofire7requestFTOS_6MethodPS_20URLStringConvertible_10parametersGSqGVSs10DictionarySSPSs9AnyObject___8encodingOS_17ParameterEncoding_CS_7RequestA2_
__TMaC9Alamofire7Request
__TFC9Alamofire7Request14responseStringfDS0_FFTCSo12NSURLRequestGSqCSo17NSHTTPURLResponse_GSqSS_GSqCSo7NSError__T_DS0_

If you have a proposed fix, please send a Pull Request: https://github.com/Alamofire/Alamofire/pulls
*/
6 changes: 6 additions & 0 deletions Alamofire.playground/timeline.xctimeline
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Timeline
version = "3.0">
<TimelineItems>
</TimelineItems>
</Timeline>
4 changes: 2 additions & 2 deletions Alamofire.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
Expand All @@ -373,7 +373,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
};
name = Release;
};
Expand Down
3 changes: 3 additions & 0 deletions Alamofire.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 559ef09

Please sign in to comment.