Compare commits

..

204 Commits

Author SHA1 Message Date
daltoniam 85070aab91 few warning fixes 2017-03-28 20:09:07 -05:00
daltoniam dbeb1190b8 some cleanup and SSL pinning fix 2017-03-14 13:12:39 -05:00
daltoniam 13859364e3 updated changelog 2017-02-03 14:25:31 -06:00
daltoniam 41c0c5e08b version bump 2017-02-03 14:20:21 -06:00
daltoniam 60b27a4388 possible fix for #301 2017-01-11 22:55:39 -06:00
daltoniam a68bf7c35b connect delegate before firing message delegates. Fixed disconnect getting called before connect 2017-01-11 12:10:33 -06:00
Dalton 33a4551f3b Merge pull request #302 from Elethier/operation-cancellation
Fixed issues with not cancelling block operations properly
2017-01-10 22:25:12 -06:00
Dalton b22fae407e Merge pull request #300 from Elethier/multiple-disconnects
Added guard against multiple disconnects
2017-01-10 21:41:02 -06:00
Dalton e9160df255 Merge pull request #296 from nuclearace/fix-disconnect
Fix #295
2017-01-06 21:32:13 -06:00
Praneet Sahgal c63e173021 Fixed issues with not cancelling block operations properly 2017-01-04 09:15:56 -06:00
Praneet Sahgal ddcc30d200 Added guard against multiple disconnects 2017-01-04 09:03:42 -06:00
Erik 6bacb6f972 Fix #295
This sets didDisconnect to false if we receive a connect.
2016-12-31 18:05:11 -05:00
Dalton aca2ad5332 Merge pull request #292 from euskadi31/master
Change public to open
2016-12-30 16:32:51 -06:00
Dalton 3ba1963c65 Merge pull request #294 from wordpress-mobile/prevent-reconnection-crash
Prevent reconnection crash
2016-12-30 15:56:12 -06:00
Dalton 3cc4a60e05 Merge pull request #289 from robinmj/master
Fix for excessive memory use caused by the receipt of an unusually large message
2016-12-30 15:54:37 -06:00
Jorge Bernal 14313df360 Disconnect and clean up streams before connecting.
Since `disconnect` without a timeout only sends a close message to the server,
if we tried to `connect` the socket again before the connection was closed it
would not clean up the streams properly, which could result in a crash.

See #272
2016-12-27 16:23:39 +01:00
Jorge Bernal 162c1d53b8 Keep isConnecting true while connecting.
The existing code only prevented a second connection to be created while
createHTTPRequest was being called (setting up the HTTP request and the
streams). However, between the time when the socket opens the streams until the
TCP handshake ends, it would be both `!conneted` and `!isConnecting`, which
wouldn't prevent a second `connect`.
2016-12-27 15:56:01 +01:00
Axel Etcheverry b404f98244 Change public to open 2016-12-19 15:31:10 +01:00
daltoniam 8d0c0c1afa simple test update 2016-12-12 13:26:41 -06:00
Dalton 816fe413a4 Merge pull request #288 from dancasimiro/host-only-origin
Remove the path components from the URL sent as origin
2016-12-12 13:22:27 -06:00
Daniel C. Casimiro 5cc0d860ba Add path components to the test server URL
This demonstrates the path stripping from the origin URL.
2016-11-22 08:53:45 -05:00
Daniel C. Casimiro 4d2f8dbfee Remove the path components from the URL sent as origin
This fixes issue #287. The origin is a URI indicating the server from
which the request initiated. It does not include any path information,
but only the server name.
2016-11-22 08:53:45 -05:00
Robin Johnson 126c021e61 fixed malloc failure by draining autorelease pool with every dequeuing operation 2016-11-21 19:14:20 -07:00
daltoniam c13584b99c bumped spec 2016-11-14 22:29:34 -06:00
Dalton 178c3e8a49 Merge pull request #277 from nuclearace/master
Fix Swift package manager
2016-11-01 18:57:49 -05:00
Erik ccc1b703dd Fix Swift package manager 2016-10-30 19:47:58 -04:00
daltoniam 1b64f78542 version bump 2016-10-26 20:41:30 -05:00
Dalton 549500a503 Merge pull request #253 from noremac/master
Only disable SSL cert validation if we are using a secure scheme.
2016-10-26 20:26:58 -05:00
Dalton 22d57dca07 Merge pull request #276 from profer/master
Enable custom trust validation
2016-10-26 20:26:30 -05:00
daltoniam dd5119cfce fix for #261 2016-10-26 20:25:39 -05:00
Wolfgang Profer a6b2e4329b Enable custom trust validation
Change WebSocket to use a protocol for trust validation instead of SSLSecurity directly. This allows users of Starscream to supply their own validation logic.
2016-10-24 13:43:44 +02:00
Dalton 931e3ba8ae Merge pull request #266 from fjcaetano/master
'Open'ing classes
2016-10-11 23:23:09 -05:00
Dalton 7476f5196e Merge pull request #267 from Dipak99041012/2.0.0HotFixes
[Fixup] crash for SSL Pinning Strange crash
2016-10-11 23:20:28 -05:00
Dipak Kasabwala 20285cce97 [Fixup] crash for SSL Pinning Strange crash 2016-10-10 18:14:01 -04:00
Flávio Caetano 8e1de1d475 'Open'ing classes 2016-10-10 17:47:13 -03:00
Cameron Pulsford acf64adc24 Only disable SSL cert validation if we are using a secure scheme. 2016-09-30 14:49:26 -04:00
Dalton b0fa08cde4 Merge pull request #259 from robinkunde/master
Improve clarity of asyncAfter code and other timeout
2016-09-30 13:34:49 -05:00
Dalton 9d32864ab4 Merge pull request #260 from ujell/master
Fixed parameter names in documentation
2016-09-30 13:02:28 -05:00
Yücel Uzun 7ef2bc41e0 Fixed parameter names in documentation 2016-09-29 18:50:22 +02:00
Robin Kunde 24e32a78e3 improve clarity of asyncAfter code and other timeout 2016-09-28 12:27:48 -04:00
daltoniam d831901ff4 more things to get cocoapods working 2016-09-18 16:35:32 -05:00
daltoniam 26b03ddaef swift 3 support 2016-09-18 16:28:53 -05:00
daltoniam d94c3ff3b4 cocoapods... 2016-09-18 16:18:21 -05:00
daltoniam 60d853742c cocoapods... 2016-09-18 16:16:37 -05:00
daltoniam 8563f6b85e osx podspec update 2016-09-18 16:13:23 -05:00
daltoniam c889a6c977 available for osx 2016-09-18 16:07:39 -05:00
daltoniam 8f3761215b conflict fixes 2016-09-18 15:46:05 -05:00
daltoniam cdf8caeb1a swift 2.3 update 2016-09-18 15:43:12 -05:00
daltoniam 00d8fae6cd swift3 updates 2016-09-18 15:37:55 -05:00
Dalton 46db9a75f0 Merge pull request #243 from cpinski/writeQueueQOS
Added initializer to set the QOS of the write queue
2016-09-13 21:21:48 -05:00
Christopher Pinski 5a3adc7756 Added initializer to set the QOS of the write queue 2016-08-29 15:44:05 -05:00
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 32fb0aa87e Merge pull request #230 from cpinski/swift2.3
Adding full support for swift 2.3
2016-08-14 15:21:25 -07:00
Dalton 473a1382ac Merge pull request #227 from tractus/swift3
Updated for Xcode 8 Beta 4
2016-08-08 17:41:39 -07:00
Christopher Pinski 9c210e006e Adding full support for swift 2.3 2016-08-05 10:47:12 -05: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
daltoniam 398d9c15bf bumped spec 2016-01-18 12:26:32 -08:00
Dalton 5a85e4e524 Merge pull request #157 from dsato80/fragBuffer-fix
set fragBuffer data if processHTTP returns -1
2016-01-18 12:15:57 -08:00
Daisuke Sato d6f2c2c409 set fragBuffer data if processHTTP returns -1 2016-01-18 18:10:30 +09:00
daltoniam ad91b8f1f3 shared queue and bug fixes 2016-01-17 22:39:41 -08:00
daltoniam c59125f34a fixes #139 2016-01-13 18:20:41 -08:00
daltoniam ce9062ab81 fixes #149 2016-01-13 18:16:37 -08:00
Dalton ff64f0b349 Merge pull request #152 from steven851007/master
Fix #151
2016-01-11 15:27:09 -08:00
Istvan Balogh 65dbee5c94 Add default value to origin to keep backward compatibility 2016-01-09 10:53:14 +01:00
Istvan Balogh 7927195b05 Fix #151 2015-12-25 11:19:09 +01:00
Dalton d32dcb2aaa Merge pull request #144 from JamesPrudente/master
call websocketDidConnect delegate after connected is set to prevent race condition
2015-12-23 15:03:49 -08:00
Dalton aeae316209 Merge pull request #146 from mstorsjo/avoid-unaligned
Avoid doing unaligned reads/writes via UnsafePointer
2015-12-12 20:22:57 +02:00
Martin Storsjö 4f2201d6b7 Avoid doing unaligned reads/writes via UnsafePointer
Instead read/write individual bytes via UnsafePointer<UInt8>.

This fixes crashes that only happen when optimization is turned on,
on 32 bit arm builds.

