Compare commits

...

57 Commits

Author SHA1 Message Date
Austin Cherry b1472f2a99 Merge pull request #242 from pvzig/xcode8b6
Xcode8b6
2016-08-28 13:15:57 -07:00
Peter Zignego 34ed785564 Update example test syntax 2016-08-28 11:26:03 -04:00
Peter Zignego 08d2da1221 Set SWIFT_VERSION for all targets 2016-08-28 11:25:52 -04:00
Dalton 5c607a80ce Merge pull request #235 from nuclearace/swift3-nuclearace
Beta6 update
2016-08-22 13:30:48 -07:00
Erik 3aac891e83 Merge dalton/master and update for swift3 2016-08-21 17:07:07 -04:00
Dalton 473a1382ac Merge pull request #227 from tractus/swift3
Updated for Xcode 8 Beta 4
2016-08-08 17:41:39 -07:00
Dalton c767cb2a54 Merge pull request #225 from ThinkChaos/master
Fix typo that prevents SSL detection
2016-08-03 14:57:31 -07:00
Trey Richards cdd1224a71 Updated for Xcode 8 Beta 4 2016-08-02 15:30:56 -07:00
ThinkChaos 7c09aa08b4 Fix typo that prevents SSL detection 2016-07-31 10:18:00 +02:00
Dalton c2782b5452 Merge pull request #222 from Danappelxx/swift3
Fix typo in `dequeueInput`
2016-07-21 14:42:02 -07:00
Dan Appel 14bc9ad90f Fix typo in dequeueInput
This was breaking messages that were sent in chunks, since only the first chunk would be processed.
2016-07-20 18:51:58 -07:00
Dalton bdab51f4af Merge pull request #219 from nathanborror/master
Fixing 'queue' naming error
2016-07-12 18:39:42 -07:00
Nathan Borror 26297ed3c1 Fixing 'queue' naming error 2016-07-12 15:57:03 -07:00
Dalton 600815b240 Merge pull request #211 from Abeansits/master
Fixed formatting on a a few places to be more consistent.
2016-07-08 23:00:32 -07:00
Sebastian Nystorm 5fba5b83b4 Fixed formatting on a a few places to be more consistent.
Renamed a few vars to be more descriptive.
Added some MARKS to divide the code inte clearer chunks.
Also fixed a few spelling mistakes.
2016-07-03 22:19:08 -07:00
Dalton c39043cc29 Merge pull request #209 from Abeansits/master
Returned custom close reason from server according to RFC 6455
2016-06-24 19:35:44 -07:00
Sebastian Nystorm dd6bfa24b7 Returned custom close reason from server according to RFC 6455 2016-06-23 12:26:07 -07:00
daltoniam 64661bc6ce Merge branch 'master' of https://github.com/daltoniam/Starscream 2016-06-18 19:23:02 -07:00
daltoniam 0f03fab95d swift 3 branch README note 2016-06-18 19:22:45 -07:00
daltoniam c7b52b4485 swift 3 changes to build with xCode 8. More cleanup staged 2016-06-18 19:20:26 -07:00
Dalton fc35de78a5 Merge pull request #199 from dreymonde/notifications
Posting NSNotification about websocket connection and disconnection
2016-06-02 20:41:52 -07:00
Oleg Dreyman d911dc1adf README update to include information about NSNotifications 2016-05-29 20:19:55 +03:00
Oleg Dreyman f5f777c507 Posting errors with userInfo on WebsocketDidDisconnectNotification 2016-05-28 01:37:26 +03:00
Oleg Dreyman cca4af6112 Posting NSNotification about websocket connection and disconnection 2016-05-28 01:16:03 +03:00
daltoniam afad19ca84 changes for swift 3 2016-05-21 21:16:59 -07:00
daltoniam b159d03640 fixes #185 2016-05-16 22:27:51 -07:00
daltoniam d5aeefd853 switch from recusion to loop 2016-05-16 22:01:20 -07:00
Dalton f0f2ceee20 Merge pull request #189 from mayoff/upstream
process buffered messages non-recursively
2016-05-16 18:51:47 -07:00
Rob Mayoff 10cfb16197 process buffered messages non-recursively 2016-05-11 15:37:14 -05:00
daltoniam bf0146db26 1.1.3 release 2016-03-31 12:25:30 -07:00
Austin Cherry cf6def9453 Merge pull request #178 from noremac/dev/cameron.pulsford/write-complete
Adds an optional `writeCompletion` callback
2016-03-01 10:59:39 -08:00
Cameron Pulsford 8db1a45c6c Adds an optional "write did complete" callback 2016-03-01 09:24:16 -05:00
Austin Cherry 592da86d06 Merge pull request #177 from noremac/dev/cameron.pulsford/var-let
Replaces a force-unwrapped var with a let
2016-02-29 23:07:41 -08:00
Cameron Pulsford 43ade49abe Replaces a force-unwrapped NSData var with a let 2016-02-29 00:18:35 -05:00
Dalton e32674a1ea Merge pull request #175 from impossibleventures/master
Set "Require Only App-Extension-Safe API" to YES
2016-02-25 12:56:44 -08:00
Ryan Peck 7e49eb2458 Set APPLICATION_EXTENSION_API_ONLY = YES 2016-02-24 18:27:11 -06:00
Dalton 53c19d2388 Merge pull request #174 from nicolasbigot/master
Remove `var` parameters to conform to Swift 3
2016-02-24 11:42:36 -08:00
Nicolas Bigot ab02d55700 Fix comments spaces 2016-02-24 09:58:09 +01:00
Nicolas Bigot fa0865fcac Remove var parameters to conform to Swift 3 2016-02-24 09:55:23 +01:00
Dalton 5d185b41cb Merge pull request #171 from ReadmeCritic/master
Correct the spelling of CocoaPods in README
2016-02-12 18:19:34 -08:00
ReadmeCritic ba1d7db873 Correct the spelling of CocoaPods in README 2016-02-12 15:47:14 -08:00
Dalton e2eea95ea5 Merge pull request #170 from mayoff/master
change all use of ++ to += 1
2016-02-11 10:43:14 -08:00
Rob Mayoff 363e331a84 change all use of ++ to += 1
Swift 2.2 deprecates ++ and --, and Swift 3 will remove them.
2016-02-11 11:59:27 -06:00
daltoniam 75721192c9 Merge branch 'master' of https://github.com/daltoniam/Starscream 2016-02-08 19:04:10 -08:00
daltoniam 0c4a99588f bumped version 2016-02-08 19:03:41 -08:00
Dalton 4387f497c9 Merge pull request #167 from ayking/master
fix : connect to a shutdown server will not get error call back
2016-02-08 18:57:00 -08:00
Dalton d87b422950 Merge pull request #168 from onevcat/master
Fix crashing when reconnecting repeatedly
2016-02-08 18:55:26 -08:00
onevcat c5569dff12 Fix crashing when reconnecting repeatedly 2016-02-08 22:40:11 +08:00
Alan YU 6b303eafec fix : connect to a shutdown server will not get error call back 2016-02-05 17:12:33 +08:00
daltoniam 0f8dd95f70 proper fix for #164 2016-01-29 10:52:18 -08:00
daltoniam ede7c9aa89 Merge branch 'master' of https://github.com/daltoniam/Starscream 2016-01-27 21:39:38 -08:00
daltoniam afefdff061 fixes for #158, #159, #161, #164 2016-01-27 21:39:13 -08:00
Dalton 3a59333bac Merge pull request #160 from kylebshr/master
Simple update to examples for Swift 2 (println() to print())
2016-01-22 13:19:41 -08:00
Kyle Bashour 1951d74516 Simple update to examples for Swift 2 (println() to print()) 2016-01-22 13:00:04 -05:00
daltoniam 6c34076224 another possible fix for #158 2016-01-21 15:44:51 -08:00
daltoniam f189e7c51f possible fix for #158 2016-01-21 13:46:52 -08:00
daltoniam 95c91f9dbf changelog update 2016-01-18 12:34:43 -08:00
14 changed files with 628 additions and 464 deletions
+21
View File
@@ -2,6 +2,27 @@
All notable changes to this project will be documented in this file.
`Starscream` adheres to [Semantic Versioning](http://semver.org/).
#### [1.1.3](https://github.com/daltoniam/Starscream/tree/1.1.3)
Changed:
[#170](https://github.com/daltoniam/Starscream/issues/170)
[#171](https://github.com/daltoniam/Starscream/issues/171)
[#174](https://github.com/daltoniam/Starscream/issues/174)
[#177](https://github.com/daltoniam/Starscream/issues/177)
[#178](https://github.com/daltoniam/Starscream/issues/178)
#### [1.1.2](https://github.com/daltoniam/Starscream/tree/1.1.2)
Fixed:
[#158](https://github.com/daltoniam/Starscream/issues/158)
[#161](https://github.com/daltoniam/Starscream/issues/161)
[#164](https://github.com/daltoniam/Starscream/issues/164)
#### [1.1.1](https://github.com/daltoniam/Starscream/tree/1.1.1)
Fixed:
[#157](https://github.com/daltoniam/Starscream/issues/157)
#### [1.1.0](https://github.com/daltoniam/Starscream/tree/1.1.0)
Changed:
+33 -30
View File
@@ -4,13 +4,13 @@ Starscream is a conforming WebSocket ([RFC 6455](http://tools.ietf.org/html/rfc6
It's Objective-C counter part can be found here: [Jetfire](https://github.com/acmacalister/jetfire)
This is written Swift 2. (the latest). If you need older legecy support checkout the Swift-1.2 branch [here](https://github.com/daltoniam/Starscream/tree/swift-1.2).
###Swift 3/Xcode 8
If you are looking for Swift 3 support, see [swift 3 here](https://github.com/daltoniam/Starscream/tree/swift3)
## Features
- Conforms to all of the base [Autobahn test suite](http://autobahn.ws/testsuite/).
- Nonblocking. Everything happens in the background, thanks to GCD.
- Simple delegate pattern design.
- TLS/WSS support.
- Simple concise codebase at just a few hundred LOC.
@@ -22,10 +22,10 @@ First thing is to import the framework. See the Installation instructions on how
import Starscream
```
Once imported, you can open a connection to your WebSocket server. Note that `socket` is probably best as a property, so your delegate can stick around.
Once imported, you can open a connection to your WebSocket server. Note that `socket` is probably best as a property, so it doesn't get deallocated right after being setup.
```swift
var socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!)
socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!)
socket.delegate = self
socket.connect()
```
@@ -38,7 +38,7 @@ websocketDidConnect is called as soon as the client connects to the server.
```swift
func websocketDidConnect(socket: WebSocket) {
println("websocket is connected")
print("websocket is connected")
}
```
@@ -48,7 +48,7 @@ websocketDidDisconnect is called as soon as the client is disconnected from the
```swift
func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
println("websocket is disconnected: \(error?.localizedDescription)")
print("websocket is disconnected: \(error?.localizedDescription)")
}
```
@@ -58,7 +58,7 @@ websocketDidReceiveMessage is called when the client gets a text frame from the
```swift
func websocketDidReceiveMessage(socket: WebSocket, text: String) {
println("got some text: \(text)")
print("got some text: \(text)")
}
```
@@ -68,7 +68,7 @@ websocketDidReceiveData is called when the client gets a binary frame from the c
```swift
func websocketDidReceiveData(socket: WebSocket, data: NSData) {
println("got some data: \(data.length)")
print("got some data: \(data.length)")
}
```
@@ -78,34 +78,36 @@ websocketDidReceivePong is called when the client gets a pong response from the
```swift
func websocketDidReceivePong(socket: WebSocket) {
println("Got pong!")
print("Got pong!")
}
```
Or you can use closures.
```swift
var socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!)
socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!)
//websocketDidConnect
socket.onConnect = {
println("websocket is connected")
print("websocket is connected")
}
//websocketDidDisconnect
socket.onDisconnect = { (error: NSError?) in
println("websocket is disconnected: \(error?.localizedDescription)")
print("websocket is disconnected: \(error?.localizedDescription)")
}
//websocketDidReceiveMessage
socket.onText = { (text: String) in
println("got some text: \(text)")
print("got some text: \(text)")
}
//websocketDidReceiveData
socket.onData = { (data: NSData) in
println("got some data: \(data.length)")
print("got some data: \(data.length)")
}
//you could do onPong as well.
socket.connect()
```
One more: you can listen to socket connection and disconnection via notifications. Starscream posts `WebsocketDidConnectNotification` and `WebsocketDidDisconnectNotification`. You can find an `NSError` that caused the disconection by accessing `WebsocketDisconnectionErrorKeyName` on notification `userInfo`.
## The delegate methods give you a simple way to handle data from the server, but how do you send data?
@@ -114,7 +116,7 @@ socket.connect()
The writeData method gives you a simple way to send `NSData` (binary) data to the server.
```swift
self.socket.writeData(data) //write some NSData over the socket!
socket.writeData(data) //write some NSData over the socket!
```
### writeString
@@ -122,7 +124,7 @@ self.socket.writeData(data) //write some NSData over the socket!
The writeString method is the same as writeData, but sends text/string.
```swift
self.socket.writeString("Hi Server!") //example on how to write text over the socket!
socket.writeString("Hi Server!") //example on how to write text over the socket!
```
### writePing
@@ -130,7 +132,7 @@ self.socket.writeString("Hi Server!") //example on how to write text over the so
The writePing method is the same as writeData, but sends a ping control frame.
```swift
self.socket.writePing(NSData()) //example on how to write a ping control frame over the socket!
socket.writePing(NSData()) //example on how to write a ping control frame over the socket!
```
### disconnect
@@ -138,7 +140,7 @@ self.socket.writePing(NSData()) //example on how to write a ping control frame o
The disconnect method does what you would expect and closes the socket.
```swift
self.socket.disconnect()
socket.disconnect()
```
### isConnected
@@ -146,7 +148,7 @@ self.socket.disconnect()
Returns if the socket is connected or not.
```swift
if self.socket.isConnected {
if socket.isConnected {
// do cool stuff.
}
```
@@ -167,7 +169,7 @@ If you need to specify a protocol, simple add it to the init:
```swift
//chat and superchat are the example protocols here
var socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
socket.delegate = self
socket.connect()
```
@@ -177,7 +179,7 @@ socket.connect()
There are a couple of other properties that modify the stream:
```swift
var socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
//set this if you are planning on using the socket in a VOIP background setting (using the background VOIP service).
socket.voipEnabled = true
@@ -191,7 +193,7 @@ socket.selfSignedSSL = true
SSL Pinning is also supported in Starscream.
```swift
var socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
let data = ... //load your certificate from disk
socket.security = SSLSecurity(certs: [SSLCert(data: data)], usePublicKeys: true)
//socket.security = SSLSecurity() //uses the .cer files in your app's bundle
@@ -203,7 +205,7 @@ You load either a `NSData` blob of your certificate or you can use a `SecKeyRef`
A custom queue can be specified when delegate methods are called. By default `dispatch_get_main_queue` is used, thus making all delegate methods calls run on the main thread. It is important to note that all WebSocket processing is done on a background thread, only the delegate method calls are changed when modifying the queue. The actual processing is always on a background thread and will not pause your app.
```swift
var socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
socket = WebSocket(url: NSURL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
//create a custom queue
socket.queue = dispatch_queue_create("com.vluxe.starscream.myapp", nil)
```
@@ -214,21 +216,21 @@ Check out the SimpleTest project in the examples directory to see how to setup a
## Requirements
Starscream works with iOS 7/OSX 10.9 or above. It is recommended to use iOS 8/10.10 or above for Cocoapods/framework support. To use Starscream with a project targeting iOS 7, you must include all Swift files directly in your project.
Starscream works with iOS 7/OSX 10.9 or above. It is recommended to use iOS 8/10.10 or above for CocoaPods/framework support. To use Starscream with a project targeting iOS 7, you must include all Swift files directly in your project.
## Installation
### Cocoapods
### CocoaPods
Check out [Get Started](http://cocoapods.org/) tab on [cocoapods.org](http://cocoapods.org/).
To use Starscream in your project add the following 'Podfile' to your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
platform :ios, '9.0'
use_frameworks!
pod 'Starscream', '~> 1.0.0'
pod 'Starscream', '~> 1.1.3'
Then run:
@@ -250,7 +252,7 @@ $ brew install carthage
To integrate Starscream into your Xcode project using Carthage, specify it in your `Cartfile`:
```
github "daltoniam/Starscream" >= 1.0.0
github "daltoniam/Starscream" >= 1.1.3
```
### Rogue
@@ -277,8 +279,9 @@ If you are running this in an OSX app or on a physical iOS device you will need
## TODOs
- [ ] WatchOS
- [ ] Add Unit Tests
- [ ] WatchOS?
- [ ] Linux Support?
- [ ] Add Unit Tests - Local Swift websocket server
## License
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.1</string>
<string>1.1.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.1</string>
<string>1.1.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
+40 -36
View File
@@ -24,8 +24,8 @@ import Foundation
import Security
public class SSLCert {
var certData: NSData?
var key: SecKeyRef?
var certData: Data?
var key: SecKey?
/**
Designated init for certificates
@@ -34,7 +34,7 @@ public class SSLCert {
- returns: a representation security object to be used with
*/
public init(data: NSData) {
public init(data: Data) {
self.certData = data
}
@@ -45,7 +45,7 @@ public class SSLCert {
- returns: a representation security object to be used with
*/
public init(key: SecKeyRef) {
public init(key: SecKey) {
self.key = key
}
}
@@ -54,8 +54,8 @@ public class SSLSecurity {
public var validatedDN = true //should the domain name be validated?
var isReady = false //is the key processing done?
var certificates: [NSData]? //the certificates
var pubKeys: [SecKeyRef]? //the public keys
var certificates: [Data]? //the certificates
var pubKeys: [SecKey]? //the public keys
var usePublicKeys = false //use public keys or certificate validation?
/**
@@ -66,11 +66,12 @@ public class SSLSecurity {
- returns: a representation security object to be used with
*/
public convenience init(usePublicKeys: Bool = false) {
let paths = NSBundle.mainBundle().pathsForResourcesOfType("cer", inDirectory: ".")
let paths = Bundle.main.paths(forResourcesOfType: "cer", inDirectory: ".")
let certs = paths.reduce([SSLCert]()) { (var certs: [SSLCert], path: String) -> [SSLCert] in
let certs = paths.reduce([SSLCert]()) { (certs: [SSLCert], path: String) -> [SSLCert] in
var certs = certs
if let data = NSData(contentsOfFile: path) {
certs.append(SSLCert(data: data))
certs.append(SSLCert(data: data as Data))
}
return certs
}
@@ -90,9 +91,10 @@ public class SSLSecurity {
self.usePublicKeys = usePublicKeys
if self.usePublicKeys {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0)) {
let pubKeys = certs.reduce([SecKeyRef]()) { (var pubKeys: [SecKeyRef], cert: SSLCert) -> [SecKeyRef] in
if let data = cert.certData where cert.key == nil {
DispatchQueue.global(qos: .default).async {
let pubKeys = certs.reduce([SecKey]()) { (pubKeys: [SecKey], cert: SSLCert) -> [SecKey] in
var pubKeys = pubKeys
if let data = cert.certData, cert.key == nil {
cert.key = self.extractPublicKey(data)
}
if let key = cert.key {
@@ -105,7 +107,8 @@ public class SSLSecurity {
self.isReady = true
}
} else {
let certificates = certs.reduce([NSData]()) { (var certificates: [NSData], cert: SSLCert) -> [NSData] in
let certificates = certs.reduce([Data]()) { (certificates: [Data], cert: SSLCert) -> [Data] in
var certificates = certificates
if let data = cert.certData {
certificates.append(data)
}
@@ -124,26 +127,26 @@ public class SSLSecurity {
- returns: if the key was successfully validated
*/
public func isValid(trust: SecTrustRef, domain: String?) -> Bool {
public func isValid(_ trust: SecTrust, domain: String?) -> Bool {
var tries = 0
while(!self.isReady) {
while !self.isReady {
usleep(1000)
tries += 1
if tries > 5 {
return false //doesn't appear it is going to ever be ready...
}
}
var policy: SecPolicyRef
var policy: SecPolicy
if self.validatedDN {
policy = SecPolicyCreateSSL(true, domain)
policy = SecPolicyCreateSSL(true, domain as NSString?)
} else {
policy = SecPolicyCreateBasicX509()
}
SecTrustSetPolicies(trust,policy)
if self.usePublicKeys {
if let keys = self.pubKeys {
let serverPubKeys = publicKeyChainForTrust(trust)
let serverPubKeys = publicKeyChain(trust)
for serverKey in serverPubKeys as [AnyObject] {
for key in keys as [AnyObject] {
if serverKey.isEqual(key) {
@@ -153,21 +156,20 @@ public class SSLSecurity {
}
}
} else if let certs = self.certificates {
let serverCerts = certificateChainForTrust(trust)
let serverCerts = certificateChain(trust)
var collect = [SecCertificate]()
for cert in certs {
collect.append(SecCertificateCreateWithData(nil,cert)!)
collect.append(SecCertificateCreateWithData(nil,cert as CFData)!)
}
SecTrustSetAnchorCertificates(trust,collect)
var result: SecTrustResultType = 0
SecTrustSetAnchorCertificates(trust,collect as NSArray)
var result: SecTrustResultType = .unspecified
SecTrustEvaluate(trust,&result)
let r = Int(result)
if r == kSecTrustResultUnspecified || r == kSecTrustResultProceed {
if result == .unspecified || result == .proceed {
var trustedCount = 0
for serverCert in serverCerts {
for cert in certs {
if cert == serverCert {
trustedCount++
trustedCount += 1
break
}
}
@@ -187,10 +189,10 @@ public class SSLSecurity {
- returns: a public key
*/
func extractPublicKey(data: NSData) -> SecKeyRef? {
guard let cert = SecCertificateCreateWithData(nil, data) else { return nil }
func extractPublicKey(_ data: Data) -> SecKey? {
guard let cert = SecCertificateCreateWithData(nil, data as CFData) else { return nil }
return extractPublicKeyFromCert(cert, policy: SecPolicyCreateBasicX509())
return extractPublicKey(cert, policy: SecPolicyCreateBasicX509())
}
/**
@@ -200,13 +202,13 @@ public class SSLSecurity {
- returns: a public key
*/
func extractPublicKeyFromCert(cert: SecCertificate, policy: SecPolicy) -> SecKeyRef? {
func extractPublicKey(_ cert: SecCertificate, policy: SecPolicy) -> SecKey? {
var possibleTrust: SecTrust?
SecTrustCreateWithCertificates(cert, policy, &possibleTrust)
guard let trust = possibleTrust else { return nil }
var result: SecTrustResultType = 0
var result: SecTrustResultType = .unspecified
SecTrustEvaluate(trust, &result)
return SecTrustCopyPublicKey(trust)
}
@@ -218,10 +220,11 @@ public class SSLSecurity {
- returns: the certificate chain for the trust
*/
func certificateChainForTrust(trust: SecTrustRef) -> [NSData] {
let certificates = (0..<SecTrustGetCertificateCount(trust)).reduce([NSData]()) { (var certificates: [NSData], index: Int) -> [NSData] in
func certificateChain(_ trust: SecTrust) -> [Data] {
let certificates = (0..<SecTrustGetCertificateCount(trust)).reduce([Data]()) { (certificates: [Data], index: Int) -> [Data] in
var certificates = certificates
let cert = SecTrustGetCertificateAtIndex(trust, index)
certificates.append(SecCertificateCopyData(cert!))
certificates.append(SecCertificateCopyData(cert!) as Data)
return certificates
}
@@ -235,11 +238,12 @@ public class SSLSecurity {
- returns: the public keys from the certifcate chain for the trust
*/
func publicKeyChainForTrust(trust: SecTrustRef) -> [SecKeyRef] {
func publicKeyChain(_ trust: SecTrust) -> [SecKey] {
let policy = SecPolicyCreateBasicX509()
let keys = (0..<SecTrustGetCertificateCount(trust)).reduce([SecKeyRef]()) { (var keys: [SecKeyRef], index: Int) -> [SecKeyRef] in
let keys = (0..<SecTrustGetCertificateCount(trust)).reduce([SecKey]()) { (keys: [SecKey], index: Int) -> [SecKey] in
var keys = keys
let cert = SecTrustGetCertificateAtIndex(trust, index)
if let key = extractPublicKeyFromCert(cert!, policy: policy) {
if let key = extractPublicKey(cert!, policy: policy) {
keys.append(key)
}
+424 -317
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Starscream"
s.version = "1.1.1"
s.version = "1.1.3"
s.summary = "A conforming WebSocket RFC 6455 client library in Swift for iOS and OSX."
s.homepage = "https://github.com/daltoniam/Starscream"
s.license = 'Apache License, Version 2.0'
+73 -44
View File
@@ -42,18 +42,18 @@
/* Begin PBXFileReference section */
091277971BD673A70003036D /* Starscream.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Starscream.framework; sourceTree = BUILT_PRODUCTS_DIR; };
091277A01BD673A70003036D /* StarscreamTvTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StarscreamTvTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
091277A01BD673A70003036D /* Starscream tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Starscream tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5C135FFF1C473BEF00AA3A01 /* SSLSecurity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SSLSecurity.swift; path = Source/SSLSecurity.swift; sourceTree = SOURCE_ROOT; };
5C1360001C473BEF00AA3A01 /* Starscream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Starscream.h; path = Source/Starscream.h; sourceTree = SOURCE_ROOT; };
5C1360011C473BEF00AA3A01 /* WebSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WebSocket.swift; path = Source/WebSocket.swift; sourceTree = SOURCE_ROOT; };
5C13600B1C473BFE00AA3A01 /* Info-tvOS.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-tvOS.plist"; path = "Source/Info-tvOS.plist"; sourceTree = SOURCE_ROOT; };
5C13600C1C473BFE00AA3A01 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Source/Info.plist; sourceTree = SOURCE_ROOT; };
6B3E79E619D48B7F006071F7 /* Starscream.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Starscream.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6B3E79F119D48B7F006071F7 /* StarscreamTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StarscreamTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6B3E79F119D48B7F006071F7 /* Starscream iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Starscream iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
6B3E7A0019D48C2F006071F7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6B3E7A0119D48C2F006071F7 /* StarscreamTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StarscreamTests.swift; sourceTree = "<group>"; };
D9C3E35F19E48FF1009FC285 /* Starscream.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Starscream.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D9C3E36919E48FF1009FC285 /* StarscreamOSXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StarscreamOSXTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
D9C3E36919E48FF1009FC285 /* Starscream OSXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Starscream OSXTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -117,11 +117,11 @@
isa = PBXGroup;
children = (
6B3E79E619D48B7F006071F7 /* Starscream.framework */,
6B3E79F119D48B7F006071F7 /* StarscreamTests.xctest */,
6B3E79F119D48B7F006071F7 /* Starscream iOSTests.xctest */,
D9C3E35F19E48FF1009FC285 /* Starscream.framework */,
D9C3E36919E48FF1009FC285 /* StarscreamOSXTests.xctest */,
D9C3E36919E48FF1009FC285 /* Starscream OSXTests.xctest */,
091277971BD673A70003036D /* Starscream.framework */,
091277A01BD673A70003036D /* StarscreamTvTests.xctest */,
091277A01BD673A70003036D /* Starscream tvOSTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -185,9 +185,9 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
091277961BD673A70003036D /* StarscreamTv */ = {
091277961BD673A70003036D /* Starscream tvOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 091277A81BD673A70003036D /* Build configuration list for PBXNativeTarget "StarscreamTv" */;
buildConfigurationList = 091277A81BD673A70003036D /* Build configuration list for PBXNativeTarget "Starscream tvOS" */;
buildPhases = (
091277921BD673A70003036D /* Sources */,
091277931BD673A70003036D /* Frameworks */,
@@ -198,14 +198,14 @@
);
dependencies = (
);
name = StarscreamTv;
name = "Starscream tvOS";
productName = StarscreamTv;
productReference = 091277971BD673A70003036D /* Starscream.framework */;
productType = "com.apple.product-type.framework";
};
0912779F1BD673A70003036D /* StarscreamTvTests */ = {
0912779F1BD673A70003036D /* Starscream tvOSTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 091277AB1BD673A70003036D /* Build configuration list for PBXNativeTarget "StarscreamTvTests" */;
buildConfigurationList = 091277AB1BD673A70003036D /* Build configuration list for PBXNativeTarget "Starscream tvOSTests" */;
buildPhases = (
0912779C1BD673A70003036D /* Sources */,
0912779D1BD673A70003036D /* Frameworks */,
@@ -216,14 +216,14 @@
dependencies = (
091277A31BD673A70003036D /* PBXTargetDependency */,
);
name = StarscreamTvTests;
name = "Starscream tvOSTests";
productName = StarscreamTvTests;
productReference = 091277A01BD673A70003036D /* StarscreamTvTests.xctest */;
productReference = 091277A01BD673A70003036D /* Starscream tvOSTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
6B3E79E519D48B7F006071F7 /* Starscream */ = {
6B3E79E519D48B7F006071F7 /* Starscream iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6B3E79F919D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream" */;
buildConfigurationList = 6B3E79F919D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream iOS" */;
buildPhases = (
6B3E79E119D48B7F006071F7 /* Sources */,
6B3E79E219D48B7F006071F7 /* Frameworks */,
@@ -234,14 +234,14 @@
);
dependencies = (
);
name = Starscream;
name = "Starscream iOS";
productName = Starscream;
productReference = 6B3E79E619D48B7F006071F7 /* Starscream.framework */;
productType = "com.apple.product-type.framework";
};
6B3E79F019D48B7F006071F7 /* StarscreamTests */ = {
6B3E79F019D48B7F006071F7 /* Starscream iOSTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6B3E79FC19D48B7F006071F7 /* Build configuration list for PBXNativeTarget "StarscreamTests" */;
buildConfigurationList = 6B3E79FC19D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream iOSTests" */;
buildPhases = (
6B3E79ED19D48B7F006071F7 /* Sources */,
6B3E79EE19D48B7F006071F7 /* Frameworks */,
@@ -251,14 +251,14 @@
);
dependencies = (
);
name = StarscreamTests;
name = "Starscream iOSTests";
productName = StarscreamTests;
productReference = 6B3E79F119D48B7F006071F7 /* StarscreamTests.xctest */;
productReference = 6B3E79F119D48B7F006071F7 /* Starscream iOSTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
D9C3E35E19E48FF1009FC285 /* StarscreamOSX */ = {
D9C3E35E19E48FF1009FC285 /* Starscream OSX */ = {
isa = PBXNativeTarget;
buildConfigurationList = D9C3E37619E48FF1009FC285 /* Build configuration list for PBXNativeTarget "StarscreamOSX" */;
buildConfigurationList = D9C3E37619E48FF1009FC285 /* Build configuration list for PBXNativeTarget "Starscream OSX" */;
buildPhases = (
D9C3E35A19E48FF1009FC285 /* Sources */,
D9C3E35B19E48FF1009FC285 /* Frameworks */,
@@ -269,14 +269,14 @@
);
dependencies = (
);
name = StarscreamOSX;
name = "Starscream OSX";
productName = StarscreamOSX;
productReference = D9C3E35F19E48FF1009FC285 /* Starscream.framework */;
productType = "com.apple.product-type.framework";
};
D9C3E36819E48FF1009FC285 /* StarscreamOSXTests */ = {
D9C3E36819E48FF1009FC285 /* Starscream OSXTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = D9C3E37719E48FF1009FC285 /* Build configuration list for PBXNativeTarget "StarscreamOSXTests" */;
buildConfigurationList = D9C3E37719E48FF1009FC285 /* Build configuration list for PBXNativeTarget "Starscream OSXTests" */;
buildPhases = (
D9C3E36519E48FF1009FC285 /* Sources */,
D9C3E36619E48FF1009FC285 /* Frameworks */,
@@ -287,9 +287,9 @@
dependencies = (
D9C3E36C19E48FF1009FC285 /* PBXTargetDependency */,
);
name = StarscreamOSXTests;
name = "Starscream OSXTests";
productName = StarscreamOSXTests;
productReference = D9C3E36919E48FF1009FC285 /* StarscreamOSXTests.xctest */;
productReference = D9C3E36919E48FF1009FC285 /* Starscream OSXTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
@@ -300,7 +300,7 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = Vluxe;
TargetAttributes = {
091277961BD673A70003036D = {
@@ -311,6 +311,7 @@
};
6B3E79E519D48B7F006071F7 = {
CreatedOnToolsVersion = 6.0.1;
LastSwiftMigration = 0800;
};
6B3E79F019D48B7F006071F7 = {
CreatedOnToolsVersion = 6.0.1;
@@ -335,12 +336,12 @@
projectDirPath = "";
projectRoot = "";
targets = (
6B3E79E519D48B7F006071F7 /* Starscream */,
6B3E79F019D48B7F006071F7 /* StarscreamTests */,
D9C3E35E19E48FF1009FC285 /* StarscreamOSX */,
D9C3E36819E48FF1009FC285 /* StarscreamOSXTests */,
091277961BD673A70003036D /* StarscreamTv */,
0912779F1BD673A70003036D /* StarscreamTvTests */,
6B3E79E519D48B7F006071F7 /* Starscream iOS */,
6B3E79F019D48B7F006071F7 /* Starscream iOSTests */,
D9C3E35E19E48FF1009FC285 /* Starscream OSX */,
D9C3E36819E48FF1009FC285 /* Starscream OSXTests */,
091277961BD673A70003036D /* Starscream tvOS */,
0912779F1BD673A70003036D /* Starscream tvOSTests */,
);
};
/* End PBXProject section */
@@ -447,12 +448,12 @@
/* Begin PBXTargetDependency section */
091277A31BD673A70003036D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 091277961BD673A70003036D /* StarscreamTv */;
target = 091277961BD673A70003036D /* Starscream tvOS */;
targetProxy = 091277A21BD673A70003036D /* PBXContainerItemProxy */;
};
D9C3E36C19E48FF1009FC285 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D9C3E35E19E48FF1009FC285 /* StarscreamOSX */;
target = D9C3E35E19E48FF1009FC285 /* Starscream OSX */;
targetProxy = D9C3E36B19E48FF1009FC285 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
@@ -477,6 +478,7 @@
PRODUCT_NAME = Starscream;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
@@ -502,6 +504,8 @@
PRODUCT_NAME = Starscream;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
@@ -510,6 +514,7 @@
091277AC1BD673A70003036D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = Tests/Info.plist;
@@ -517,6 +522,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.vluxe.StarscreamTvTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
@@ -524,6 +530,7 @@
091277AD1BD673A70003036D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES;
@@ -532,6 +539,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.vluxe.StarscreamTvTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Release;
@@ -540,6 +549,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
@@ -560,6 +570,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -587,6 +598,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
@@ -606,6 +618,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -639,10 +652,11 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_NAME = Starscream;
PROVISIONING_PROFILE = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
@@ -663,15 +677,18 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_NAME = Starscream;
PROVISIONING_PROFILE = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = Release;
};
6B3E79FD19D48B7F006071F7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
@@ -684,12 +701,14 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
6B3E79FE19D48B7F006071F7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
@@ -698,6 +717,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = Release;
};
@@ -722,6 +743,7 @@
PRODUCT_NAME = Starscream;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VALID_ARCHS = x86_64;
};
name = Debug;
@@ -744,6 +766,8 @@
PRODUCT_NAME = Starscream;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
VALID_ARCHS = x86_64;
};
name = Release;
@@ -751,6 +775,7 @@
D9C3E37419E48FF1009FC285 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
@@ -766,12 +791,14 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
D9C3E37519E48FF1009FC285 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
@@ -784,13 +811,15 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
091277A81BD673A70003036D /* Build configuration list for PBXNativeTarget "StarscreamTv" */ = {
091277A81BD673A70003036D /* Build configuration list for PBXNativeTarget "Starscream tvOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
091277A91BD673A70003036D /* Debug */,
@@ -799,7 +828,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
091277AB1BD673A70003036D /* Build configuration list for PBXNativeTarget "StarscreamTvTests" */ = {
091277AB1BD673A70003036D /* Build configuration list for PBXNativeTarget "Starscream tvOSTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
091277AC1BD673A70003036D /* Debug */,
@@ -817,7 +846,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6B3E79F919D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream" */ = {
6B3E79F919D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6B3E79FA19D48B7F006071F7 /* Debug */,
@@ -826,7 +855,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6B3E79FC19D48B7F006071F7 /* Build configuration list for PBXNativeTarget "StarscreamTests" */ = {
6B3E79FC19D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream iOSTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6B3E79FD19D48B7F006071F7 /* Debug */,
@@ -835,7 +864,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D9C3E37619E48FF1009FC285 /* Build configuration list for PBXNativeTarget "StarscreamOSX" */ = {
D9C3E37619E48FF1009FC285 /* Build configuration list for PBXNativeTarget "Starscream OSX" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D9C3E37219E48FF1009FC285 /* Debug */,
@@ -844,7 +873,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D9C3E37719E48FF1009FC285 /* Build configuration list for PBXNativeTarget "StarscreamOSXTests" */ = {
D9C3E37719E48FF1009FC285 /* Build configuration list for PBXNativeTarget "Starscream OSXTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D9C3E37419E48FF1009FC285 /* Debug */,
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -16,7 +16,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79E519D48B7F006071F7"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream"
BlueprintName = "Starscream iOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -47,7 +47,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79E519D48B7F006071F7"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream"
BlueprintName = "Starscream iOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -65,7 +65,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79E519D48B7F006071F7"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream"
BlueprintName = "Starscream iOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -16,7 +16,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E35E19E48FF1009FC285"
BuildableName = "Starscream.framework"
BlueprintName = "StarscreamOSX"
BlueprintName = "Starscream OSX"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -29,8 +29,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E36819E48FF1009FC285"
BuildableName = "StarscreamOSXTests.xctest"
BlueprintName = "StarscreamOSXTests"
BuildableName = "Starscream OSXTests.xctest"
BlueprintName = "Starscream OSXTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -47,8 +47,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E36819E48FF1009FC285"
BuildableName = "StarscreamOSXTests.xctest"
BlueprintName = "StarscreamOSXTests"
BuildableName = "Starscream OSXTests.xctest"
BlueprintName = "Starscream OSXTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</TestableReference>
@@ -58,7 +58,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E35E19E48FF1009FC285"
BuildableName = "Starscream.framework"
BlueprintName = "StarscreamOSX"
BlueprintName = "Starscream OSX"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -80,7 +80,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E35E19E48FF1009FC285"
BuildableName = "Starscream.framework"
BlueprintName = "StarscreamOSX"
BlueprintName = "Starscream OSX"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -98,7 +98,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E35E19E48FF1009FC285"
BuildableName = "Starscream.framework"
BlueprintName = "StarscreamOSX"
BlueprintName = "Starscream OSX"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -15,8 +15,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "StarscreamTests.xctest"
BlueprintName = "StarscreamTests"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -33,8 +33,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "StarscreamTests.xctest"
BlueprintName = "StarscreamTests"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</TestableReference>
@@ -43,8 +43,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "StarscreamTests.xctest"
BlueprintName = "StarscreamTests"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -65,8 +65,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "StarscreamTests.xctest"
BlueprintName = "StarscreamTests"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -83,8 +83,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "StarscreamTests.xctest"
BlueprintName = "StarscreamTests"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -16,7 +16,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "091277961BD673A70003036D"
BuildableName = "Starscream.framework"
BlueprintName = "StarscreamTv"
BlueprintName = "Starscream tvOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -29,8 +29,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0912779F1BD673A70003036D"
BuildableName = "StarscreamTvTests.xctest"
BlueprintName = "StarscreamTvTests"
BuildableName = "Starscream tvOSTests.xctest"
BlueprintName = "Starscream tvOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -47,8 +47,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0912779F1BD673A70003036D"
BuildableName = "StarscreamTvTests.xctest"
BlueprintName = "StarscreamTvTests"
BuildableName = "Starscream tvOSTests.xctest"
BlueprintName = "Starscream tvOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</TestableReference>
@@ -58,7 +58,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "091277961BD673A70003036D"
BuildableName = "Starscream.framework"
BlueprintName = "StarscreamTv"
BlueprintName = "Starscream tvOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -80,7 +80,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "091277961BD673A70003036D"
BuildableName = "Starscream.framework"
BlueprintName = "StarscreamTv"
BlueprintName = "Starscream tvOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -98,7 +98,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "091277961BD673A70003036D"
BuildableName = "Starscream.framework"
BlueprintName = "StarscreamTv"
BlueprintName = "Starscream tvOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
+1 -1
View File
@@ -27,7 +27,7 @@ class StarscreamTests: XCTestCase {
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock() {
self.measure() {
// Put the code you want to measure the time of here.
}
}