Not all processors support unaligned reads/writes of 64 bit values.
Without optimizations, the reads/writes probably end up handling one
byte at a time (like this commit makes it do), while higher
optimization levels convert it to single reads/writes of the full
size, which may require that the pointer is properly aligned.
2015-12-11 20:39:03 +02:00
James Prudente ec313a376e call websocketDidConnect delegate after connected is set to prevent race condition 2015-12-10 16:05:07 -08:00
Dalton d5f690123f Merge pull request #141 from delba/syntax
Syntax
2015-12-07 11:37:30 -08:00
delba b00a84716c Use implicit casting 2015-12-07 18:41:19 +01:00
delba aa11fd3bbe Use guard 2015-12-07 18:39:58 +01:00
delba b6dddff56c Use if-let optional unwrapping 2015-12-07 18:29:22 +01:00
delba ac4f5ced1e Use contains 2015-12-07 18:24:32 +01:00
delba 947601b673 Initialize OpCode from rawValue 2015-12-07 18:15:11 +01:00
delba cea6ce13c8 Remove unneccessary parentheses around conditions 2015-12-07 18:15:11 +01:00
delba 09c032a138 Use reduce 2015-12-07 18:15:11 +01:00
delba 3fe7363ee9 Use an optional parameter 2015-12-07 18:15:11 +01:00
delba 32925e3847 Use the optional method call syntax 2015-12-07 18:15:11 +01:00
delba 6ad98fb458 Use the for-i-in-range syntax 2015-12-07 18:15:11 +01:00
delba f02840355d Use the trailing closure syntax 2015-12-07 18:15:11 +01:00
delba 4bece17d89 Use the shorthand notation for Array and Dictionary 2015-12-07 18:15:11 +01:00
Dalton 3582bab0b8 Merge pull request #140 from markus-k/master
Unwrap header safely when validating response.
2015-11-24 09:58:22 -08:00
Dalton 737fca6e73 Merge pull request #138 from Abizern/error-codes
Make CloseCode enum public
2015-11-24 09:52:38 -08:00
Markus Kasten e9446a57cd Unwrap header safely when validating response.
App will crash otherwise, when the header is missing.
2015-11-24 11:53:02 +01:00
Abizer Nasir b6054567ee Create a WebSocket error domain
Saves using strings, and also the domain of the error can be switched against.
2015-11-22 00:14:52 +00:00
Abizer Nasir 2b8d6214e2 Make CloseCode enum public
Since they get passed to the websocketDidDisconnect delegate method,
making them public means that the codes can be switched against without
needing magic numbers.
2015-11-21 23:59:45 +00:00
Dalton c56e0104c3 Merge pull request #135 from simonbs/master
Sets UIRequiredDeviceCapabilities in tvOS target
2015-11-16 11:10:31 -08:00
Dalton 2bbc0895d6 Merge pull request #133 from mayoff/maintenance-1.0.2
clean up WebSocket.disconnect parameter
2015-11-16 11:10:05 -08:00
Simon Støvring f1acef9a5f Sets UIRequiredDeviceCapabilities in tvOS target 2015-11-16 18:51:41 +01:00
Rob Mayoff b29059a937 clean up WebSocket.disconnect parameter
Now the parameter is properly an Optional<NSTimeInterval>, nil means no timeout, and zero means close immediately and forcibly.
2015-11-12 21:02:02 -06:00
Dalton e1bbc7612e added license to source files 2015-11-12 11:40:48 -08:00
Dalton e10942bc23 bumped spec 2015-11-05 10:09:45 -08:00
Dalton 9cf2c1f787 framework and package managers 2015-11-05 10:03:19 -08:00
Dalton bc48e654ca fixed tvOS build settings 2015-11-04 15:02:51 -08:00
Dalton 5e2768c048 possible fix for #132 2015-11-04 13:18:00 -08:00
Dalton 756a42756a Merge branch 'master' of https://github.com/daltoniam/Starscream 2015-10-20 18:51:17 -07:00
Dalton 4442aed401 added force timeout option for #127 2015-10-20 18:51:10 -07:00
Dalton 5f4db02f99 Merge pull request #129 from OlivierBoucher/master
Added tvOS target and podspec modifications
2015-10-20 18:46:09 -07:00
Olivier Boucher 679d858bbb Added tvOS target and podspec modifications 2015-10-20 09:16:21 -04:00
Dalton ec32edfb4e README update 2015-10-13 19:20:01 -07:00
Dalton df98a6e363 changelog and README update 2015-10-12 12:06:54 -07:00
Dalton 47bcdfbe57 bumped spec 2015-09-29 12:59:38 -07:00
Austin Cherry d69b169970 Merge pull request #125 from victorluft/master
When using cert pinning with public keys, only require one match.
2015-09-29 11:57:43 -07:00
Victor Luft aa2cb1b8fb When using cert pinning with public keys, only require one match. 2015-09-29 10:34:26 -07:00
Dalton fe2c26b760 fix for #121. Possible fix for upgrade issue 2015-09-28 10:29:36 -07:00
Dalton 357cd532dc example updates and fix #119 2015-09-28 10:14:36 -07:00
Dalton e0e4b379e7 Merge pull request #110 from TeletronicsDotAe/master
Property for enabling only certain cipher suites for the WSS connection
2015-09-22 10:28:03 -07:00
Pelle Stenild Coltau 4c66b22b43 Changes made regarding CipherSuites with respect to pull request review comments: Removed NSLog and doDisconnect() and added return statements in failure scenarios. 2015-09-21 11:27:14 +04:00
Pelle Stenild Coltau e848f186a5 Merge remote-tracking branch 'upstream/master' 2015-09-20 12:32:39 +04:00
Dalton c8201ec71c README update 2015-09-18 10:40:21 -07:00
Dalton f990c68c53 fixed conflicts 2015-09-14 09:56:30 -07:00
Dalton 9d37723c4d ready to become the master 2015-09-14 09:49:33 -07:00
Dalton b32048b229 ready to become the master 2015-09-14 09:47:31 -07:00
Dalton a40f448a16 quick README update 2015-09-14 09:32:49 -07:00
Dalton dcb046a46c bumped podspec 2015-09-14 09:26:01 -07:00
Dalton 357a178a64 last quick fix for #113 2015-09-14 09:24:45 -07:00
Dalton 7a15d7d7e6 fix for #113 2015-09-11 10:52:07 -07:00
Dalton 13f7502163 cleanup for Swift 2 2015-09-10 17:17:42 -07:00
Dalton 2e5cb03ac3 fix for #115 2015-09-10 15:59:29 -07:00
Dalton b26ffa28cd fix for #115 2015-09-10 15:57:34 -07:00
Dalton fd18936144 write queue change 2015-09-04 15:14:43 -07:00
Dalton e30b9a6f78 updated podspec 2015-09-04 13:33:40 -07:00
Dalton b962e3e532 fixed conflicts 2015-09-04 13:30:52 -07:00
Dalton 889d2880eb switch from unowned to weak 2015-09-04 13:21:28 -07:00
Dalton f509d9d485 updated podspec 2015-09-03 20:09:45 -07:00
Dalton 7b46baf12b better 2015-09-03 20:06:41 -07:00
Dalton 5dfe1fc117 added master fixes 2015-09-03 20:05:33 -07:00
Dalton f46e64b179 fix for #109, #105 and socket.io-swift 153 2015-09-03 19:59:26 -07:00
Pelle Stenild Coltau 4d072de18d Added optional unwrapping to cipher suites in case there is no ssl context 2015-08-30 11:22:39 +04:00
Leif Bredgaard Honore f0b188606f Revert "Better error handling of missing SSLContext"
This reverts commit fac69339ba.
2015-08-30 09:10:40 +04:00
Leif Bredgaard Honore fac69339ba Better error handling of missing SSLContext 2015-08-27 14:38:25 +04:00
Leif Bredgaard Honore e2c3e38a23 Bug fixed 2015-08-27 11:12:56 +04:00
Leif Bredgaard Honore 5f46a9097e Improved cipher suite error handling
We check the error code from SSLSetEnabledCiphers() and fail if it does
not succeed.
2015-08-26 14:06:43 +04:00
Leif Bredgaard Honore 8376a9c70b Cypher suite property renamed 2015-08-26 11:14:08 +04:00
Dalton 02f8eac43b Merge pull request #108 from FanVox/xcode7_b6
Make compatible with Xcode7 b5
2015-08-25 10:49:25 -07:00
Abizer Nasir 6a318b29d2 Make compatible with Xcode7 b5 2015-08-25 17:30:35 +01:00
Leif Bredgaard Honore df88d97511 It is now possible to set which SSL Cipher Suites are enabled for a connection 2015-08-24 14:21:05 +04:00
Austin ca478d26b2 fixed conflicts 2015-08-12 19:12:29 -07:00
Austin d1f3deee70 fix for #103 2015-08-12 10:33:32 -07:00
Dalton 4b65324a8d Merge pull request #102 from Ewg777/Swift-2.0
xcode 7 beta 5 compatibility
2015-08-07 13:31:16 -07:00
Ewg 9663215089 xcode 7 beta 5 compatibility 2015-08-07 13:13:35 +03:00
Ewg 5d272a80ef xcode 7 beta 5 compatibility 2015-08-07 13:12:48 +03:00
Dalton 56fb313bc5 added test autobahn project 2015-08-04 10:34:45 -07:00
Dalton e39ddeecf5 Merge pull request #101 from col/Swift-2.0
Xcode 7 / iOS 9 beta 4 compatibility
2015-07-22 10:38:22 -07:00
Colin Harris 36d4426888 Modified the Security class to make it compatible with Xcode 7 / iOS9 beta 4 2015-07-23 01:15:24 +08:00
Dalton 7b19d84984 fixes for #98 and #99. Closures are way more awesome. Possible fix for #87, #77 and fix for #72 2015-07-09 18:41:45 -07:00
Dalton b3db9d413a fix for #92 2015-06-14 19:47:09 -07:00
Dalton a69929fbc1 Merge pull request #95 from ricardopereira/Swift-2.0
Swift 2.0 update
2015-06-10 13:36:29 -07:00
Ricardo Pereira 3178fb1705 #93 Converted to latest swift syntax 2015-06-10 11:58:10 +01:00
45 changed files with 5349 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
3.0
+96
View File
@@ -0,0 +1,96 @@
# Change Log
All notable changes to this project will be documented in this file.
`Starscream` adheres to [Semantic Versioning](http://semver.org/).
#### [2.0.4](https://github.com/daltoniam/Starscream/tree/2.0.4)
SSL Pinning fix by Giuliano Galea as reported by Lukas Futera of [Centralway](https://www.centralway.com/de/).
Warning fixes for Swift 3.1
#### [2.0.3](https://github.com/daltoniam/Starscream/tree/2.0.3)
[#302](https://github.com/daltoniam/Starscream/issues/302)
[#301](https://github.com/daltoniam/Starscream/issues/301)
[#300](https://github.com/daltoniam/Starscream/issues/300)
[#296](https://github.com/daltoniam/Starscream/issues/296)
[#294](https://github.com/daltoniam/Starscream/issues/294)
[#292](https://github.com/daltoniam/Starscream/issues/292)
[#289](https://github.com/daltoniam/Starscream/issues/289)
[#288](https://github.com/daltoniam/Starscream/issues/288)
#### [2.0.2](https://github.com/daltoniam/Starscream/tree/2.0.2)
Fix for the Swift Package Manager.
Fixed:
[#277](https://github.com/daltoniam/Starscream/issues/277)
#### [2.0.1](https://github.com/daltoniam/Starscream/tree/2.0.1)
Bug fixes.
Fixed:
[#261](https://github.com/daltoniam/Starscream/issues/261)
[#276](https://github.com/daltoniam/Starscream/issues/276)
[#267](https://github.com/daltoniam/Starscream/issues/267)
[#266](https://github.com/daltoniam/Starscream/issues/266)
[#259](https://github.com/daltoniam/Starscream/issues/259)
#### [2.0.0](https://github.com/daltoniam/Starscream/tree/2.0.0)
Added Swift 3 support.
Fixed:
[#229](https://github.com/daltoniam/Starscream/issues/229)
[#232](https://github.com/daltoniam/Starscream/issues/232)
#### [1.1.4](https://github.com/daltoniam/Starscream/tree/1.1.4)
Swift 2.3 support.
#### [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:
Moved over to Runloop/default GCD queues to shared queue.
Fixed:
[#153](https://github.com/daltoniam/Starscream/issues/153)
[#151](https://github.com/daltoniam/Starscream/issues/151)
[#150](https://github.com/daltoniam/Starscream/issues/150)
[#149](https://github.com/daltoniam/Starscream/issues/149)
[#147](https://github.com/daltoniam/Starscream/issues/147)
[#139](https://github.com/daltoniam/Starscream/issues/139)
[#77](https://github.com/daltoniam/Starscream/issues/77)
#### [1.0.2](https://github.com/daltoniam/Starscream/tree/1.0.2)
Added TVOS support.
#### [1.0.1](https://github.com/daltoniam/Starscream/tree/1.0.1)
Fixes for #121, #123
#### [1.0.0](https://github.com/daltoniam/Starscream/tree/1.0.0)
first release of Swift 2 support.
+176
View File
@@ -0,0 +1,176 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Copyright (c) 2014-2016 Dalton Cherry.
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
+25
View File
@@ -0,0 +1,25 @@
//
// Package.Swift
// Starscream
//
// Created by Dalton Cherry on 5/16/15.
// Copyright (c) 2014-2016 Dalton Cherry.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import PackageDescription
let package = Package(
name: "Starscream"
)
+297
View File
@@ -0,0 +1,297 @@
![starscream](https://raw.githubusercontent.com/daltoniam/starscream/assets/starscream.jpg)
Starscream is a conforming WebSocket ([RFC 6455](http://tools.ietf.org/html/rfc6455)) client library in Swift for iOS and OSX.
It's Objective-C counter part can be found here: [Jetfire](https://github.com/acmacalister/jetfire)
## Features
- Conforms to all of the base [Autobahn test suite](http://autobahn.ws/testsuite/).
- Nonblocking. Everything happens in the background, thanks to GCD.
- TLS/WSS support.
- Simple concise codebase at just a few hundred LOC.
## Example
First thing is to import the framework. See the Installation instructions on how to add the framework to your project.
```swift
import Starscream
```
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
socket = WebSocket(url: URL(string: "ws://localhost:8080/")!)
socket.delegate = self
socket.connect()
```
After you are connected, there are some delegate methods that we need to implement.
### websocketDidConnect
websocketDidConnect is called as soon as the client connects to the server.
```swift
func websocketDidConnect(socket: WebSocket) {
print("websocket is connected")
}
```
### websocketDidDisconnect
websocketDidDisconnect is called as soon as the client is disconnected from the server.
```swift
func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
print("websocket is disconnected: \(error?.localizedDescription)")
}
```
### websocketDidReceiveMessage
websocketDidReceiveMessage is called when the client gets a text frame from the connection.
```swift
func websocketDidReceiveMessage(socket: WebSocket, text: String) {
print("got some text: \(text)")
}
```
### websocketDidReceiveData
websocketDidReceiveData is called when the client gets a binary frame from the connection.
```swift
func websocketDidReceiveData(socket: WebSocket, data: Data) {
print("got some data: \(data.count)")
}
```
### Optional: websocketDidReceivePong *(required protocol: WebSocketPongDelegate)*
websocketDidReceivePong is called when the client gets a pong response from the connection. You need to implement the WebSocketPongDelegate protocol and set an additional delegate, eg: ` socket.pongDelegate = self`
```swift
func websocketDidReceivePong(socket: WebSocket, data: Data?) {
print("Got pong! Maybe some data: \(data?.count)")
}
```
Or you can use closures.
```swift
socket = WebSocket(url: URL(string: "ws://localhost:8080/")!)
//websocketDidConnect
socket.onConnect = {
print("websocket is connected")
}
//websocketDidDisconnect
socket.onDisconnect = { (error: NSError?) in
print("websocket is disconnected: \(error?.localizedDescription)")
}
//websocketDidReceiveMessage
socket.onText = { (text: String) in
print("got some text: \(text)")
}
//websocketDidReceiveData
socket.onData = { (data: Data) in
print("got some data: \(data.count)")
}
//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?
### write a binary frame
The writeData method gives you a simple way to send `Data` (binary) data to the server.
```swift
socket.write(data: data) //write some Data over the socket!
```
### write a string frame
The writeString method is the same as writeData, but sends text/string.
```swift
socket.write(string: "Hi Server!") //example on how to write text over the socket!
```
### write a ping frame
The writePing method is the same as write, but sends a ping control frame.
```swift
socket.write(ping: Data()) //example on how to write a ping control frame over the socket!
```
### disconnect
The disconnect method does what you would expect and closes the socket.
```swift
socket.disconnect()
```
### isConnected
Returns if the socket is connected or not.
```swift
if socket.isConnected {
// do cool stuff.
}
```
### Custom Headers
You can also override the default websocket headers with your own custom ones like so:
```swift
socket.headers["Sec-WebSocket-Protocol"] = "someother protocols"
socket.headers["Sec-WebSocket-Version"] = "14"
socket.headers["My-Awesome-Header"] = "Everything is Awesome!"
```
### Protocols
If you need to specify a protocol, simple add it to the init:
```swift
//chat and superchat are the example protocols here
socket = WebSocket(url: URL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
socket.delegate = self
socket.connect()
```
### Self Signed SSL and VOIP
There are a couple of other properties that modify the stream:
```swift
socket = WebSocket(url: URL(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
//set this you want to ignore SSL cert validation, so a self signed SSL certificate can be used.
socket.disableSSLCertValidation = true
```
### SSL Pinning
SSL Pinning is also supported in Starscream.
```swift
socket = WebSocket(url: URL(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
```
You load either a `Data` blob of your certificate or you can use a `SecKeyRef` if you have a public key you want to use. The `usePublicKeys` bool is whether to use the certificates for validation or the public keys. The public keys will be extracted from the certificates automatically if `usePublicKeys` is choosen.
### Custom Queue
A custom queue can be specified when delegate methods are called. By default `DispatchQueue.main` 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
socket = WebSocket(url: URL(string: "ws://localhost:8080/")!, protocols: ["chat","superchat"])
//create a custom queue
socket.callbackQueue = DispatchQueue(label: "com.vluxe.starscream.myapp")
```
## Example Project
Check out the SimpleTest project in the examples directory to see how to setup a simple connection to a WebSocket server.
## 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.
## Installation
### 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, '9.0'
use_frameworks!
pod 'Starscream', '~> 2.0.3'
Then run:
pod install
### Carthage
Check out the [Carthage](https://github.com/Carthage/Carthage) docs on how to add a install. The `Starscream` framework is already setup with shared schemes.
[Carthage Install](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application)
You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
```bash
$ brew update
$ brew install carthage
```
To integrate Starscream into your Xcode project using Carthage, specify it in your `Cartfile`:
```
github "daltoniam/Starscream" >= 2.0.3
```
### Rogue
First see the [installation docs](https://github.com/acmacalister/Rogue) for how to install Rogue.
To install Starscream run the command below in the directory you created the rogue file.
```
rogue add https://github.com/daltoniam/starscream
```
Next open the `libs` folder and add the `Starscream.xcodeproj` to your Xcode project. Once that is complete, in your "Build Phases" add the `Starscream.framework` to your "Link Binary with Libraries" phase. Make sure to add the `libs` folder to your `.gitignore` file.
### Other
Simply grab the framework (either via git submodule or another package manager).
Add the `Starscream.xcodeproj` to your Xcode project. Once that is complete, in your "Build Phases" add the `Starscream.framework` to your "Link Binary with Libraries" phase.
### Add Copy Frameworks Phase
If you are running this in an OSX app or on a physical iOS device you will need to make sure you add the `Starscream.framework` to be included in your app bundle. To do this, in Xcode, navigate to the target configuration window by clicking on the blue project icon, and selecting the application target under the "Targets" heading in the sidebar. In the tab bar at the top of that window, open the "Build Phases" panel. Expand the "Link Binary with Libraries" group, and add `Starscream.framework`. Click on the + button at the top left of the panel and select "New Copy Files Phase". Rename this new phase to "Copy Frameworks", set the "Destination" to "Frameworks", and add `Starscream.framework` respectively.
## TODOs
- [ ] WatchOS?
- [ ] Linux Support?
- [ ] Add Unit Tests - Local Swift websocket server
## License
Starscream is licensed under the Apache v2 License.
## Contact
### Dalton Cherry
* https://github.com/daltoniam
* http://twitter.com/daltoniam
* http://daltoniam.com
### Austin Cherry ###
* https://github.com/acmacalister
* http://twitter.com/acmacalister
* http://austincherry.me
+30
View File
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
</dict>
</plist>
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
+260
View File
@@ -0,0 +1,260 @@
//////////////////////////////////////////////////////////////////////////////////////////////////
//
// SSLSecurity.swift
// Starscream
//
// Created by Dalton Cherry on 5/16/15.
// Copyright (c) 2014-2016 Dalton Cherry.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//////////////////////////////////////////////////////////////////////////////////////////////////
import Foundation
import Security
public protocol SSLTrustValidator {
func isValid(_ trust: SecTrust, domain: String?) -> Bool
}
open class SSLCert {
var certData: Data?
var key: SecKey?
/**
Designated init for certificates
- parameter data: is the binary data of the certificate
- returns: a representation security object to be used with
*/
public init(data: Data) {
self.certData = data
}
/**
Designated init for public keys
- parameter key: is the public key to be used
- returns: a representation security object to be used with
*/
public init(key: SecKey) {
self.key = key
}
}
open class SSLSecurity : SSLTrustValidator {
public var validatedDN = true //should the domain name be validated?
var isReady = false //is the key processing done?
var certificates: [Data]? //the certificates
var pubKeys: [SecKey]? //the public keys
var usePublicKeys = false //use public keys or certificate validation?
/**
Use certs from main app bundle
- parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation
- returns: a representation security object to be used with
*/
public convenience init(usePublicKeys: Bool = false) {
let paths = Bundle.main.paths(forResourcesOfType: "cer", inDirectory: ".")
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 as Data))
}
return certs
}
self.init(certs: certs, usePublicKeys: usePublicKeys)
}
/**
Designated init
- parameter certs: is the certificates or public keys to use
- parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation
- returns: a representation security object to be used with
*/
public init(certs: [SSLCert], usePublicKeys: Bool) {
self.usePublicKeys = usePublicKeys
if self.usePublicKeys {
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 {
pubKeys.append(key)
}
return pubKeys
}
self.pubKeys = pubKeys
self.isReady = true
}
} else {
let certificates = certs.reduce([Data]()) { (certificates: [Data], cert: SSLCert) -> [Data] in
var certificates = certificates
if let data = cert.certData {
certificates.append(data)
}
return certificates
}
self.certificates = certificates
self.isReady = true
}
}
/**
Valid the trust and domain name.
- parameter trust: is the serverTrust to validate
- parameter domain: is the CN domain to validate
- returns: if the key was successfully validated
*/
public func isValid(_ trust: SecTrust, domain: String?) -> Bool {
var tries = 0
while !self.isReady {
usleep(1000)
tries += 1
if tries > 5 {
return false //doesn't appear it is going to ever be ready...
}
}
var policy: SecPolicy
if self.validatedDN {
policy = SecPolicyCreateSSL(true, domain as NSString?)
} else {
policy = SecPolicyCreateBasicX509()
}
SecTrustSetPolicies(trust,policy)
if self.usePublicKeys {
if let keys = self.pubKeys {
let serverPubKeys = publicKeyChain(trust)
for serverKey in serverPubKeys as [AnyObject] {
for key in keys as [AnyObject] {
if serverKey.isEqual(key) {
return true
}
}
}
}
} else if let certs = self.certificates {
let serverCerts = certificateChain(trust)
var collect = [SecCertificate]()
for cert in certs {
collect.append(SecCertificateCreateWithData(nil,cert as CFData)!)
}
SecTrustSetAnchorCertificates(trust,collect as NSArray)
var result: SecTrustResultType = .unspecified
SecTrustEvaluate(trust,&result)
if result == .unspecified || result == .proceed {
var trustedCount = 0
for serverCert in serverCerts {
for cert in certs {
if cert == serverCert {
trustedCount += 1
break
}
}
}
if trustedCount == serverCerts.count {
return true
}
}
}
return false
}
/**
Get the public key from a certificate data
- parameter data: is the certificate to pull the public key from
- returns: a public key
*/
func extractPublicKey(_ data: Data) -> SecKey? {
guard let cert = SecCertificateCreateWithData(nil, data as CFData) else { return nil }
return extractPublicKey(cert, policy: SecPolicyCreateBasicX509())
}
/**
Get the public key from a certificate
- parameter data: is the certificate to pull the public key from
- returns: a public key
*/
func extractPublicKey(_ cert: SecCertificate, policy: SecPolicy) -> SecKey? {
var possibleTrust: SecTrust?
SecTrustCreateWithCertificates(cert, policy, &possibleTrust)
guard let trust = possibleTrust else { return nil }
var result: SecTrustResultType = .unspecified
SecTrustEvaluate(trust, &result)
return SecTrustCopyPublicKey(trust)
}
/**
Get the certificate chain for the trust
- parameter trust: is the trust to lookup the certificate chain for
- returns: the certificate chain for the trust
*/
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!) as Data)
return certificates
}
return certificates
}
/**
Get the public key chain for the trust
- parameter trust: is the trust to lookup the certificate chain and extract the public keys
- returns: the public keys from the certifcate chain for the trust
*/
func publicKeyChain(_ trust: SecTrust) -> [SecKey] {
let policy = SecPolicyCreateBasicX509()
let keys = (0..<SecTrustGetCertificateCount(trust)).reduce([SecKey]()) { (keys: [SecKey], index: Int) -> [SecKey] in
var keys = keys
let cert = SecTrustGetCertificateAtIndex(trust, index)
if let key = extractPublicKey(cert!, policy: policy) {
keys.append(key)
}
return keys
}
return keys
}
}
+19
View File
@@ -0,0 +1,19 @@
//
// Starscream.h
// Starscream
//
// Created by Austin Cherry on 9/25/14.
// Copyright (c) 2014 Vluxe. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for Starscream.
FOUNDATION_EXPORT double StarscreamVersionNumber;
//! Project version string for Starscream.
FOUNDATION_EXPORT const unsigned char StarscreamVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <Starscream/PublicHeader.h>
+969
View File
@@ -0,0 +1,969 @@
//////////////////////////////////////////////////////////////////////////////////////////////////
//
// Websocket.swift
//
// Created by Dalton Cherry on 7/16/14.
// Copyright (c) 2014-2016 Dalton Cherry.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//////////////////////////////////////////////////////////////////////////////////////////////////
import Foundation
import CoreFoundation
import Security
public let WebsocketDidConnectNotification = "WebsocketDidConnectNotification"
public let WebsocketDidDisconnectNotification = "WebsocketDidDisconnectNotification"
public let WebsocketDisconnectionErrorKeyName = "WebsocketDisconnectionErrorKeyName"
public protocol WebSocketDelegate: class {
func websocketDidConnect(socket: WebSocket)
func websocketDidDisconnect(socket: WebSocket, error: NSError?)
func websocketDidReceiveMessage(socket: WebSocket, text: String)
func websocketDidReceiveData(socket: WebSocket, data: Data)
}
public protocol WebSocketPongDelegate: class {
func websocketDidReceivePong(socket: WebSocket, data: Data?)
}
open class WebSocket : NSObject, StreamDelegate {
enum OpCode : UInt8 {
case continueFrame = 0x0
case textFrame = 0x1
case binaryFrame = 0x2
// 3-7 are reserved.
case connectionClose = 0x8
case ping = 0x9
case pong = 0xA
// B-F reserved.
}
public enum CloseCode : UInt16 {
case normal = 1000
case goingAway = 1001
case protocolError = 1002
case protocolUnhandledType = 1003
// 1004 reserved.
case noStatusReceived = 1005
//1006 reserved.
case encoding = 1007
case policyViolated = 1008
case messageTooBig = 1009
}
public static let ErrorDomain = "WebSocket"
enum InternalErrorCode: UInt16 {
// 0-999 WebSocket status codes not used
case outputStreamWriteError = 1
}
// Where the callback is executed. It defaults to the main UI thread queue.
public var callbackQueue = DispatchQueue.main
var optionalProtocols: [String]?
// MARK: - Constants
let headerWSUpgradeName = "Upgrade"
let headerWSUpgradeValue = "websocket"
let headerWSHostName = "Host"
let headerWSConnectionName = "Connection"
let headerWSConnectionValue = "Upgrade"
let headerWSProtocolName = "Sec-WebSocket-Protocol"
let headerWSVersionName = "Sec-WebSocket-Version"
let headerWSVersionValue = "13"
let headerWSKeyName = "Sec-WebSocket-Key"
let headerOriginName = "Origin"
let headerWSAcceptName = "Sec-WebSocket-Accept"
let BUFFER_MAX = 4096
let FinMask: UInt8 = 0x80
let OpCodeMask: UInt8 = 0x0F
let RSVMask: UInt8 = 0x70
let MaskMask: UInt8 = 0x80
let PayloadLenMask: UInt8 = 0x7F
let MaxFrameSize: Int = 32
let httpSwitchProtocolCode = 101
let supportedSSLSchemes = ["wss", "https"]
class WSResponse {
var isFin = false
var code: OpCode = .continueFrame
var bytesLeft = 0
var frameCount = 0
var buffer: NSMutableData?
}
// MARK: - Delegates
/// Responds to callback about new messages coming in over the WebSocket
/// and also connection/disconnect messages.
public weak var delegate: WebSocketDelegate?
/// Receives a callback for each pong message recived.
public weak var pongDelegate: WebSocketPongDelegate?
// MARK: - Block based API.
public var onConnect: ((Void) -> Void)?
public var onDisconnect: ((NSError?) -> Void)?
public var onText: ((String) -> Void)?
public var onData: ((Data) -> Void)?
public var onPong: ((Data?) -> Void)?
public var headers = [String: String]()
public var voipEnabled = false
public var disableSSLCertValidation = false
public var security: SSLTrustValidator?
public var enabledSSLCipherSuites: [SSLCipherSuite]?
public var origin: String?
public var timeout = 5
public var isConnected: Bool {
return connected
}
public var currentURL: URL { return url }
// MARK: - Private
private var url: URL
private var inputStream: InputStream?
private var outputStream: OutputStream?
private var connected = false
private var isConnecting = false
private var writeQueue = OperationQueue()
private var readStack = [WSResponse]()
private var inputQueue = [Data]()
private var fragBuffer: Data?
private var certValidated = false
private var didDisconnect = false
private var readyToWrite = false
private let mutex = NSLock()
private let notificationCenter = NotificationCenter.default
private var canDispatch: Bool {
mutex.lock()
let canWork = readyToWrite
mutex.unlock()
return canWork
}
/// The shared processing queue used for all WebSocket.
private static let sharedWorkQueue = DispatchQueue(label: "com.vluxe.starscream.websocket", attributes: [])
/// Used for setting protocols.
public init(url: URL, protocols: [String]? = nil) {
self.url = url
self.origin = url.absoluteString
if let hostUrl = URL (string: "/", relativeTo: url) {
var origin = hostUrl.absoluteString
origin.remove(at: origin.index(before: origin.endIndex))
self.origin = origin
}
writeQueue.maxConcurrentOperationCount = 1
optionalProtocols = protocols
}
// Used for specifically setting the QOS for the write queue.
public convenience init(url: URL, writeQueueQOS: QualityOfService, protocols: [String]? = nil) {
self.init(url: url, protocols: protocols)
writeQueue.qualityOfService = writeQueueQOS
}
/**
Connect to the WebSocket server on a background thread.
*/
open func connect() {
guard !isConnecting else { return }
didDisconnect = false
isConnecting = true
createHTTPRequest()
}
/**
Disconnect from the server. I send a Close control frame to the server, then expect the server to respond with a Close control frame and close the socket from its end. I notify my delegate once the socket has been closed.
If you supply a non-nil `forceTimeout`, I wait at most that long (in seconds) for the server to close the socket. After the timeout expires, I close the socket and notify my delegate.
If you supply a zero (or negative) `forceTimeout`, I immediately close the socket (without sending a Close control frame) and notify my delegate.
- Parameter forceTimeout: Maximum time to wait for the server to close the socket.
- Parameter closeCode: The code to send on disconnect. The default is the normal close code for cleanly disconnecting a webSocket.
*/
open func disconnect(forceTimeout: TimeInterval? = nil, closeCode: UInt16 = CloseCode.normal.rawValue) {
guard isConnected else { return }
switch forceTimeout {
case .some(let seconds) where seconds > 0:
let milliseconds = Int(seconds * 1_000)
callbackQueue.asyncAfter(deadline: .now() + .milliseconds(milliseconds)) { [weak self] in
self?.disconnectStream(nil)
}
fallthrough
case .none:
writeError(closeCode)
default:
disconnectStream(nil)
break
}
}
/**
Write a string to the websocket. This sends it as a text frame.
If you supply a non-nil completion block, I will perform it when the write completes.
- parameter string: The string to write.
- parameter completion: The (optional) completion handler.
*/
open func write(string: String, completion: (() -> ())? = nil) {
guard isConnected else { return }
dequeueWrite(string.data(using: String.Encoding.utf8)!, code: .textFrame, writeCompletion: completion)
}
/**
Write binary data to the websocket. This sends it as a binary frame.
If you supply a non-nil completion block, I will perform it when the write completes.
- parameter data: The data to write.
- parameter completion: The (optional) completion handler.
*/
open func write(data: Data, completion: (() -> ())? = nil) {
guard isConnected else { return }
dequeueWrite(data, code: .binaryFrame, writeCompletion: completion)
}
/**
Write a ping to the websocket. This sends it as a control frame.
Yodel a sound to the planet. This sends it as an astroid. http://youtu.be/Eu5ZJELRiJ8?t=42s
*/
open func write(ping: Data, completion: (() -> ())? = nil) {
guard isConnected else { return }
dequeueWrite(ping, code: .ping, writeCompletion: completion)
}
/**
Private method that starts the connection.
*/
private func createHTTPRequest() {
let urlRequest = CFHTTPMessageCreateRequest(kCFAllocatorDefault, "GET" as CFString,
url as CFURL, kCFHTTPVersion1_1).takeRetainedValue()
var port = url.port
if port == nil {
if supportedSSLSchemes.contains(url.scheme!) {
port = 443
} else {
port = 80
}
}
addHeader(urlRequest, key: headerWSUpgradeName, val: headerWSUpgradeValue)
addHeader(urlRequest, key: headerWSConnectionName, val: headerWSConnectionValue)
if let protocols = optionalProtocols {
addHeader(urlRequest, key: headerWSProtocolName, val: protocols.joined(separator: ","))
}
addHeader(urlRequest, key: headerWSVersionName, val: headerWSVersionValue)
addHeader(urlRequest, key: headerWSKeyName, val: generateWebSocketKey())
if let origin = origin {
addHeader(urlRequest, key: headerOriginName, val: origin)
}
addHeader(urlRequest, key: headerWSHostName, val: "\(url.host!):\(port!)")
for (key, value) in headers {
addHeader(urlRequest, key: key, val: value)
}
if let cfHTTPMessage = CFHTTPMessageCopySerializedMessage(urlRequest) {
let serializedRequest = cfHTTPMessage.takeRetainedValue()
initStreamsWithData(serializedRequest as Data, Int(port!))
}
}
/**
Add a header to the CFHTTPMessage by using the NSString bridges to CFString
*/
private func addHeader(_ urlRequest: CFHTTPMessage, key: String, val: String) {
CFHTTPMessageSetHeaderFieldValue(urlRequest, key as CFString, val as CFString)
}
/**
Generate a WebSocket key as needed in RFC.
*/
private func generateWebSocketKey() -> String {
var key = ""
let seed = 16
for _ in 0..<seed {
let uni = UnicodeScalar(UInt32(97 + arc4random_uniform(25)))
key += "\(Character(uni!))"
}
let data = key.data(using: String.Encoding.utf8)
let baseKey = data?.base64EncodedString(options: NSData.Base64EncodingOptions(rawValue: 0))
return baseKey!
}
/**
Start the stream connection and write the data to the output stream.
*/
private func initStreamsWithData(_ data: Data, _ port: Int) {
//higher level API we will cut over to at some point
//NSStream.getStreamsToHostWithName(url.host, port: url.port.integerValue, inputStream: &inputStream, outputStream: &outputStream)
// Disconnect and clean up any existing streams before setting up a new pair
disconnectStream(nil, runDelegate: false)
var readStream: Unmanaged<CFReadStream>?
var writeStream: Unmanaged<CFWriteStream>?
let h = url.host! as NSString
CFStreamCreatePairWithSocketToHost(nil, h, UInt32(port), &readStream, &writeStream)
inputStream = readStream!.takeRetainedValue()
outputStream = writeStream!.takeRetainedValue()
guard let inStream = inputStream, let outStream = outputStream else { return }
inStream.delegate = self
outStream.delegate = self
if supportedSSLSchemes.contains(url.scheme!) {
certValidated = false
inStream.setProperty(StreamSocketSecurityLevel.negotiatedSSL as AnyObject, forKey: Stream.PropertyKey.socketSecurityLevelKey)
outStream.setProperty(StreamSocketSecurityLevel.negotiatedSSL as AnyObject, forKey: Stream.PropertyKey.socketSecurityLevelKey)
if disableSSLCertValidation {
let settings: [NSObject: NSObject] = [kCFStreamSSLValidatesCertificateChain: NSNumber(value: false), kCFStreamSSLPeerName: kCFNull]
inStream.setProperty(settings, forKey: kCFStreamPropertySSLSettings as Stream.PropertyKey)
outStream.setProperty(settings, forKey: kCFStreamPropertySSLSettings as Stream.PropertyKey)
}
if let cipherSuites = self.enabledSSLCipherSuites {
if let sslContextIn = CFReadStreamCopyProperty(inputStream, CFStreamPropertyKey(rawValue: kCFStreamPropertySSLContext)) as! SSLContext?,
let sslContextOut = CFWriteStreamCopyProperty(outputStream, CFStreamPropertyKey(rawValue: kCFStreamPropertySSLContext)) as! SSLContext? {
let resIn = SSLSetEnabledCiphers(sslContextIn, cipherSuites, cipherSuites.count)
let resOut = SSLSetEnabledCiphers(sslContextOut, cipherSuites, cipherSuites.count)
if resIn != errSecSuccess {
let error = self.errorWithDetail("Error setting ingoing cypher suites", code: UInt16(resIn))
disconnectStream(error)
return
}
if resOut != errSecSuccess {
let error = self.errorWithDetail("Error setting outgoing cypher suites", code: UInt16(resOut))
disconnectStream(error)
return
}
}
}
} else {
certValidated = true //not a https session, so no need to check SSL pinning
}
if voipEnabled {
inStream.setProperty(StreamNetworkServiceTypeValue.voIP as AnyObject, forKey: Stream.PropertyKey.networkServiceType)
outStream.setProperty(StreamNetworkServiceTypeValue.voIP as AnyObject, forKey: Stream.PropertyKey.networkServiceType)
}
CFReadStreamSetDispatchQueue(inStream, WebSocket.sharedWorkQueue)
CFWriteStreamSetDispatchQueue(outStream, WebSocket.sharedWorkQueue)
inStream.open()
outStream.open()
self.mutex.lock()
self.readyToWrite = true
self.mutex.unlock()
let bytes = UnsafeRawPointer((data as NSData).bytes).assumingMemoryBound(to: UInt8.self)
var out = timeout * 1_000_000 // wait 5 seconds before giving up
let operation = BlockOperation()
operation.addExecutionBlock { [weak self, weak operation] in
guard let sOperation = operation else { return }
while !outStream.hasSpaceAvailable && !sOperation.isCancelled {
usleep(100) // wait until the socket is ready
guard !sOperation.isCancelled else { return }
out -= 100
if out < 0 {
WebSocket.sharedWorkQueue.async {
self?.cleanupStream()
}
self?.doDisconnect(self?.errorWithDetail("write wait timed out", code: 2))
return
} else if outStream.streamError != nil {
return // disconnectStream will be called.
}
}
guard !sOperation.isCancelled, let s = self else { return }
// Do the pinning now if needed
if let sec = s.security, !s.certValidated {
let trust = outStream.property(forKey: kCFStreamPropertySSLPeerTrust as Stream.PropertyKey) as! SecTrust
let domain = outStream.property(forKey: kCFStreamSSLPeerName as Stream.PropertyKey) as? String
s.certValidated = sec.isValid(trust, domain: domain)
if !s.certValidated {
WebSocket.sharedWorkQueue.async {
let error = s.errorWithDetail("Invalid SSL certificate", code: 1)
s.disconnectStream(error)
}
return
}
}
outStream.write(bytes, maxLength: data.count)
}
writeQueue.addOperation(operation)
}
/**
Delegate for the stream methods. Processes incoming bytes
*/
open func stream(_ aStream: Stream, handle eventCode: Stream.Event) {
if eventCode == .hasBytesAvailable {
if aStream == inputStream {
processInputStream()
}
} else if eventCode == .errorOccurred {
disconnectStream(aStream.streamError as NSError?)
} else if eventCode == .endEncountered {
disconnectStream(nil)
}
}
/**
Disconnect the stream object and notifies the delegate.
*/
private func disconnectStream(_ error: NSError?, runDelegate: Bool = true) {
if error == nil {
writeQueue.waitUntilAllOperationsAreFinished()
} else {
writeQueue.cancelAllOperations()
}
cleanupStream()
connected = false
if runDelegate {
doDisconnect(error)
}
}
/**
cleanup the streams.
*/
private func cleanupStream() {
outputStream?.delegate = nil
inputStream?.delegate = nil
if let stream = inputStream {
CFReadStreamSetDispatchQueue(stream, nil)
stream.close()
}
if let stream = outputStream {
CFWriteStreamSetDispatchQueue(stream, nil)
stream.close()
}
outputStream = nil
inputStream = nil
fragBuffer = nil
}
/**
Handles the incoming bytes and sending them to the proper processing method.
*/
private func processInputStream() {
let buf = NSMutableData(capacity: BUFFER_MAX)
let buffer = UnsafeMutableRawPointer(mutating: buf!.bytes).assumingMemoryBound(to: UInt8.self)
let length = inputStream!.read(buffer, maxLength: BUFFER_MAX)
guard length > 0 else { return }
var process = false
if inputQueue.count == 0 {
process = true
}
inputQueue.append(Data(bytes: buffer, count: length))
if process {
dequeueInput()
}
}
/**
Dequeue the incoming input so it is processed in order.
*/
private func dequeueInput() {
while !inputQueue.isEmpty {
autoreleasepool {
let data = inputQueue[0]
var work = data
if let buffer = fragBuffer {
var combine = NSData(data: buffer) as Data
combine.append(data)
work = combine
fragBuffer = nil
}
let buffer = UnsafeRawPointer((work as NSData).bytes).assumingMemoryBound(to: UInt8.self)
let length = work.count
if !connected {
processTCPHandshake(buffer, bufferLen: length)
} else {
processRawMessagesInBuffer(buffer, bufferLen: length)
}
inputQueue = inputQueue.filter{ $0 != data }
}
}
}
/**
Handle checking the inital connection status
*/
private func processTCPHandshake(_ buffer: UnsafePointer<UInt8>, bufferLen: Int) {
let code = processHTTP(buffer, bufferLen: bufferLen)
switch code {
case 0:
break
case -1:
fragBuffer = Data(bytes: buffer, count: bufferLen)
break // do nothing, we are going to collect more data
default:
doDisconnect(errorWithDetail("Invalid HTTP upgrade", code: UInt16(code)))
}
}
/**
Finds the HTTP Packet in the TCP stream, by looking for the CRLF.
*/
private func processHTTP(_ buffer: UnsafePointer<UInt8>, bufferLen: Int) -> Int {
let CRLFBytes = [UInt8(ascii: "\r"), UInt8(ascii: "\n"), UInt8(ascii: "\r"), UInt8(ascii: "\n")]
var k = 0
var totalSize = 0
for i in 0..<bufferLen {
if buffer[i] == CRLFBytes[k] {
k += 1
if k == 3 {
totalSize = i + 1
break
}
} else {
k = 0
}
}
if totalSize > 0 {
let code = validateResponse(buffer, bufferLen: totalSize)
if code != 0 {
return code
}
isConnecting = false
connected = true
didDisconnect = false
if canDispatch {
callbackQueue.async { [weak self] in
guard let s = self else { return }
s.onConnect?()
s.delegate?.websocketDidConnect(socket: s)
s.notificationCenter.post(name: NSNotification.Name(WebsocketDidConnectNotification), object: self)
}
}
totalSize += 1 //skip the last \n
let restSize = bufferLen - totalSize
if restSize > 0 {
processRawMessagesInBuffer(buffer + totalSize, bufferLen: restSize)
}
return 0 //success
}
return -1 // Was unable to find the full TCP header.
}
/**
Validates the HTTP is a 101 as per the RFC spec.
*/
private func validateResponse(_ buffer: UnsafePointer<UInt8>, bufferLen: Int) -> Int {
let response = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, false).takeRetainedValue()
CFHTTPMessageAppendBytes(response, buffer, bufferLen)
let code = CFHTTPMessageGetResponseStatusCode(response)
if code != httpSwitchProtocolCode {
return code
}
if let cfHeaders = CFHTTPMessageCopyAllHeaderFields(response) {
let headers = cfHeaders.takeRetainedValue() as NSDictionary
if let acceptKey = headers[headerWSAcceptName as NSString] as? NSString {
if acceptKey.length > 0 {
return 0
}
}
}
return -1
}
/**
Read a 16 bit big endian value from a buffer
*/
private static func readUint16(_ buffer: UnsafePointer<UInt8>, offset: Int) -> UInt16 {
return (UInt16(buffer[offset + 0]) << 8) | UInt16(buffer[offset + 1])
}
/**
Read a 64 bit big endian value from a buffer
*/
private static func readUint64(_ buffer: UnsafePointer<UInt8>, offset: Int) -> UInt64 {
var value = UInt64(0)
for i in 0...7 {
value = (value << 8) | UInt64(buffer[offset + i])
}
return value
}
/**
Write a 16-bit big endian value to a buffer.
*/
private static func writeUint16(_ buffer: UnsafeMutablePointer<UInt8>, offset: Int, value: UInt16) {
buffer[offset + 0] = UInt8(value >> 8)
buffer[offset + 1] = UInt8(value & 0xff)
}
/**
Write a 64-bit big endian value to a buffer.
*/
private static func writeUint64(_ buffer: UnsafeMutablePointer<UInt8>, offset: Int, value: UInt64) {
for i in 0...7 {
buffer[offset + i] = UInt8((value >> (8*UInt64(7 - i))) & 0xff)
}
}
/**
Process one message at the start of `buffer`. Return another buffer (sharing storage) that contains the leftover contents of `buffer` that I didn't process.
*/
private func processOneRawMessage(inBuffer buffer: UnsafeBufferPointer<UInt8>) -> UnsafeBufferPointer<UInt8> {
let response = readStack.last
guard let baseAddress = buffer.baseAddress else {return emptyBuffer}
let bufferLen = buffer.count
if response != nil && bufferLen < 2 {
fragBuffer = Data(buffer: buffer)
return emptyBuffer
}
if let response = response, response.bytesLeft > 0 {
var len = response.bytesLeft
var extra = bufferLen - response.bytesLeft
if response.bytesLeft > bufferLen {
len = bufferLen
extra = 0
}
response.bytesLeft -= len
response.buffer?.append(Data(bytes: baseAddress, count: len))
_ = processResponse(response)
return buffer.fromOffset(bufferLen - extra)
} else {
let isFin = (FinMask & baseAddress[0])
let receivedOpcodeRawValue = (OpCodeMask & baseAddress[0])
let receivedOpcode = OpCode(rawValue: receivedOpcodeRawValue)
let isMasked = (MaskMask & baseAddress[1])
let payloadLen = (PayloadLenMask & baseAddress[1])
var offset = 2
if (isMasked > 0 || (RSVMask & baseAddress[0]) > 0) && receivedOpcode != .pong {
let errCode = CloseCode.protocolError.rawValue
doDisconnect(errorWithDetail("masked and rsv data is not currently supported", code: errCode))
writeError(errCode)
return emptyBuffer
}
let isControlFrame = (receivedOpcode == .connectionClose || receivedOpcode == .ping)
if !isControlFrame && (receivedOpcode != .binaryFrame && receivedOpcode != .continueFrame &&
receivedOpcode != .textFrame && receivedOpcode != .pong) {
let errCode = CloseCode.protocolError.rawValue
doDisconnect(errorWithDetail("unknown opcode: \(receivedOpcodeRawValue)", code: errCode))
writeError(errCode)
return emptyBuffer
}
if isControlFrame && isFin == 0 {
let errCode = CloseCode.protocolError.rawValue
doDisconnect(errorWithDetail("control frames can't be fragmented", code: errCode))
writeError(errCode)
return emptyBuffer
}
var closeCode = CloseCode.normal.rawValue
if receivedOpcode == .connectionClose {
if payloadLen == 1 {
closeCode = CloseCode.protocolError.rawValue
} else if payloadLen > 1 {
closeCode = WebSocket.readUint16(baseAddress, offset: offset)
if closeCode < 1000 || (closeCode > 1003 && closeCode < 1007) || (closeCode > 1011 && closeCode < 3000) {
closeCode = CloseCode.protocolError.rawValue
}
}
if payloadLen < 2 {
doDisconnect(errorWithDetail("connection closed by server", code: closeCode))
writeError(closeCode)
return emptyBuffer
}
} else if isControlFrame && payloadLen > 125 {
writeError(CloseCode.protocolError.rawValue)
return emptyBuffer
}
var dataLength = UInt64(payloadLen)
if dataLength == 127 {
dataLength = WebSocket.readUint64(baseAddress, offset: offset)
offset += MemoryLayout<UInt64>.size
} else if dataLength == 126 {
dataLength = UInt64(WebSocket.readUint16(baseAddress, offset: offset))
offset += MemoryLayout<UInt16>.size
}
if bufferLen < offset || UInt64(bufferLen - offset) < dataLength {
fragBuffer = Data(bytes: baseAddress, count: bufferLen)
return emptyBuffer
}
var len = dataLength
if dataLength > UInt64(bufferLen) {
len = UInt64(bufferLen-offset)
}
if receivedOpcode == .connectionClose && len > 0 {
let size = MemoryLayout<UInt16>.size
offset += size
len -= UInt64(size)
}
let data = Data(bytes: baseAddress+offset, count: Int(len))
if receivedOpcode == .connectionClose {
var closeReason = "connection closed by server"
if let customCloseReason = String(data: data, encoding: .utf8) {
closeReason = customCloseReason
} else {
closeCode = CloseCode.protocolError.rawValue
}
doDisconnect(errorWithDetail(closeReason, code: closeCode))
writeError(closeCode)
return emptyBuffer
}
if receivedOpcode == .pong {
if canDispatch {
callbackQueue.async { [weak self] in
guard let s = self else { return }
let pongData: Data? = data.count > 0 ? data : nil
s.onPong?(pongData)
s.pongDelegate?.websocketDidReceivePong(socket: s, data: pongData)
}
}
return buffer.fromOffset(offset + Int(len))
}
var response = readStack.last
if isControlFrame {
response = nil // Don't append pings.
}
if isFin == 0 && receivedOpcode == .continueFrame && response == nil {
let errCode = CloseCode.protocolError.rawValue
doDisconnect(errorWithDetail("continue frame before a binary or text frame", code: errCode))
writeError(errCode)
return emptyBuffer
}
var isNew = false
if response == nil {
if receivedOpcode == .continueFrame {
let errCode = CloseCode.protocolError.rawValue
doDisconnect(errorWithDetail("first frame can't be a continue frame",
code: errCode))
writeError(errCode)
return emptyBuffer
}
isNew = true
response = WSResponse()
response!.code = receivedOpcode!
response!.bytesLeft = Int(dataLength)
response!.buffer = NSMutableData(data: data)
} else {
if receivedOpcode == .continueFrame {
response!.bytesLeft = Int(dataLength)
} else {
let errCode = CloseCode.protocolError.rawValue
doDisconnect(errorWithDetail("second and beyond of fragment message must be a continue frame",
code: errCode))
writeError(errCode)
return emptyBuffer
}
response!.buffer!.append(data)
}
if let response = response {
response.bytesLeft -= Int(len)
response.frameCount += 1
response.isFin = isFin > 0 ? true : false
if isNew {
readStack.append(response)
}
_ = processResponse(response)
}
let step = Int(offset + numericCast(len))
return buffer.fromOffset(step)
}
}
/**
Process all messages in the buffer if possible.
*/
private func processRawMessagesInBuffer(_ pointer: UnsafePointer<UInt8>, bufferLen: Int) {
var buffer = UnsafeBufferPointer(start: pointer, count: bufferLen)
repeat {
buffer = processOneRawMessage(inBuffer: buffer)
} while buffer.count >= 2
if buffer.count > 0 {
fragBuffer = Data(buffer: buffer)
}
}
/**
Process the finished response of a buffer.
*/
private func processResponse(_ response: WSResponse) -> Bool {
if response.isFin && response.bytesLeft <= 0 {
if response.code == .ping {
let data = response.buffer! // local copy so it is perverse for writing
dequeueWrite(data as Data, code: .pong)
} else if response.code == .textFrame {
let str: NSString? = NSString(data: response.buffer! as Data, encoding: String.Encoding.utf8.rawValue)
if str == nil {
writeError(CloseCode.encoding.rawValue)
return false
}
if canDispatch {
callbackQueue.async { [weak self] in
guard let s = self else { return }
s.onText?(str! as String)
s.delegate?.websocketDidReceiveMessage(socket: s, text: str! as String)
}
}
} else if response.code == .binaryFrame {
if canDispatch {
let data = response.buffer! // local copy so it is perverse for writing
callbackQueue.async { [weak self] in
guard let s = self else { return }
s.onData?(data as Data)
s.delegate?.websocketDidReceiveData(socket: s, data: data as Data)
}
}
}
readStack.removeLast()
return true
}
return false
}
/**
Create an error
*/
private func errorWithDetail(_ detail: String, code: UInt16) -> NSError {
var details = [String: String]()
details[NSLocalizedDescriptionKey] = detail
return NSError(domain: WebSocket.ErrorDomain, code: Int(code), userInfo: details)
}
/**
Write an error to the socket
*/
private func writeError(_ code: UInt16) {
let buf = NSMutableData(capacity: MemoryLayout<UInt16>.size)
let buffer = UnsafeMutableRawPointer(mutating: buf!.bytes).assumingMemoryBound(to: UInt8.self)
WebSocket.writeUint16(buffer, offset: 0, value: code)
dequeueWrite(Data(bytes: buffer, count: MemoryLayout<UInt16>.size), code: .connectionClose)
}
/**
Used to write things to the stream
*/
private func dequeueWrite(_ data: Data, code: OpCode, writeCompletion: (() -> ())? = nil) {
let operation = BlockOperation()
operation.addExecutionBlock { [weak self, weak operation] in
//stream isn't ready, let's wait
guard let s = self else { return }
guard let sOperation = operation else { return }
var offset = 2
let dataLength = data.count
let frame = NSMutableData(capacity: dataLength + s.MaxFrameSize)
let buffer = UnsafeMutableRawPointer(frame!.mutableBytes).assumingMemoryBound(to: UInt8.self)
buffer[0] = s.FinMask | code.rawValue
if dataLength < 126 {
buffer[1] = CUnsignedChar(dataLength)
} else if dataLength <= Int(UInt16.max) {
buffer[1] = 126
WebSocket.writeUint16(buffer, offset: offset, value: UInt16(dataLength))
offset += MemoryLayout<UInt16>.size
} else {
buffer[1] = 127
WebSocket.writeUint64(buffer, offset: offset, value: UInt64(dataLength))
offset += MemoryLayout<UInt64>.size
}
buffer[1] |= s.MaskMask
let maskKey = UnsafeMutablePointer<UInt8>(buffer + offset)
_ = SecRandomCopyBytes(kSecRandomDefault, Int(MemoryLayout<UInt32>.size), maskKey)
offset += MemoryLayout<UInt32>.size
for i in 0..<dataLength {
buffer[offset] = data[i] ^ maskKey[i % MemoryLayout<UInt32>.size]
offset += 1
}
var total = 0
while !sOperation.isCancelled {
guard let outStream = s.outputStream else { break }
let writeBuffer = UnsafeRawPointer(frame!.bytes+total).assumingMemoryBound(to: UInt8.self)
let len = outStream.write(writeBuffer, maxLength: offset-total)
if len < 0 {
var error: Error?
if let streamError = outStream.streamError {
error = streamError
} else {
let errCode = InternalErrorCode.outputStreamWriteError.rawValue
error = s.errorWithDetail("output stream error during write", code: errCode)
}
s.doDisconnect(error as NSError?)
break
} else {
total += len
}
if total >= offset {
if let queue = self?.callbackQueue, let callback = writeCompletion {
queue.async {
callback()
}
}
break
}
}
}
writeQueue.addOperation(operation)
}
/**
Used to preform the disconnect delegate
*/
private func doDisconnect(_ error: NSError?) {
guard !didDisconnect else { return }
didDisconnect = true
isConnecting = false
connected = false
guard canDispatch else {return}
callbackQueue.async { [weak self] in
guard let s = self else { return }
s.onDisconnect?(error)
s.delegate?.websocketDidDisconnect(socket: s, error: error)
let userInfo = error.map{ [WebsocketDisconnectionErrorKeyName: $0] }
s.notificationCenter.post(name: NSNotification.Name(WebsocketDidDisconnectNotification), object: self, userInfo: userInfo)
}
}
// MARK: - Deinit
deinit {
mutex.lock()
readyToWrite = false
mutex.unlock()
cleanupStream()
writeQueue.cancelAllOperations()
}
}
private extension Data {
init(buffer: UnsafeBufferPointer<UInt8>) {
self.init(bytes: buffer.baseAddress!, count: buffer.count)
}
}
private extension UnsafeBufferPointer {
func fromOffset(_ offset: Int) -> UnsafeBufferPointer<Element> {
return UnsafeBufferPointer<Element>(start: baseAddress?.advanced(by: offset), count: count - offset)
}
}
private let emptyBuffer = UnsafeBufferPointer<UInt8>(start: nil, count: 0)
+15
View File
@@ -0,0 +1,15 @@
Pod::Spec.new do |s|
s.name = "Starscream"
s.version = "2.0.4"
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'
s.author = {'Dalton Cherry' => 'http://daltoniam.com', 'Austin Cherry' => 'http://austincherry.me'}
s.source = { :git => 'https://github.com/daltoniam/Starscream.git', :tag => "#{s.version}"}
s.social_media_url = 'http://twitter.com/daltoniam'
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '9.0'
s.source_files = 'Source/*.swift'
s.requires_arc = 'true'
end
+904
View File
@@ -0,0 +1,904 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
091277A11BD673A70003036D /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 091277971BD673A70003036D /* Starscream.framework */; };
5C1360021C473BEF00AA3A01 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C135FFF1C473BEF00AA3A01 /* SSLSecurity.swift */; };
5C1360031C473BEF00AA3A01 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C135FFF1C473BEF00AA3A01 /* SSLSecurity.swift */; };
5C1360041C473BEF00AA3A01 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C135FFF1C473BEF00AA3A01 /* SSLSecurity.swift */; };
5C1360051C473BEF00AA3A01 /* Starscream.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1360001C473BEF00AA3A01 /* Starscream.h */; settings = {ATTRIBUTES = (Public, ); }; };
5C1360061C473BEF00AA3A01 /* Starscream.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1360001C473BEF00AA3A01 /* Starscream.h */; settings = {ATTRIBUTES = (Public, ); }; };
5C1360071C473BEF00AA3A01 /* Starscream.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1360001C473BEF00AA3A01 /* Starscream.h */; settings = {ATTRIBUTES = (Public, ); }; };
5C1360081C473BEF00AA3A01 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C1360011C473BEF00AA3A01 /* WebSocket.swift */; };
5C1360091C473BEF00AA3A01 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C1360011C473BEF00AA3A01 /* WebSocket.swift */; };
5C13600A1C473BEF00AA3A01 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C1360011C473BEF00AA3A01 /* WebSocket.swift */; };
742419BC1DC6BDBA003ACE43 /* StarscreamTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 742419BB1DC6BDBA003ACE43 /* StarscreamTests.swift */; };
742419BD1DC6BDBA003ACE43 /* StarscreamTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 742419BB1DC6BDBA003ACE43 /* StarscreamTests.swift */; };
742419BE1DC6BDBA003ACE43 /* StarscreamTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 742419BB1DC6BDBA003ACE43 /* StarscreamTests.swift */; };
D9C3E36A19E48FF1009FC285 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9C3E35F19E48FF1009FC285 /* Starscream.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
091277A21BD673A70003036D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6B3E79DD19D48B7F006071F7 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 091277961BD673A70003036D;
remoteInfo = StarscreamTv;
};
D9C3E36B19E48FF1009FC285 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6B3E79DD19D48B7F006071F7 /* Project object */;
proxyType = 1;
remoteGlobalIDString = D9C3E35E19E48FF1009FC285;
remoteInfo = StarscreamOSX;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
091277971BD673A70003036D /* Starscream.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Starscream.framework; 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 /* 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>"; };
742419BB1DC6BDBA003ACE43 /* StarscreamTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = StarscreamTests.swift; path = StarscreamTests/StarscreamTests.swift; sourceTree = "<group>"; };
D9C3E35F19E48FF1009FC285 /* Starscream.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Starscream.framework; 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 */
091277931BD673A70003036D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
0912779D1BD673A70003036D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
091277A11BD673A70003036D /* Starscream.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
6B3E79E219D48B7F006071F7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
6B3E79EE19D48B7F006071F7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D9C3E35B19E48FF1009FC285 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D9C3E36619E48FF1009FC285 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D9C3E36A19E48FF1009FC285 /* Starscream.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
6B3E79DC19D48B7F006071F7 = {
isa = PBXGroup;
children = (
6B3E79E819D48B7F006071F7 /* Starscream */,
6B3E79FF19D48C2F006071F7 /* Tests */,
6B3E79E719D48B7F006071F7 /* Products */,
);
sourceTree = "<group>";
};
6B3E79E719D48B7F006071F7 /* Products */ = {
isa = PBXGroup;
children = (
6B3E79E619D48B7F006071F7 /* Starscream.framework */,
6B3E79F119D48B7F006071F7 /* Starscream iOSTests.xctest */,
D9C3E35F19E48FF1009FC285 /* Starscream.framework */,
D9C3E36919E48FF1009FC285 /* Starscream OSXTests.xctest */,
091277971BD673A70003036D /* Starscream.framework */,
091277A01BD673A70003036D /* Starscream tvOSTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
6B3E79E819D48B7F006071F7 /* Starscream */ = {
isa = PBXGroup;
children = (
5C1360001C473BEF00AA3A01 /* Starscream.h */,
5C135FFF1C473BEF00AA3A01 /* SSLSecurity.swift */,
5C1360011C473BEF00AA3A01 /* WebSocket.swift */,
6B3E79E919D48B7F006071F7 /* Supporting Files */,
);
path = Starscream;
sourceTree = "<group>";
};
6B3E79E919D48B7F006071F7 /* Supporting Files */ = {
isa = PBXGroup;
children = (
5C13600B1C473BFE00AA3A01 /* Info-tvOS.plist */,
5C13600C1C473BFE00AA3A01 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
6B3E79FF19D48C2F006071F7 /* Tests */ = {
isa = PBXGroup;
children = (
6B3E7A0019D48C2F006071F7 /* Info.plist */,
742419BB1DC6BDBA003ACE43 /* StarscreamTests.swift */,
);
path = Tests;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
091277941BD673A70003036D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
5C1360071C473BEF00AA3A01 /* Starscream.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
6B3E79E319D48B7F006071F7 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
5C1360051C473BEF00AA3A01 /* Starscream.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D9C3E35C19E48FF1009FC285 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
5C1360061C473BEF00AA3A01 /* Starscream.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
091277961BD673A70003036D /* Starscream tvOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 091277A81BD673A70003036D /* Build configuration list for PBXNativeTarget "Starscream tvOS" */;
buildPhases = (
091277921BD673A70003036D /* Sources */,
091277931BD673A70003036D /* Frameworks */,
091277941BD673A70003036D /* Headers */,
091277951BD673A70003036D /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Starscream tvOS";
productName = StarscreamTv;
productReference = 091277971BD673A70003036D /* Starscream.framework */;
productType = "com.apple.product-type.framework";
};
0912779F1BD673A70003036D /* Starscream tvOSTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 091277AB1BD673A70003036D /* Build configuration list for PBXNativeTarget "Starscream tvOSTests" */;
buildPhases = (
0912779C1BD673A70003036D /* Sources */,
0912779D1BD673A70003036D /* Frameworks */,
0912779E1BD673A70003036D /* Resources */,
);
buildRules = (
);
dependencies = (
091277A31BD673A70003036D /* PBXTargetDependency */,
);
name = "Starscream tvOSTests";
productName = StarscreamTvTests;
productReference = 091277A01BD673A70003036D /* Starscream tvOSTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
6B3E79E519D48B7F006071F7 /* Starscream iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6B3E79F919D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream iOS" */;
buildPhases = (
6B3E79E119D48B7F006071F7 /* Sources */,
6B3E79E219D48B7F006071F7 /* Frameworks */,
6B3E79E319D48B7F006071F7 /* Headers */,
6B3E79E419D48B7F006071F7 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Starscream iOS";
productName = Starscream;
productReference = 6B3E79E619D48B7F006071F7 /* Starscream.framework */;
productType = "com.apple.product-type.framework";
};
6B3E79F019D48B7F006071F7 /* Starscream iOSTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6B3E79FC19D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream iOSTests" */;
buildPhases = (
6B3E79ED19D48B7F006071F7 /* Sources */,
6B3E79EE19D48B7F006071F7 /* Frameworks */,
6B3E79EF19D48B7F006071F7 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Starscream iOSTests";
productName = StarscreamTests;
productReference = 6B3E79F119D48B7F006071F7 /* Starscream iOSTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
D9C3E35E19E48FF1009FC285 /* Starscream OSX */ = {
isa = PBXNativeTarget;
buildConfigurationList = D9C3E37619E48FF1009FC285 /* Build configuration list for PBXNativeTarget "Starscream OSX" */;
buildPhases = (
D9C3E35A19E48FF1009FC285 /* Sources */,
D9C3E35B19E48FF1009FC285 /* Frameworks */,
D9C3E35C19E48FF1009FC285 /* Headers */,
D9C3E35D19E48FF1009FC285 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Starscream OSX";
productName = StarscreamOSX;
productReference = D9C3E35F19E48FF1009FC285 /* Starscream.framework */;
productType = "com.apple.product-type.framework";
};
D9C3E36819E48FF1009FC285 /* Starscream OSXTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = D9C3E37719E48FF1009FC285 /* Build configuration list for PBXNativeTarget "Starscream OSXTests" */;
buildPhases = (
D9C3E36519E48FF1009FC285 /* Sources */,
D9C3E36619E48FF1009FC285 /* Frameworks */,
D9C3E36719E48FF1009FC285 /* Resources */,
);
buildRules = (
);
dependencies = (
D9C3E36C19E48FF1009FC285 /* PBXTargetDependency */,
);
name = "Starscream OSXTests";
productName = StarscreamOSXTests;
productReference = D9C3E36919E48FF1009FC285 /* Starscream OSXTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
6B3E79DD19D48B7F006071F7 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = Vluxe;
TargetAttributes = {
091277961BD673A70003036D = {
CreatedOnToolsVersion = 7.1;
};
0912779F1BD673A70003036D = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0810;
};
6B3E79E519D48B7F006071F7 = {
CreatedOnToolsVersion = 6.0.1;
LastSwiftMigration = 0800;
};
6B3E79F019D48B7F006071F7 = {
CreatedOnToolsVersion = 6.0.1;
LastSwiftMigration = 0810;
};
D9C3E35E19E48FF1009FC285 = {
CreatedOnToolsVersion = 6.1;
};
D9C3E36819E48FF1009FC285 = {
CreatedOnToolsVersion = 6.1;
LastSwiftMigration = 0810;
};
};
};
buildConfigurationList = 6B3E79E019D48B7F006071F7 /* Build configuration list for PBXProject "Starscream" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 6B3E79DC19D48B7F006071F7;
productRefGroup = 6B3E79E719D48B7F006071F7 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
6B3E79E519D48B7F006071F7 /* Starscream iOS */,
6B3E79F019D48B7F006071F7 /* Starscream iOSTests */,
D9C3E35E19E48FF1009FC285 /* Starscream OSX */,
D9C3E36819E48FF1009FC285 /* Starscream OSXTests */,
091277961BD673A70003036D /* Starscream tvOS */,
0912779F1BD673A70003036D /* Starscream tvOSTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
091277951BD673A70003036D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
0912779E1BD673A70003036D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
6B3E79E419D48B7F006071F7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
6B3E79EF19D48B7F006071F7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D9C3E35D19E48FF1009FC285 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D9C3E36719E48FF1009FC285 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
091277921BD673A70003036D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5C13600A1C473BEF00AA3A01 /* WebSocket.swift in Sources */,
5C1360041C473BEF00AA3A01 /* SSLSecurity.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0912779C1BD673A70003036D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
742419BE1DC6BDBA003ACE43 /* StarscreamTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
6B3E79E119D48B7F006071F7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5C1360081C473BEF00AA3A01 /* WebSocket.swift in Sources */,
5C1360021C473BEF00AA3A01 /* SSLSecurity.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
6B3E79ED19D48B7F006071F7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
742419BC1DC6BDBA003ACE43 /* StarscreamTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D9C3E35A19E48FF1009FC285 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5C1360091C473BEF00AA3A01 /* WebSocket.swift in Sources */,
5C1360031C473BEF00AA3A01 /* SSLSecurity.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D9C3E36519E48FF1009FC285 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
742419BD1DC6BDBA003ACE43 /* StarscreamTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
091277A31BD673A70003036D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 091277961BD673A70003036D /* Starscream tvOS */;
targetProxy = 091277A21BD673A70003036D /* PBXContainerItemProxy */;
};
D9C3E36C19E48FF1009FC285 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D9C3E35E19E48FF1009FC285 /* Starscream OSX */;
targetProxy = D9C3E36B19E48FF1009FC285 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
091277A91BD673A70003036D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = marker;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "$(SRCROOT)/Source/Info-tvOS.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.vluxe.Starscream;
PRODUCT_NAME = Starscream;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
};
091277AA1BD673A70003036D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = bitcode;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "$(SRCROOT)/Source/Info-tvOS.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.vluxe.Starscream;
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;
};
name = Release;
};
091277AC1BD673A70003036D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
CLANG_ENABLE_MODULES = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.vluxe.StarscreamTvTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
};
091277AD1BD673A70003036D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
CLANG_ENABLE_MODULES = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
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;
};
6B3E79F719D48B7F006071F7 /* Debug */ = {
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;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
ENABLE_STRICT_OBJC_MSGSEND = YES;
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",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
6B3E79F819D48B7F006071F7 /* Release */ = {
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;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 1;
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;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
6B3E79FA19D48B7F006071F7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BITCODE_GENERATION_MODE = marker;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Starscream;
PROVISIONING_PROFILE = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
6B3E79FB19D48B7F006071F7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
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;
CLANG_ENABLE_MODULES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
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 = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
6B3E79FE19D48B7F006071F7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
CLANG_ENABLE_MODULES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
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;
};
D9C3E37219E48FF1009FC285 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Starscream;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VALID_ARCHS = x86_64;
};
name = Debug;
};
D9C3E37319E48FF1009FC285 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Starscream;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
VALID_ARCHS = x86_64;
};
name = Release;
};
D9C3E37419E48FF1009FC285 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
CLANG_ENABLE_MODULES = YES;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
D9C3E37519E48FF1009FC285 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
CLANG_ENABLE_MODULES = YES;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
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 "Starscream tvOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
091277A91BD673A70003036D /* Debug */,
091277AA1BD673A70003036D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
091277AB1BD673A70003036D /* Build configuration list for PBXNativeTarget "Starscream tvOSTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
091277AC1BD673A70003036D /* Debug */,
091277AD1BD673A70003036D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6B3E79E019D48B7F006071F7 /* Build configuration list for PBXProject "Starscream" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6B3E79F719D48B7F006071F7 /* Debug */,
6B3E79F819D48B7F006071F7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6B3E79F919D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6B3E79FA19D48B7F006071F7 /* Debug */,
6B3E79FB19D48B7F006071F7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6B3E79FC19D48B7F006071F7 /* Build configuration list for PBXNativeTarget "Starscream iOSTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6B3E79FD19D48B7F006071F7 /* Debug */,
6B3E79FE19D48B7F006071F7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D9C3E37619E48FF1009FC285 /* Build configuration list for PBXNativeTarget "Starscream OSX" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D9C3E37219E48FF1009FC285 /* Debug */,
D9C3E37319E48FF1009FC285 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D9C3E37719E48FF1009FC285 /* Build configuration list for PBXNativeTarget "Starscream OSXTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D9C3E37419E48FF1009FC285 /* Debug */,
D9C3E37519E48FF1009FC285 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 6B3E79DD19D48B7F006071F7 /* Project object */;
}
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79E519D48B7F006071F7"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream iOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79E519D48B7F006071F7"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream iOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79E519D48B7F006071F7"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream iOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E35E19E48FF1009FC285"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream OSX"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E36819E48FF1009FC285"
BuildableName = "Starscream OSXTests.xctest"
BlueprintName = "Starscream OSXTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E36819E48FF1009FC285"
BuildableName = "Starscream OSXTests.xctest"
BlueprintName = "Starscream OSXTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E35E19E48FF1009FC285"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream OSX"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E35E19E48FF1009FC285"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream OSX"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D9C3E35E19E48FF1009FC285"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream OSX"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B3E79F019D48B7F006071F7"
BuildableName = "Starscream iOSTests.xctest"
BlueprintName = "Starscream iOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "091277961BD673A70003036D"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream tvOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0912779F1BD673A70003036D"
BuildableName = "Starscream tvOSTests.xctest"
BlueprintName = "Starscream tvOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0912779F1BD673A70003036D"
BuildableName = "Starscream tvOSTests.xctest"
BlueprintName = "Starscream tvOSTests"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "091277961BD673A70003036D"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream tvOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "091277961BD673A70003036D"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream tvOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "091277961BD673A70003036D"
BuildableName = "Starscream.framework"
BlueprintName = "Starscream tvOS"
ReferencedContainer = "container:Starscream.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
@@ -0,0 +1,35 @@
//
// StarscreamTests.swift
// StarscreamTests
//
// Created by Austin Cherry on 9/25/14.
// Copyright (c) 2014 Vluxe. All rights reserved.
//
import XCTest
class StarscreamTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure() {
// Put the code you want to measure the time of here.
}
}
}
+27
View File
@@ -0,0 +1,27 @@
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control?
#
# Pods/
# Xcode
.DS_Store
build
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xccheckout
*.xcodeproj/*.xcworkspace
@@ -0,0 +1,559 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
5C178E221B62D0B900A97204 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C178E211B62D0B900A97204 /* AppDelegate.swift */; };
5C178E241B62D0B900A97204 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C178E231B62D0B900A97204 /* ViewController.swift */; };
5C178E271B62D0B900A97204 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5C178E251B62D0B900A97204 /* Main.storyboard */; };
5C178E291B62D0B900A97204 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5C178E281B62D0B900A97204 /* Images.xcassets */; };
5C178E2C1B62D0B900A97204 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5C178E2A1B62D0B900A97204 /* LaunchScreen.xib */; };
5C178E381B62D0B900A97204 /* AutobahnTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C178E371B62D0B900A97204 /* AutobahnTests.swift */; };
5C178E521B62D11200A97204 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C178E491B62D0EF00A97204 /* Starscream.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
5C178E321B62D0B900A97204 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5C178E141B62D0B900A97204 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5C178E1B1B62D0B900A97204;
remoteInfo = Autobahn;
};
5C178E481B62D0EF00A97204 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 6B3E79E619D48B7F006071F7;
remoteInfo = Starscream;
};
5C178E4A1B62D0EF00A97204 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 6B3E79F119D48B7F006071F7;
remoteInfo = StarscreamTests;
};
5C178E4C1B62D0EF00A97204 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D9C3E35F19E48FF1009FC285;
remoteInfo = StarscreamOSX;
};
5C178E4E1B62D0EF00A97204 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D9C3E36919E48FF1009FC285;
remoteInfo = StarscreamOSXTests;
};
5C178E501B62D10A00A97204 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 6B3E79E519D48B7F006071F7;
remoteInfo = Starscream;
};
5C42C3D51D8DF51C00947AA2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 091277971BD673A70003036D;
remoteInfo = "Starscream tvOS";
};
5C42C3D71D8DF51C00947AA2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 091277A01BD673A70003036D;
remoteInfo = "Starscream tvOSTests";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
5C178E1C1B62D0B900A97204 /* Autobahn.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Autobahn.app; sourceTree = BUILT_PRODUCTS_DIR; };
5C178E201B62D0B900A97204 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5C178E211B62D0B900A97204 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5C178E231B62D0B900A97204 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
5C178E261B62D0B900A97204 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5C178E281B62D0B900A97204 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
5C178E2B1B62D0B900A97204 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
5C178E311B62D0B900A97204 /* AutobahnTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AutobahnTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
5C178E361B62D0B900A97204 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5C178E371B62D0B900A97204 /* AutobahnTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutobahnTests.swift; sourceTree = "<group>"; };
5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Starscream.xcodeproj; path = ../../Starscream.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
5C178E191B62D0B900A97204 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5C178E521B62D11200A97204 /* Starscream.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5C178E2E1B62D0B900A97204 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
5C178E131B62D0B900A97204 = {
isa = PBXGroup;
children = (
5C178E1E1B62D0B900A97204 /* Autobahn */,
5C178E341B62D0B900A97204 /* AutobahnTests */,
5C178E1D1B62D0B900A97204 /* Products */,
5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */,
);
sourceTree = "<group>";
};
5C178E1D1B62D0B900A97204 /* Products */ = {
isa = PBXGroup;
children = (
5C178E1C1B62D0B900A97204 /* Autobahn.app */,
5C178E311B62D0B900A97204 /* AutobahnTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
5C178E1E1B62D0B900A97204 /* Autobahn */ = {
isa = PBXGroup;
children = (
5C178E211B62D0B900A97204 /* AppDelegate.swift */,
5C178E231B62D0B900A97204 /* ViewController.swift */,
5C178E251B62D0B900A97204 /* Main.storyboard */,
5C178E281B62D0B900A97204 /* Images.xcassets */,
5C178E2A1B62D0B900A97204 /* LaunchScreen.xib */,
5C178E1F1B62D0B900A97204 /* Supporting Files */,
);
path = Autobahn;
sourceTree = "<group>";
};
5C178E1F1B62D0B900A97204 /* Supporting Files */ = {
isa = PBXGroup;
children = (
5C178E201B62D0B900A97204 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
5C178E341B62D0B900A97204 /* AutobahnTests */ = {
isa = PBXGroup;
children = (
5C178E371B62D0B900A97204 /* AutobahnTests.swift */,
5C178E351B62D0B900A97204 /* Supporting Files */,
);
path = AutobahnTests;
sourceTree = "<group>";
};
5C178E351B62D0B900A97204 /* Supporting Files */ = {
isa = PBXGroup;
children = (
5C178E361B62D0B900A97204 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
5C178E421B62D0EF00A97204 /* Products */ = {
isa = PBXGroup;
children = (
5C178E491B62D0EF00A97204 /* Starscream.framework */,
5C178E4B1B62D0EF00A97204 /* StarscreamTests.xctest */,
5C178E4D1B62D0EF00A97204 /* Starscream.framework */,
5C178E4F1B62D0EF00A97204 /* StarscreamOSXTests.xctest */,
5C42C3D61D8DF51C00947AA2 /* Starscream.framework */,
5C42C3D81D8DF51C00947AA2 /* Starscream tvOSTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
5C178E1B1B62D0B900A97204 /* Autobahn */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5C178E3B1B62D0B900A97204 /* Build configuration list for PBXNativeTarget "Autobahn" */;
buildPhases = (
5C178E181B62D0B900A97204 /* Sources */,
5C178E191B62D0B900A97204 /* Frameworks */,
5C178E1A1B62D0B900A97204 /* Resources */,
);
buildRules = (
);
dependencies = (
5C178E511B62D10A00A97204 /* PBXTargetDependency */,
);
name = Autobahn;
productName = Autobahn;
productReference = 5C178E1C1B62D0B900A97204 /* Autobahn.app */;
productType = "com.apple.product-type.application";
};
5C178E301B62D0B900A97204 /* AutobahnTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5C178E3E1B62D0B900A97204 /* Build configuration list for PBXNativeTarget "AutobahnTests" */;
buildPhases = (
5C178E2D1B62D0B900A97204 /* Sources */,
5C178E2E1B62D0B900A97204 /* Frameworks */,
5C178E2F1B62D0B900A97204 /* Resources */,
);
buildRules = (
);
dependencies = (
5C178E331B62D0B900A97204 /* PBXTargetDependency */,
);
name = AutobahnTests;
productName = AutobahnTests;
productReference = 5C178E311B62D0B900A97204 /* AutobahnTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
5C178E141B62D0B900A97204 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0640;
ORGANIZATIONNAME = vluxe;
TargetAttributes = {
5C178E1B1B62D0B900A97204 = {
CreatedOnToolsVersion = 6.4;
LastSwiftMigration = 0800;
};
5C178E301B62D0B900A97204 = {
CreatedOnToolsVersion = 6.4;
LastSwiftMigration = 0800;
TestTargetID = 5C178E1B1B62D0B900A97204;
};
};
};
buildConfigurationList = 5C178E171B62D0B900A97204 /* Build configuration list for PBXProject "Autobahn" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 5C178E131B62D0B900A97204;
productRefGroup = 5C178E1D1B62D0B900A97204 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 5C178E421B62D0EF00A97204 /* Products */;
ProjectRef = 5C178E411B62D0EF00A97204 /* Starscream.xcodeproj */;
},
);
projectRoot = "";
targets = (
5C178E1B1B62D0B900A97204 /* Autobahn */,
5C178E301B62D0B900A97204 /* AutobahnTests */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
5C178E491B62D0EF00A97204 /* Starscream.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Starscream.framework;
remoteRef = 5C178E481B62D0EF00A97204 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5C178E4B1B62D0EF00A97204 /* StarscreamTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Starscream iOSTests.xctest";
remoteRef = 5C178E4A1B62D0EF00A97204 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5C178E4D1B62D0EF00A97204 /* Starscream.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Starscream.framework;
remoteRef = 5C178E4C1B62D0EF00A97204 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5C178E4F1B62D0EF00A97204 /* StarscreamOSXTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Starscream OSXTests.xctest";
remoteRef = 5C178E4E1B62D0EF00A97204 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5C42C3D61D8DF51C00947AA2 /* Starscream.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Starscream.framework;
remoteRef = 5C42C3D51D8DF51C00947AA2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5C42C3D81D8DF51C00947AA2 /* Starscream tvOSTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Starscream tvOSTests.xctest";
remoteRef = 5C42C3D71D8DF51C00947AA2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
5C178E1A1B62D0B900A97204 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5C178E271B62D0B900A97204 /* Main.storyboard in Resources */,
5C178E2C1B62D0B900A97204 /* LaunchScreen.xib in Resources */,
5C178E291B62D0B900A97204 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5C178E2F1B62D0B900A97204 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
5C178E181B62D0B900A97204 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5C178E241B62D0B900A97204 /* ViewController.swift in Sources */,
5C178E221B62D0B900A97204 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5C178E2D1B62D0B900A97204 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5C178E381B62D0B900A97204 /* AutobahnTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
5C178E331B62D0B900A97204 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 5C178E1B1B62D0B900A97204 /* Autobahn */;
targetProxy = 5C178E321B62D0B900A97204 /* PBXContainerItemProxy */;
};
5C178E511B62D10A00A97204 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Starscream;
targetProxy = 5C178E501B62D10A00A97204 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
5C178E251B62D0B900A97204 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
5C178E261B62D0B900A97204 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
5C178E2A1B62D0B900A97204 /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
5C178E2B1B62D0B900A97204 /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
5C178E391B62D0B900A97204 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = 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",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
5C178E3A1B62D0B900A97204 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
5C178E3C1B62D0B900A97204 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Autobahn/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
5C178E3D1B62D0B900A97204 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Autobahn/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
5C178E3F1B62D0B900A97204 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = AutobahnTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Autobahn.app/Autobahn";
};
name = Debug;
};
5C178E401B62D0B900A97204 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = AutobahnTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Autobahn.app/Autobahn";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
5C178E171B62D0B900A97204 /* Build configuration list for PBXProject "Autobahn" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5C178E391B62D0B900A97204 /* Debug */,
5C178E3A1B62D0B900A97204 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5C178E3B1B62D0B900A97204 /* Build configuration list for PBXNativeTarget "Autobahn" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5C178E3C1B62D0B900A97204 /* Debug */,
5C178E3D1B62D0B900A97204 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5C178E3E1B62D0B900A97204 /* Build configuration list for PBXNativeTarget "AutobahnTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5C178E3F1B62D0B900A97204 /* Debug */,
5C178E401B62D0B900A97204 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 5C178E141B62D0B900A97204 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Autobahn.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,46 @@
//
// AppDelegate.swift
// Autobahn
//
// Created by Dalton Cherry on 7/24/15.
// Copyright (c) 2015 vluxe. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// 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.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// 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.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 vluxe. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Autobahn" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Autobahn" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
@@ -0,0 +1,68 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
+47
View File
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.vluxe.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
@@ -0,0 +1,158 @@
//
// ViewController.swift
// Autobahn
//
// Created by Dalton Cherry on 7/24/15.
// Copyright (c) 2015 vluxe. All rights reserved.
//
import UIKit
import Starscream
class ViewController: UIViewController {
let host = "localhost:9001"
var socketArray = [WebSocket]()
var caseCount = 300 //starting cases
override func viewDidLoad() {
super.viewDidLoad()
getCaseCount()
//getTestInfo(1)
}
func removeSocket(_ s: WebSocket) {
socketArray = socketArray.filter{$0 != s}
}
func getCaseCount() {
let s = WebSocket(url: URL(string: "ws://\(host)/getCaseCount")!, protocols: [])
socketArray.append(s)
s.onText = {[unowned self] (text: String) in
if let c = Int(text) {
print("number of cases is: \(c)")
self.caseCount = c
}
}
s.onDisconnect = {[unowned self] (error: NSError?) in
self.getTestInfo(1)
self.removeSocket(s)
}
s.connect()
}
func getTestInfo(_ caseNum: Int) {
let s = createSocket("getCaseInfo",caseNum)
socketArray.append(s)
s.onText = {(text: String) in
// let data = text.dataUsingEncoding(NSUTF8StringEncoding)
// do {
// let resp: AnyObject? = try NSJSONSerialization.JSONObjectWithData(data!,
// options: NSJSONReadingOptions())
// if let dict = resp as? Dictionary<String,String> {
// let num = dict["id"]
// let summary = dict["description"]
// if let n = num, let sum = summary {
// print("running case:\(caseNum) id:\(n) summary: \(sum)")
// }
// }
// } catch {
// print("error parsing the json")
// }
}
var once = false
s.onDisconnect = {[unowned self] (error: NSError?) in
if !once {
once = true
self.runTest(caseNum)
}
self.removeSocket(s)
}
s.connect()
}
func runTest(_ caseNum: Int) {
let s = createSocket("runCase",caseNum)
self.socketArray.append(s)
s.onText = {(text: String) in
s.write(string: text)
}
s.onData = {(data: Data) in
s.write(data: data)
}
var once = false
s.onDisconnect = {[unowned self] (error: NSError?) in
if !once {
once = true
print("case:\(caseNum) finished")
self.verifyTest(caseNum)
self.removeSocket(s)
}
}
s.connect()
}
func verifyTest(_ caseNum: Int) {
let s = createSocket("getCaseStatus",caseNum)
self.socketArray.append(s)
s.onText = {(text: String) in
let data = text.data(using: String.Encoding.utf8)
do {
let resp: Any? = try JSONSerialization.jsonObject(with: data!,
options: JSONSerialization.ReadingOptions())
if let dict = resp as? Dictionary<String,String> {
if let status = dict["behavior"] {
if status == "OK" {
print("SUCCESS: \(caseNum)")
return
}
}
print("FAILURE: \(caseNum)")
}
} catch {
print("error parsing the json")
}
}
var once = false
s.onDisconnect = {[unowned self] (error: NSError?) in
if !once {
once = true
let nextCase = caseNum+1
if nextCase <= self.caseCount {
self.getTestInfo(nextCase)
} else {
self.finishReports()
}
}
self.removeSocket(s)
}
s.connect()
}
func finishReports() {
let s = createSocket("updateReports",0)
self.socketArray.append(s)
s.onDisconnect = {[unowned self] (error: NSError?) in
print("finished all the tests!")
self.removeSocket(s)
}
s.connect()
}
func createSocket(_ cmd: String, _ caseNum: Int) -> WebSocket {
return WebSocket(url: URL(string: "ws://\(host)\(buildPath(cmd,caseNum))")!, protocols: [])
}
func buildPath(_ cmd: String, _ caseNum: Int) -> String {
return "/\(cmd)?case=\(caseNum)&agent=Starscream"
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
@@ -0,0 +1,36 @@
//
// AutobahnTests.swift
// AutobahnTests
//
// Created by Dalton Cherry on 7/24/15.
// Copyright (c) 2015 vluxe. All rights reserved.
//
import UIKit
import XCTest
class AutobahnTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure() {
// Put the code you want to measure the time of here.
}
}
}
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.vluxe.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
+27
View File
@@ -0,0 +1,27 @@
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control?
#
# Pods/
# Xcode
.DS_Store
build
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xccheckout
*.xcodeproj/*.xcworkspace
+20
View File
@@ -0,0 +1,20 @@
# Simple Test
This is a very simple example on how to use Starscream.
# Usage
First make sure you have the gem dependencies of websocket server.
```
gem install em-websocket
gem install faker
```
Next simply run:
```
ruby ws-server.rb
```
After that, start and run the xCode project. Echo to your heart's desire.
@@ -0,0 +1,443 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
5C765AE1199A6DAA003D9110 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C765AE0199A6DAA003D9110 /* AppDelegate.swift */; };
5C765AE3199A6DAA003D9110 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C765AE2199A6DAA003D9110 /* ViewController.swift */; };
5C765AE8199A6DAA003D9110 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5C765AE7199A6DAA003D9110 /* Images.xcassets */; };
6B3E7A1119D48D17006071F7 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B3E7A0E19D48D00006071F7 /* Starscream.framework */; };
6B76EA9D19DB0BE600E49C70 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5C765AE4199A6DAA003D9110 /* Main.storyboard */; };
6B76EAA119DB0DAF00E49C70 /* Starscream.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6B3E7A0E19D48D00006071F7 /* Starscream.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
5C06AE841B08044600D41060 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 6B3E79E519D48B7F006071F7;
remoteInfo = Starscream;
};
5C06AE8A1B08044600D41060 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D9C3E35F19E48FF1009FC285;
remoteInfo = StarscreamOSX;
};
5C06AE8C1B08044600D41060 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D9C3E36919E48FF1009FC285;
remoteInfo = StarscreamOSXTests;
};
5C42C3E01D8F31DC00947AA2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 091277971BD673A70003036D;
remoteInfo = "Starscream tvOS";
};
5C42C3E21D8F31DC00947AA2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 091277A01BD673A70003036D;
remoteInfo = "Starscream tvOSTests";
};
6B3E7A0D19D48D00006071F7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 6B3E79E619D48B7F006071F7;
remoteInfo = Starscream;
};
6B3E7A0F19D48D00006071F7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 6B3E79F119D48B7F006071F7;
remoteInfo = StarscreamTests;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
6B76EAA019DB0D9A00E49C70 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
6B76EAA119DB0DAF00E49C70 /* Starscream.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
5C765ADB199A6DAA003D9110 /* SimpleTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
5C765ADF199A6DAA003D9110 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5C765AE0199A6DAA003D9110 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5C765AE2199A6DAA003D9110 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
5C765AE5199A6DAA003D9110 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5C765AE7199A6DAA003D9110 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Starscream.xcodeproj; path = ../../Starscream.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
5C765AD8199A6DAA003D9110 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6B3E7A1119D48D17006071F7 /* Starscream.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
5C765AD2199A6DAA003D9110 = {
isa = PBXGroup;
children = (
5C765ADD199A6DAA003D9110 /* SimpleTest */,
5C765ADC199A6DAA003D9110 /* Products */,
6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */,
);
sourceTree = "<group>";
};
5C765ADC199A6DAA003D9110 /* Products */ = {
isa = PBXGroup;
children = (
5C765ADB199A6DAA003D9110 /* SimpleTest.app */,
);
name = Products;
sourceTree = "<group>";
};
5C765ADD199A6DAA003D9110 /* SimpleTest */ = {
isa = PBXGroup;
children = (
5C765AE0199A6DAA003D9110 /* AppDelegate.swift */,
5C765AE2199A6DAA003D9110 /* ViewController.swift */,
5C765AE4199A6DAA003D9110 /* Main.storyboard */,
5C765AE7199A6DAA003D9110 /* Images.xcassets */,
5C765ADE199A6DAA003D9110 /* Supporting Files */,
);
path = SimpleTest;
sourceTree = "<group>";
};
5C765ADE199A6DAA003D9110 /* Supporting Files */ = {
isa = PBXGroup;
children = (
5C765ADF199A6DAA003D9110 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
6B3E7A0919D48D00006071F7 /* Products */ = {
isa = PBXGroup;
children = (
6B3E7A0E19D48D00006071F7 /* Starscream.framework */,
6B3E7A1019D48D00006071F7 /* Starscream iOSTests.xctest */,
5C06AE8B1B08044600D41060 /* Starscream.framework */,
5C06AE8D1B08044600D41060 /* StarscreamOSXTests.xctest */,
5C42C3E11D8F31DC00947AA2 /* Starscream.framework */,
5C42C3E31D8F31DC00947AA2 /* Starscream tvOSTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
5C765ADA199A6DAA003D9110 /* SimpleTest */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5C765AF7199A6DAA003D9110 /* Build configuration list for PBXNativeTarget "SimpleTest" */;
buildPhases = (
5C765AD7199A6DAA003D9110 /* Sources */,
5C765AD8199A6DAA003D9110 /* Frameworks */,
5C765AD9199A6DAA003D9110 /* Resources */,
6B76EAA019DB0D9A00E49C70 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
5C06AE851B08044600D41060 /* PBXTargetDependency */,
);
name = SimpleTest;
productName = SimpleTest;
productReference = 5C765ADB199A6DAA003D9110 /* SimpleTest.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
5C765AD3199A6DAA003D9110 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = vluxe;
TargetAttributes = {
5C765ADA199A6DAA003D9110 = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0800;
};
};
};
buildConfigurationList = 5C765AD6199A6DAA003D9110 /* Build configuration list for PBXProject "SimpleTest" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 5C765AD2199A6DAA003D9110;
productRefGroup = 5C765ADC199A6DAA003D9110 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 6B3E7A0919D48D00006071F7 /* Products */;
ProjectRef = 6B3E7A0819D48D00006071F7 /* Starscream.xcodeproj */;
},
);
projectRoot = "";
targets = (
5C765ADA199A6DAA003D9110 /* SimpleTest */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
5C06AE8B1B08044600D41060 /* Starscream.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Starscream.framework;
remoteRef = 5C06AE8A1B08044600D41060 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5C06AE8D1B08044600D41060 /* Starscream OSXTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Starscream OSXTests.xctest";
remoteRef = 5C06AE8C1B08044600D41060 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5C42C3E11D8F31DC00947AA2 /* Starscream.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Starscream.framework;
remoteRef = 5C42C3E01D8F31DC00947AA2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5C42C3E31D8F31DC00947AA2 /* Starscream tvOSTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Starscream tvOSTests.xctest";
remoteRef = 5C42C3E21D8F31DC00947AA2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
6B3E7A0E19D48D00006071F7 /* Starscream.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Starscream.framework;
remoteRef = 6B3E7A0D19D48D00006071F7 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
6B3E7A1019D48D00006071F7 /* Starscream iOSTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Starscream iOSTests.xctest";
remoteRef = 6B3E7A0F19D48D00006071F7 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
5C765AD9199A6DAA003D9110 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6B76EA9D19DB0BE600E49C70 /* Main.storyboard in Resources */,
5C765AE8199A6DAA003D9110 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
5C765AD7199A6DAA003D9110 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5C765AE3199A6DAA003D9110 /* ViewController.swift in Sources */,
5C765AE1199A6DAA003D9110 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
5C06AE851B08044600D41060 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Starscream;
targetProxy = 5C06AE841B08044600D41060 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
5C765AE4199A6DAA003D9110 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
5C765AE5199A6DAA003D9110 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
5C765AF5199A6DAA003D9110 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
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",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
5C765AF6199A6DAA003D9110 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
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;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
5C765AF8199A6DAA003D9110 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = SimpleTest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.io.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
5C765AF9199A6DAA003D9110 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = SimpleTest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.io.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
5C765AD6199A6DAA003D9110 /* Build configuration list for PBXProject "SimpleTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5C765AF5199A6DAA003D9110 /* Debug */,
5C765AF6199A6DAA003D9110 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5C765AF7199A6DAA003D9110 /* Build configuration list for PBXNativeTarget "SimpleTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5C765AF8199A6DAA003D9110 /* Debug */,
5C765AF9199A6DAA003D9110 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 5C765AD3199A6DAA003D9110 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:SimpleTest.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>4D925893-CAFA-423E-A2A1-B4DD743323D3</string>
<key>IDESourceControlProjectName</key>
<string>SimpleTest</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>C86D95FCAEB1FEA0694B5D4AC7241D7E5F42F31D</key>
<string>https://github.com/daltoniam/Starscream</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>examples/SimpleTest/SimpleTest.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>C86D95FCAEB1FEA0694B5D4AC7241D7E5F42F31D</key>
<string>../../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/daltoniam/Starscream</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>C86D95FCAEB1FEA0694B5D4AC7241D7E5F42F31D</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>C86D95FCAEB1FEA0694B5D4AC7241D7E5F42F31D</string>
<key>IDESourceControlWCCName</key>
<string>Starscream</string>
</dict>
</array>
</dict>
</plist>
@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C765ADA199A6DAA003D9110"
BuildableName = "SimpleTest.app"
BlueprintName = "SimpleTest"
ReferencedContainer = "container:SimpleTest.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C765AEC199A6DAA003D9110"
BuildableName = "SimpleTestTests.xctest"
BlueprintName = "SimpleTestTests"
ReferencedContainer = "container:SimpleTest.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C765AEC199A6DAA003D9110"
BuildableName = "SimpleTestTests.xctest"
BlueprintName = "SimpleTestTests"
ReferencedContainer = "container:SimpleTest.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C765ADA199A6DAA003D9110"
BuildableName = "SimpleTest.app"
BlueprintName = "SimpleTest"
ReferencedContainer = "container:SimpleTest.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C765ADA199A6DAA003D9110"
BuildableName = "SimpleTest.app"
BlueprintName = "SimpleTest"
ReferencedContainer = "container:SimpleTest.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "disable"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C765ADA199A6DAA003D9110"
BuildableName = "SimpleTest.app"
BlueprintName = "SimpleTest"
ReferencedContainer = "container:SimpleTest.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>SimpleTest.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>5C765ADA199A6DAA003D9110</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>5C765AEC199A6DAA003D9110</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
@@ -0,0 +1,46 @@
//
// AppDelegate.swift
// SimpleTest
//
// Created by Dalton Cherry on 8/12/14.
// Copyright (c) 2014 vluxe. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// 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.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// 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.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="gXF-XR-CbL">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="z5V-aR-Hjx">
<objects>
<navigationController id="gXF-XR-CbL" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="D35-o5-RTx">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="N3B-eU-fDA" kind="relationship" relationship="rootViewController" id="2Dx-au-NvB"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="sXu-Hp-mO4" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-646" y="295"/>
</scene>
<!--Test-->
<scene sceneID="d1c-mj-3av">
<objects>
<viewController id="N3B-eU-fDA" customClass="ViewController" customModule="SimpleTest" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="AfF-mb-jqd"/>
<viewControllerLayoutGuide type="bottom" id="ZA3-Ac-gEF"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Sgl-3h-sU4">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" title="Test" id="jdv-zM-Apy">
<barButtonItem key="leftBarButtonItem" title="Disconnect" id="ByR-Ln-P6Z">
<connections>
<action selector="disconnect:" destination="N3B-eU-fDA" id="k8L-AE-Ini"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" title="Write Text" id="gjf-vP-Wu5">
<connections>
<action selector="writeText:" destination="N3B-eU-fDA" id="fyJ-Ys-gvh"/>
</connections>
</barButtonItem>
</navigationItem>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="zrK-cf-cjD" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="175" y="295"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,58 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,51 @@
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"subtype" : "retina4",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
+45
View File
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
@@ -0,0 +1,62 @@
//
// ViewController.swift
// SimpleTest
//
// Created by Dalton Cherry on 8/12/14.
// Copyright (c) 2014 vluxe. All rights reserved.
//
import UIKit
import Starscream
class ViewController: UIViewController, WebSocketDelegate {
var socket = WebSocket(url: URL(string: "ws://localhost:8080/")!, protocols: ["chat", "superchat"])
override func viewDidLoad() {
super.viewDidLoad()
socket.delegate = self
socket.connect()
}
// MARK: Websocket Delegate Methods.
func websocketDidConnect(socket: WebSocket) {
print("websocket is connected")
}
func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
if let e = error {
print("websocket is disconnected: \(e.localizedDescription)")
} else {
print("websocket disconnected")
}
}
func websocketDidReceiveMessage(socket: WebSocket, text: String) {
print("Received text: \(text)")
}
func websocketDidReceiveData(socket: WebSocket, data: Data) {
print("Received data: \(data.count)")
}
// MARK: Write Text Action
@IBAction func writeText(_ sender: UIBarButtonItem) {
socket.write(string: "hello there!")
}
// MARK: Disconnect Action
@IBAction func disconnect(_ sender: UIBarButtonItem) {
if socket.isConnected {
sender.title = "Connect"
socket.disconnect()
} else {
sender.title = "Disconnect"
socket.connect()
}
}
}
+25
View File
@@ -0,0 +1,25 @@
require 'em-websocket'
require 'faker'
EM.run {
EM::WebSocket.run(:host => "0.0.0.0", :port => 8080) do |ws|
ws.onopen { |handshake|
puts "WebSocket connection open"
puts "origin: #{handshake.origin}"
puts "headers: #{handshake.headers}"
ws.send "Hello Client, you connected to #{handshake.path}"
}
ws.onerror do |error|
puts "[error] #{error}"
end
ws.onclose { puts "Connection closed" }
ws.onmessage { |msg|
puts "message from client: #{msg}"
ws.send Faker::Hacker.say_something_smart
}
end
}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 KiB