Compare commits
67 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82d8a0119e | |||
| 11c401f408 | |||
| b32c9ab481 | |||
| b12442f29c | |||
| d3a0b10732 | |||
| 7723d1ec4f | |||
| ac6c0fc9da | |||
| ca9b1225b7 | |||
| 86998dd144 | |||
| d67812c561 | |||
| d2a9549ea4 | |||
| 7b1e5bb60d | |||
| 4c7b8817a1 | |||
| f8ac424b8e | |||
| dcfffe1114 | |||
| 76fa39ec30 | |||
| ea9a6ff27e | |||
| 66a441a917 | |||
| 04acf17f4c | |||
| 826008daab | |||
| cdb61a3624 | |||
| f900d67759 | |||
| cb131f8ea3 | |||
| 3c5a484049 | |||
| 5ab0d5a541 | |||
| 060600f343 | |||
| f354881550 | |||
| c68359159d | |||
| 2c476c7582 | |||
| 6f18c4938a | |||
| 1435d726ae | |||
| 95eab636fb | |||
| f567b33704 | |||
| 62626d875a | |||
| 7e7d8a42ef | |||
| a0ba26b7de | |||
| b7f15e63c3 | |||
| cebca639ee | |||
| e73800e668 | |||
| 4ae4531e7a | |||
| a55720bd9a | |||
| e95db8ff29 | |||
| 9447264238 | |||
| df8d82047f | |||
| 85c8412646 | |||
| 4820831260 | |||
| 024a27711e | |||
| 5987db1605 | |||
| fe5769f2ae | |||
| 263b9419bb | |||
| 5fbeab4c12 | |||
| 07bccd9c16 | |||
| 51b6c789bd | |||
| 0c7e7abfd7 | |||
| d2f22783b6 | |||
| e6236acc00 | |||
| d003b62b54 | |||
| 70d9e6ec5c | |||
| c0e7d40284 | |||
| 06945ada8b | |||
| fedd77ba8e | |||
| 7e5a96341c | |||
| ce4fcdc967 | |||
| da1d9c69a7 | |||
| b6630118fe | |||
| cfc7b7b8dc | |||
| 311b6dd9c7 |
@@ -0,0 +1,25 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report about a bug
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
### Describe the bug
|
||||
> A clear and concise description of what the bug is.
|
||||
|
||||
### Steps to Reproduce
|
||||
> Detailed steps to reproduce the problematic behavior:
|
||||
|
||||
### Expected behavior
|
||||
> A clear and concise description of what you expected to happen.
|
||||
|
||||
### Environment:
|
||||
- OS/Version: [e.g. iOS/13.3]
|
||||
- Starscream Version [e.g. 4.0.4]
|
||||
- Xcode version [e.g. 11.5]
|
||||
|
||||
### Additional context
|
||||
> Add any other context about the problem here.
|
||||
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: feature_request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
### What do you want to happen?
|
||||
> Please replace this with the general overview of the feature that you'd like to have.
|
||||
|
||||
### What happens now?
|
||||
> Please replace this with of what is happening currently.
|
||||
|
||||
### Demo Code
|
||||
> Any demo code that may used to implement/use the desired feature.
|
||||
|
||||
### Describe alternatives you've considered
|
||||
> A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
### Additional context
|
||||
> Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
name: General Question
|
||||
about: 'Ask any question about the framework. '
|
||||
title: ''
|
||||
labels: question
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
### Question
|
||||
> A description of what you want to know.
|
||||
|
||||
### Environment:
|
||||
- OS/Version: [e.g. iOS/13.3]
|
||||
- Starscream Version [e.g. 4.0.4]
|
||||
- Xcode version [e.g. 11.5]
|
||||
@@ -0,0 +1,8 @@
|
||||
### Issue Link 🔗
|
||||
> Please attach the link to an issue if it exists.
|
||||
|
||||
### Goals ⚽
|
||||
> What you hope to address within this PR.
|
||||
|
||||
### Implementation Details 🚧
|
||||
> Additional details about the PR.
|
||||
@@ -0,0 +1,24 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*.*.*"
|
||||
jobs:
|
||||
release:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set Latest Tag
|
||||
id: vars
|
||||
run: echo "tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
- run: bundle exec fastlane test
|
||||
- run: bundle exec fastlane release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
|
||||
TAG: ${{ steps.vars.outputs.tag }}
|
||||
@@ -0,0 +1 @@
|
||||
3.2.2
|
||||
@@ -1,7 +0,0 @@
|
||||
osx_image: xcode11.3
|
||||
language: objective-c
|
||||
before_install:
|
||||
- gem install cocoapods --pre
|
||||
- gem cleanup
|
||||
script:
|
||||
- ./build.sh
|
||||
@@ -2,6 +2,33 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
`Starscream` adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### [4.0.4](https://github.com/daltoniam/Starscream/tree/4.0.4)
|
||||
|
||||
Bug fixes for 4.0.3.
|
||||
|
||||
[#808](https://github.com/daltoniam/Starscream/pull/808)
|
||||
[#807](https://github.com/daltoniam/Starscream/pull/807)
|
||||
[#799](https://github.com/daltoniam/Starscream/pull/799)
|
||||
[#797](https://github.com/daltoniam/Starscream/pull/797)
|
||||
[#790](https://github.com/daltoniam/Starscream/pull/790)
|
||||
[#788](https://github.com/daltoniam/Starscream/pull/788)
|
||||
[#777](https://github.com/daltoniam/Starscream/pull/777)
|
||||
[#768](https://github.com/daltoniam/Starscream/pull/768)
|
||||
[#766](https://github.com/daltoniam/Starscream/pull/766)
|
||||
[#764](https://github.com/daltoniam/Starscream/pull/764)
|
||||
|
||||
### [4.0.3](https://github.com/daltoniam/Starscream/tree/4.0.3)
|
||||
|
||||
Bug fixes for 4.0.2.
|
||||
|
||||
[#760](https://github.com/daltoniam/Starscream/issues/760)
|
||||
|
||||
### [4.0.2](https://github.com/daltoniam/Starscream/tree/4.0.2)
|
||||
|
||||
Bug fixes for 4.0.1. Fixed native engine is connected/disconnected. Native engine isn't the default since the API lacks features.
|
||||
|
||||
[#697](https://github.com/daltoniam/Starscream/pull/697)
|
||||
|
||||
### [4.0.1](https://github.com/daltoniam/Starscream/tree/4.0.1)
|
||||
|
||||
Bug fixes for 4.0.0. Enabled Native engine now that the API is out of beta and works properly.
|
||||
|
||||
+182
-115
@@ -1,106 +1,151 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (3.0.2)
|
||||
activesupport (4.2.11.1)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
algoliasearch (1.27.1)
|
||||
CFPropertyList (3.0.6)
|
||||
rexml
|
||||
activesupport (7.0.7.2)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
tzinfo (~> 2.0)
|
||||
addressable (2.8.5)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
algoliasearch (1.27.5)
|
||||
httpclient (~> 2.8, >= 2.8.3)
|
||||
json (>= 1.5.1)
|
||||
artifactory (3.0.15)
|
||||
atomos (0.1.3)
|
||||
babosa (1.0.3)
|
||||
claide (1.0.3)
|
||||
cocoapods (1.8.4)
|
||||
activesupport (>= 4.0.2, < 5)
|
||||
aws-eventstream (1.2.0)
|
||||
aws-partitions (1.807.0)
|
||||
aws-sdk-core (3.180.3)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
aws-partitions (~> 1, >= 1.651.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
aws-sdk-kms (1.71.0)
|
||||
aws-sdk-core (~> 3, >= 3.177.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.132.1)
|
||||
aws-sdk-core (~> 3, >= 3.179.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.6)
|
||||
aws-sigv4 (1.6.0)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
babosa (1.0.4)
|
||||
claide (1.1.0)
|
||||
cocoapods (1.12.1)
|
||||
addressable (~> 2.8)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
cocoapods-core (= 1.8.4)
|
||||
cocoapods-core (= 1.12.1)
|
||||
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
||||
cocoapods-downloader (>= 1.2.2, < 2.0)
|
||||
cocoapods-downloader (>= 1.6.0, < 2.0)
|
||||
cocoapods-plugins (>= 1.0.0, < 2.0)
|
||||
cocoapods-search (>= 1.0.0, < 2.0)
|
||||
cocoapods-stats (>= 1.0.0, < 2.0)
|
||||
cocoapods-trunk (>= 1.4.0, < 2.0)
|
||||
cocoapods-trunk (>= 1.6.0, < 2.0)
|
||||
cocoapods-try (>= 1.1.0, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
escape (~> 0.0.4)
|
||||
fourflusher (>= 2.3.0, < 3.0)
|
||||
gh_inspector (~> 1.0)
|
||||
molinillo (~> 0.6.6)
|
||||
molinillo (~> 0.8.0)
|
||||
nap (~> 1.0)
|
||||
ruby-macho (~> 1.4)
|
||||
xcodeproj (>= 1.11.1, < 2.0)
|
||||
cocoapods-core (1.8.4)
|
||||
activesupport (>= 4.0.2, < 6)
|
||||
ruby-macho (>= 2.3.0, < 3.0)
|
||||
xcodeproj (>= 1.21.0, < 2.0)
|
||||
cocoapods-core (1.12.1)
|
||||
activesupport (>= 5.0, < 8)
|
||||
addressable (~> 2.8)
|
||||
algoliasearch (~> 1.0)
|
||||
concurrent-ruby (~> 1.1)
|
||||
fuzzy_match (~> 2.0.4)
|
||||
nap (~> 1.0)
|
||||
cocoapods-deintegrate (1.0.4)
|
||||
cocoapods-downloader (1.3.0)
|
||||
netrc (~> 0.11)
|
||||
public_suffix (~> 4.0)
|
||||
typhoeus (~> 1.0)
|
||||
cocoapods-deintegrate (1.0.5)
|
||||
cocoapods-downloader (1.6.3)
|
||||
cocoapods-plugins (1.0.0)
|
||||
nap
|
||||
cocoapods-search (1.0.0)
|
||||
cocoapods-stats (1.1.0)
|
||||
cocoapods-trunk (1.4.1)
|
||||
cocoapods-search (1.0.1)
|
||||
cocoapods-trunk (1.6.0)
|
||||
nap (>= 0.8, < 2.0)
|
||||
netrc (~> 0.11)
|
||||
cocoapods-try (1.1.0)
|
||||
cocoapods-try (1.2.0)
|
||||
colored (1.2)
|
||||
colored2 (3.1.2)
|
||||
commander-fastlane (4.4.6)
|
||||
highline (~> 1.7.2)
|
||||
concurrent-ruby (1.1.5)
|
||||
declarative (0.0.10)
|
||||
declarative-option (0.1.0)
|
||||
digest-crc (0.4.1)
|
||||
commander (4.6.0)
|
||||
highline (~> 2.0.0)
|
||||
concurrent-ruby (1.2.2)
|
||||
declarative (0.0.20)
|
||||
digest-crc (0.6.5)
|
||||
rake (>= 12.0.0, < 14.0.0)
|
||||
domain_name (0.5.20190701)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
dotenv (2.7.5)
|
||||
emoji_regex (1.0.1)
|
||||
dotenv (2.8.1)
|
||||
emoji_regex (3.2.3)
|
||||
escape (0.0.4)
|
||||
excon (0.71.1)
|
||||
faraday (0.17.3)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faraday-cookie_jar (0.0.6)
|
||||
faraday (>= 0.7.4)
|
||||
ethon (0.16.0)
|
||||
ffi (>= 1.15.0)
|
||||
excon (0.100.0)
|
||||
faraday (1.10.3)
|
||||
faraday-em_http (~> 1.0)
|
||||
faraday-em_synchrony (~> 1.0)
|
||||
faraday-excon (~> 1.1)
|
||||
faraday-httpclient (~> 1.0)
|
||||
faraday-multipart (~> 1.0)
|
||||
faraday-net_http (~> 1.0)
|
||||
faraday-net_http_persistent (~> 1.0)
|
||||
faraday-patron (~> 1.0)
|
||||
faraday-rack (~> 1.0)
|
||||
faraday-retry (~> 1.0)
|
||||
ruby2_keywords (>= 0.0.4)
|
||||
faraday-cookie_jar (0.0.7)
|
||||
faraday (>= 0.8.0)
|
||||
http-cookie (~> 1.0.0)
|
||||
faraday_middleware (0.13.1)
|
||||
faraday (>= 0.7.4, < 1.0)
|
||||
fastimage (2.1.7)
|
||||
fastlane (2.139.0)
|
||||
faraday-em_http (1.0.0)
|
||||
faraday-em_synchrony (1.0.0)
|
||||
faraday-excon (1.1.0)
|
||||
faraday-httpclient (1.0.1)
|
||||
faraday-multipart (1.0.4)
|
||||
multipart-post (~> 2)
|
||||
faraday-net_http (1.0.1)
|
||||
faraday-net_http_persistent (1.2.0)
|
||||
faraday-patron (1.0.0)
|
||||
faraday-rack (1.0.0)
|
||||
faraday-retry (1.0.3)
|
||||
faraday_middleware (1.2.0)
|
||||
faraday (~> 1.0)
|
||||
fastimage (2.2.7)
|
||||
fastlane (2.214.0)
|
||||
CFPropertyList (>= 2.3, < 4.0.0)
|
||||
addressable (>= 2.3, < 3.0.0)
|
||||
babosa (>= 1.0.2, < 2.0.0)
|
||||
addressable (>= 2.8, < 3.0.0)
|
||||
artifactory (~> 3.0)
|
||||
aws-sdk-s3 (~> 1.0)
|
||||
babosa (>= 1.0.3, < 2.0.0)
|
||||
bundler (>= 1.12.0, < 3.0.0)
|
||||
colored
|
||||
commander-fastlane (>= 4.4.6, < 5.0.0)
|
||||
commander (~> 4.6)
|
||||
dotenv (>= 2.1.1, < 3.0.0)
|
||||
emoji_regex (>= 0.1, < 2.0)
|
||||
emoji_regex (>= 0.1, < 4.0)
|
||||
excon (>= 0.71.0, < 1.0.0)
|
||||
faraday (~> 0.17)
|
||||
faraday (~> 1.0)
|
||||
faraday-cookie_jar (~> 0.0.6)
|
||||
faraday_middleware (~> 0.13.1)
|
||||
faraday_middleware (~> 1.0)
|
||||
fastimage (>= 2.1.0, < 3.0.0)
|
||||
gh_inspector (>= 1.1.2, < 2.0.0)
|
||||
google-api-client (>= 0.29.2, < 0.37.0)
|
||||
google-cloud-storage (>= 1.15.0, < 2.0.0)
|
||||
highline (>= 1.7.2, < 2.0.0)
|
||||
google-apis-androidpublisher_v3 (~> 0.3)
|
||||
google-apis-playcustomapp_v1 (~> 0.1)
|
||||
google-cloud-storage (~> 1.31)
|
||||
highline (~> 2.0)
|
||||
json (< 3.0.0)
|
||||
jwt (~> 2.1.0)
|
||||
jwt (>= 2.1.0, < 3)
|
||||
mini_magick (>= 4.9.4, < 5.0.0)
|
||||
multi_xml (~> 0.5)
|
||||
multipart-post (~> 2.0.0)
|
||||
multipart-post (>= 2.0.0, < 3.0.0)
|
||||
naturally (~> 2.2)
|
||||
optparse (~> 0.1.1)
|
||||
plist (>= 3.1.0, < 4.0.0)
|
||||
public_suffix (~> 2.0.0)
|
||||
rubyzip (>= 1.3.0, < 2.0.0)
|
||||
rubyzip (>= 2.0.0, < 3.0.0)
|
||||
security (= 0.1.3)
|
||||
simctl (~> 1.6.3)
|
||||
slack-notifier (>= 2.0.0, < 3.0.0)
|
||||
terminal-notifier (>= 2.0.0, < 3.0.0)
|
||||
terminal-table (>= 1.4.5, < 2.0.0)
|
||||
tty-screen (>= 0.6.3, < 1.0.0)
|
||||
@@ -109,109 +154,131 @@ GEM
|
||||
xcodeproj (>= 1.13.0, < 2.0.0)
|
||||
xcpretty (~> 0.3.0)
|
||||
xcpretty-travis-formatter (>= 0.0.3)
|
||||
ffi (1.15.5)
|
||||
fourflusher (2.3.1)
|
||||
fuzzy_match (2.0.4)
|
||||
gh_inspector (1.1.3)
|
||||
google-api-client (0.36.3)
|
||||
google-apis-androidpublisher_v3 (0.48.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-core (0.11.1)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
googleauth (~> 0.9)
|
||||
httpclient (>= 2.8.1, < 3.0)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
httpclient (>= 2.8.1, < 3.a)
|
||||
mini_mime (~> 1.0)
|
||||
representable (~> 3.0)
|
||||
retriable (>= 2.0, < 4.0)
|
||||
signet (~> 0.12)
|
||||
google-cloud-core (1.4.1)
|
||||
retriable (>= 2.0, < 4.a)
|
||||
rexml
|
||||
webrick
|
||||
google-apis-iamcredentials_v1 (0.17.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-playcustomapp_v1 (0.13.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-storage_v1 (0.19.0)
|
||||
google-apis-core (>= 0.9.0, < 2.a)
|
||||
google-cloud-core (1.6.0)
|
||||
google-cloud-env (~> 1.0)
|
||||
google-cloud-env (1.3.0)
|
||||
faraday (~> 0.11)
|
||||
google-cloud-storage (1.25.0)
|
||||
addressable (~> 2.5)
|
||||
google-cloud-errors (~> 1.0)
|
||||
google-cloud-env (1.6.0)
|
||||
faraday (>= 0.17.3, < 3.0)
|
||||
google-cloud-errors (1.3.1)
|
||||
google-cloud-storage (1.44.0)
|
||||
addressable (~> 2.8)
|
||||
digest-crc (~> 0.4)
|
||||
google-api-client (~> 0.33)
|
||||
google-cloud-core (~> 1.2)
|
||||
googleauth (~> 0.9)
|
||||
google-apis-iamcredentials_v1 (~> 0.1)
|
||||
google-apis-storage_v1 (~> 0.19.0)
|
||||
google-cloud-core (~> 1.6)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
mini_mime (~> 1.0)
|
||||
googleauth (0.10.0)
|
||||
faraday (~> 0.12)
|
||||
googleauth (1.7.0)
|
||||
faraday (>= 0.17.3, < 3.a)
|
||||
jwt (>= 1.4, < 3.0)
|
||||
memoist (~> 0.16)
|
||||
multi_json (~> 1.11)
|
||||
os (>= 0.9, < 2.0)
|
||||
signet (~> 0.12)
|
||||
highline (1.7.10)
|
||||
http-cookie (1.0.3)
|
||||
signet (>= 0.16, < 2.a)
|
||||
highline (2.0.3)
|
||||
http-cookie (1.0.5)
|
||||
domain_name (~> 0.5)
|
||||
httpclient (2.8.3)
|
||||
i18n (0.9.5)
|
||||
i18n (1.14.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
json (2.3.0)
|
||||
jwt (2.1.0)
|
||||
jmespath (1.6.2)
|
||||
json (2.6.3)
|
||||
jwt (2.7.1)
|
||||
memoist (0.16.2)
|
||||
mini_magick (4.9.5)
|
||||
mini_mime (1.0.2)
|
||||
minitest (5.13.0)
|
||||
molinillo (0.6.6)
|
||||
multi_json (1.14.1)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.0.0)
|
||||
nanaimo (0.2.6)
|
||||
mini_magick (4.12.0)
|
||||
mini_mime (1.1.5)
|
||||
minitest (5.19.0)
|
||||
molinillo (0.8.0)
|
||||
multi_json (1.15.0)
|
||||
multipart-post (2.3.0)
|
||||
nanaimo (0.3.0)
|
||||
nap (1.1.0)
|
||||
naturally (2.2.0)
|
||||
naturally (2.2.1)
|
||||
netrc (0.11.0)
|
||||
os (1.0.1)
|
||||
plist (3.5.0)
|
||||
public_suffix (2.0.5)
|
||||
representable (3.0.4)
|
||||
optparse (0.1.1)
|
||||
os (1.1.4)
|
||||
plist (3.7.0)
|
||||
public_suffix (4.0.7)
|
||||
rake (13.0.6)
|
||||
representable (3.2.0)
|
||||
declarative (< 0.1.0)
|
||||
declarative-option (< 0.2.0)
|
||||
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||
uber (< 0.2.0)
|
||||
retriable (3.1.2)
|
||||
rexml (3.2.6)
|
||||
rouge (2.0.7)
|
||||
ruby-macho (1.4.0)
|
||||
rubyzip (1.3.0)
|
||||
ruby-macho (2.5.1)
|
||||
ruby2_keywords (0.0.5)
|
||||
rubyzip (2.3.2)
|
||||
security (0.1.3)
|
||||
signet (0.12.0)
|
||||
addressable (~> 2.3)
|
||||
faraday (~> 0.9)
|
||||
signet (0.17.0)
|
||||
addressable (~> 2.8)
|
||||
faraday (>= 0.17.5, < 3.a)
|
||||
jwt (>= 1.5, < 3.0)
|
||||
multi_json (~> 1.10)
|
||||
simctl (1.6.7)
|
||||
simctl (1.6.10)
|
||||
CFPropertyList
|
||||
naturally
|
||||
slack-notifier (2.3.2)
|
||||
terminal-notifier (2.0.0)
|
||||
terminal-table (1.8.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
thread_safe (0.3.6)
|
||||
tty-cursor (0.7.0)
|
||||
tty-screen (0.7.0)
|
||||
tty-spinner (0.9.2)
|
||||
trailblazer-option (0.1.2)
|
||||
tty-cursor (0.7.1)
|
||||
tty-screen (0.8.1)
|
||||
tty-spinner (0.9.3)
|
||||
tty-cursor (~> 0.7)
|
||||
tzinfo (1.2.6)
|
||||
thread_safe (~> 0.1)
|
||||
typhoeus (1.4.0)
|
||||
ethon (>= 0.9.0)
|
||||
tzinfo (2.0.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
uber (0.1.0)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.6)
|
||||
unicode-display_width (1.6.0)
|
||||
unf_ext (0.0.8.2)
|
||||
unicode-display_width (1.8.0)
|
||||
webrick (1.8.1)
|
||||
word_wrap (1.0.0)
|
||||
xcodeproj (1.14.0)
|
||||
xcodeproj (1.22.0)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
atomos (~> 0.1.3)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
nanaimo (~> 0.2.6)
|
||||
nanaimo (~> 0.3.0)
|
||||
rexml (~> 3.2.4)
|
||||
xcpretty (0.3.0)
|
||||
rouge (~> 2.0.7)
|
||||
xcpretty-travis-formatter (1.0.0)
|
||||
xcpretty-travis-formatter (1.0.1)
|
||||
xcpretty (~> 0.2, >= 0.0.7)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
arm64-darwin-22
|
||||
x86_64-darwin-20
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
cocoapods
|
||||
fastlane
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.3
|
||||
2.4.10
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
Copyright (c) 2014-2016 Dalton Cherry.
|
||||
Copyright (c) 2014-2023 Dalton Cherry.
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
{
|
||||
"package": "swift-nio-zlib-support",
|
||||
"repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "37760e9a52030bb9011972c5213c3350fa9d41fd",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
+8
-5
@@ -1,4 +1,4 @@
|
||||
// swift-tools-version:4.2
|
||||
// swift-tools-version:5.3
|
||||
|
||||
//
|
||||
// Package.Swift
|
||||
@@ -27,11 +27,14 @@ let package = Package(
|
||||
products: [
|
||||
.library(name: "Starscream", targets: ["Starscream"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/apple/swift-nio-zlib-support.git", from: "1.0.0")
|
||||
],
|
||||
dependencies: [],
|
||||
targets: [
|
||||
.target(name: "Starscream",
|
||||
path: "Sources")
|
||||
path: "Sources",
|
||||
resources: [.copy("PrivacyInfo.xcprivacy")])
|
||||
]
|
||||
)
|
||||
|
||||
#if os(Linux)
|
||||
package.dependencies.append(.package(url: "https://github.com/apple/swift-nio-zlib-support.git", from: "1.0.0"))
|
||||
#endif
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||

|
||||
|
||||
Starscream is a conforming WebSocket ([RFC 6455](http://tools.ietf.org/html/rfc6455)) library in Swift.
|
||||
Starscream is a conforming WebSocket ([RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455)) library in Swift.
|
||||
|
||||
## Features
|
||||
|
||||
- Conforms to all of the base [Autobahn test suite](http://autobahn.ws/testsuite/).
|
||||
- Conforms to all of the base [Autobahn test suite](https://crossbar.io/autobahn/).
|
||||
- Nonblocking. Everything happens in the background, thanks to GCD.
|
||||
- TLS/WSS support.
|
||||
- Compression Extensions support ([RFC 7692](https://tools.ietf.org/html/rfc7692))
|
||||
@@ -61,6 +61,8 @@ func didReceive(event: WebSocketEvent, client: WebSocket) {
|
||||
case .error(let error):
|
||||
isConnected = false
|
||||
handleError(error)
|
||||
case .peerClosed:
|
||||
break
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -103,7 +105,6 @@ socket.write(ping: Data()) //example on how to write a ping control frame over t
|
||||
|
||||
### write a pong frame
|
||||
|
||||
|
||||
the writePong method is the same as writePing, but sends a pong control frame.
|
||||
|
||||
```swift
|
||||
@@ -165,7 +166,7 @@ TODO: Update docs on how to load certificates and public keys into an app bundle
|
||||
|
||||
### Compression Extensions
|
||||
|
||||
Compression Extensions ([RFC 7692](https://tools.ietf.org/html/rfc7692)) is supported in Starscream. Compression is enabled by default, however compression will only be used if it is supported by the server as well. You may enable or disable compression via the `.enableCompression` property:
|
||||
Compression Extensions ([RFC 7692](https://tools.ietf.org/html/rfc7692)) is supported in Starscream. Compression is enabled by default, however compression will only be used if it is supported by the server as well. You may enable compression by adding a `compressionHandler`:
|
||||
|
||||
```swift
|
||||
var request = URLRequest(url: URL(string: "ws://localhost:8080/")!)
|
||||
@@ -195,6 +196,18 @@ Starscream works with iOS 8/10.10 or above for CocoaPods/framework support. To u
|
||||
|
||||
## Installation
|
||||
|
||||
### Swift Package Manager
|
||||
|
||||
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.
|
||||
|
||||
Once you have your Swift package set up, adding Starscream as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
|
||||
|
||||
```swift
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/daltoniam/Starscream.git", from: "4.0.6")
|
||||
]
|
||||
```
|
||||
|
||||
### CocoaPods
|
||||
|
||||
Check out [Get Started](http://cocoapods.org/) tab on [cocoapods.org](http://cocoapods.org/).
|
||||
@@ -202,10 +215,10 @@ Check out [Get Started](http://cocoapods.org/) tab on [cocoapods.org](http://coc
|
||||
To use Starscream in your project add the following 'Podfile' to your project
|
||||
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
platform :ios, '9.0'
|
||||
platform :ios, '12.0'
|
||||
use_frameworks!
|
||||
|
||||
pod 'Starscream', '~> 4.0.0'
|
||||
pod 'Starscream', '~> 4.0.6'
|
||||
|
||||
Then run:
|
||||
|
||||
@@ -227,54 +240,7 @@ $ brew install carthage
|
||||
To integrate Starscream into your Xcode project using Carthage, specify it in your `Cartfile`:
|
||||
|
||||
```
|
||||
github "daltoniam/Starscream" >= 4.0.0
|
||||
```
|
||||
|
||||
### Accio
|
||||
|
||||
Check out the [Accio](https://github.com/JamitLabs/Accio) docs on how to add a install.
|
||||
|
||||
Add the following to your Package.swift:
|
||||
|
||||
```swift
|
||||
.package(url: "https://github.com/daltoniam/Starscream.git", .upToNextMajor(from: "4.0.0")),
|
||||
```
|
||||
|
||||
Next, add `Starscream` to your App targets dependencies like so:
|
||||
|
||||
```swift
|
||||
.target(
|
||||
name: "App",
|
||||
dependencies: [
|
||||
"Starscream",
|
||||
]
|
||||
),
|
||||
```
|
||||
|
||||
Then run `accio update`.
|
||||
|
||||
### 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.
|
||||
|
||||
### Swift Package Manager
|
||||
|
||||
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.
|
||||
|
||||
Once you have your Swift package set up, adding Starscream as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
|
||||
|
||||
```swift
|
||||
dependencies: [
|
||||
.Package(url: "https://github.com/daltoniam/Starscream.git", majorVersion: 4)
|
||||
]
|
||||
github "daltoniam/Starscream" >= 4.0.6
|
||||
```
|
||||
|
||||
### Other
|
||||
@@ -290,6 +256,9 @@ If you are running this in an OSX app or on a physical iOS device you will need
|
||||
## TODOs
|
||||
|
||||
- [ ] Proxy support
|
||||
- [ ] Thread safe implementation
|
||||
- [ ] Better testing/CI
|
||||
- [ ] SSL Pinning/client auth examples
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -44,6 +44,10 @@ public class WSCompression: CompressionHandler {
|
||||
guard let extensionHeader = headers[headerWSExtensionName] else { return }
|
||||
decompressorTakeOver = false
|
||||
compressorTakeOver = false
|
||||
|
||||
// assume defaults unless the headers say otherwise
|
||||
compressor = Compressor(windowBits: 15)
|
||||
decompressor = Decompressor(windowBits: 15)
|
||||
|
||||
let parts = extensionHeader.components(separatedBy: ";")
|
||||
for p in parts {
|
||||
@@ -147,10 +151,12 @@ class Decompressor {
|
||||
strm.avail_in = CUnsignedInt(count)
|
||||
|
||||
repeat {
|
||||
strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
|
||||
strm.avail_out = CUnsignedInt(buffer.count)
|
||||
buffer.withUnsafeMutableBytes { (bufferPtr) in
|
||||
strm.next_out = bufferPtr.bindMemory(to: UInt8.self).baseAddress
|
||||
strm.avail_out = CUnsignedInt(bufferPtr.count)
|
||||
|
||||
res = inflate(&strm, 0)
|
||||
res = inflate(&strm, 0)
|
||||
}
|
||||
|
||||
let byteCount = buffer.count - Int(strm.avail_out)
|
||||
out.append(buffer, count: byteCount)
|
||||
@@ -202,6 +208,11 @@ class Compressor {
|
||||
}
|
||||
|
||||
func compress(_ data: Data) throws -> Data {
|
||||
guard !data.isEmpty else {
|
||||
// For example, PONG has no content
|
||||
return data
|
||||
}
|
||||
|
||||
var compressed = Data()
|
||||
var res: CInt = 0
|
||||
data.withUnsafeBytes { (ptr:UnsafePointer<UInt8>) -> Void in
|
||||
@@ -209,10 +220,12 @@ class Compressor {
|
||||
strm.avail_in = CUnsignedInt(data.count)
|
||||
|
||||
repeat {
|
||||
strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
|
||||
strm.avail_out = CUnsignedInt(buffer.count)
|
||||
buffer.withUnsafeMutableBytes { (bufferPtr) in
|
||||
strm.next_out = bufferPtr.bindMemory(to: UInt8.self).baseAddress
|
||||
strm.avail_out = CUnsignedInt(bufferPtr.count)
|
||||
|
||||
res = deflate(&strm, Z_SYNC_FLUSH)
|
||||
res = deflate(&strm, Z_SYNC_FLUSH)
|
||||
}
|
||||
|
||||
let byteCount = buffer.count - Int(strm.avail_out)
|
||||
compressed.append(buffer, count: byteCount)
|
||||
|
||||
@@ -27,22 +27,20 @@ import Foundation
|
||||
internal extension Data {
|
||||
struct ByteError: Swift.Error {}
|
||||
|
||||
#if swift(>=5.0)
|
||||
func withUnsafeBytes<ResultType, ContentType>(_ completion: (UnsafePointer<ContentType>) throws -> ResultType) rethrows -> ResultType {
|
||||
#if swift(>=5.0)
|
||||
return try withUnsafeBytes {
|
||||
return try withUnsafeBytes {
|
||||
if let baseAddress = $0.baseAddress, $0.count > 0 {
|
||||
return try completion(baseAddress.assumingMemoryBound(to: ContentType.self))
|
||||
} else {
|
||||
throw ByteError()
|
||||
}
|
||||
}
|
||||
#else
|
||||
return try withUnsafeBytes(completion)
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if swift(>=5.0)
|
||||
mutating func withUnsafeMutableBytes<ResultType, ContentType>(_ completion: (UnsafeMutablePointer<ContentType>) throws -> ResultType) rethrows -> ResultType {
|
||||
#if swift(>=5.0)
|
||||
return try withUnsafeMutableBytes {
|
||||
if let baseAddress = $0.baseAddress, $0.count > 0 {
|
||||
return try completion(baseAddress.assumingMemoryBound(to: ContentType.self))
|
||||
@@ -50,8 +48,6 @@ internal extension Data {
|
||||
throw ByteError()
|
||||
}
|
||||
}
|
||||
#else
|
||||
return try withUnsafeMutableBytes(completion)
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,14 +1,28 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Engine.swift
|
||||
// Starscream
|
||||
//
|
||||
// Created by Dalton Cherry on 6/15/19.
|
||||
// Created by Dalton Cherry on 6/15/19
|
||||
// Copyright © 2019 Vluxe. All rights reserved.
|
||||
//
|
||||
// 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
|
||||
|
||||
public protocol EngineDelegate: class {
|
||||
public protocol EngineDelegate: AnyObject {
|
||||
func didReceive(event: WebSocketEvent)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// NativeEngine.swift
|
||||
// Starscream
|
||||
//
|
||||
// Created by Dalton Cherry on 6/15/19.
|
||||
// Created by Dalton Cherry on 6/15/19
|
||||
// Copyright © 2019 Vluxe. All rights reserved.
|
||||
//
|
||||
// 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
|
||||
|
||||
@@ -72,6 +86,7 @@ public class NativeEngine: NSObject, Engine, URLSessionDataDelegate, URLSessionW
|
||||
break
|
||||
case .failure(let error):
|
||||
self?.broadcast(event: .error(error))
|
||||
return
|
||||
}
|
||||
self?.doRead()
|
||||
}
|
||||
@@ -93,4 +108,8 @@ public class NativeEngine: NSObject, Engine, URLSessionDataDelegate, URLSessionW
|
||||
}
|
||||
broadcast(event: .disconnected(r, UInt16(closeCode.rawValue)))
|
||||
}
|
||||
|
||||
public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
|
||||
broadcast(event: .error(error))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// WSEngine.swift
|
||||
// Starscream
|
||||
//
|
||||
// Created by Dalton Cherry on 6/15/19.
|
||||
// Created by Dalton Cherry on 6/15/19
|
||||
// Copyright © 2019 Vluxe. All rights reserved.
|
||||
//
|
||||
// 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
|
||||
|
||||
@@ -24,6 +38,7 @@ FrameCollectorDelegate, HTTPHandlerDelegate {
|
||||
private let writeQueue = DispatchQueue(label: "com.vluxe.starscream.writequeue")
|
||||
private let mutex = DispatchSemaphore(value: 1)
|
||||
private var canSend = false
|
||||
private var isConnecting = false
|
||||
|
||||
weak var delegate: EngineDelegate?
|
||||
public var respondToPingWithPong: Bool = true
|
||||
@@ -50,9 +65,10 @@ FrameCollectorDelegate, HTTPHandlerDelegate {
|
||||
|
||||
public func start(request: URLRequest) {
|
||||
mutex.wait()
|
||||
let isConnecting = self.isConnecting
|
||||
let isConnected = canSend
|
||||
mutex.signal()
|
||||
if isConnected {
|
||||
if isConnecting || isConnected {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -64,6 +80,9 @@ FrameCollectorDelegate, HTTPHandlerDelegate {
|
||||
guard let url = request.url else {
|
||||
return
|
||||
}
|
||||
mutex.wait()
|
||||
self.isConnecting = true
|
||||
mutex.signal()
|
||||
transport.connect(url: url, timeout: request.timeoutInterval, certificatePinning: certPinner)
|
||||
}
|
||||
|
||||
@@ -79,6 +98,10 @@ FrameCollectorDelegate, HTTPHandlerDelegate {
|
||||
}
|
||||
|
||||
public func forceStop() {
|
||||
mutex.wait()
|
||||
isConnecting = false
|
||||
mutex.signal()
|
||||
|
||||
transport.disconnect()
|
||||
}
|
||||
|
||||
@@ -139,7 +162,13 @@ FrameCollectorDelegate, HTTPHandlerDelegate {
|
||||
}
|
||||
}
|
||||
case .cancelled:
|
||||
mutex.wait()
|
||||
isConnecting = false
|
||||
mutex.signal()
|
||||
|
||||
broadcast(event: .cancelled)
|
||||
case .peerClosed:
|
||||
broadcast(event: .peerClosed)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,6 +182,7 @@ FrameCollectorDelegate, HTTPHandlerDelegate {
|
||||
return
|
||||
}
|
||||
mutex.wait()
|
||||
isConnecting = false
|
||||
didUpgrade = true
|
||||
canSend = true
|
||||
mutex.signal()
|
||||
@@ -225,6 +255,7 @@ FrameCollectorDelegate, HTTPHandlerDelegate {
|
||||
|
||||
private func reset() {
|
||||
mutex.wait()
|
||||
isConnecting = false
|
||||
canSend = false
|
||||
didUpgrade = false
|
||||
mutex.signal()
|
||||
|
||||
@@ -76,12 +76,6 @@ public class FoundationHTTPHandler: HTTPHandler {
|
||||
return false //not enough data, wait for more
|
||||
}
|
||||
|
||||
let code = CFHTTPMessageGetResponseStatusCode(response)
|
||||
if code != HTTPWSHeader.switchProtocolCode {
|
||||
delegate?.didReceiveHTTP(event: .failure(HTTPUpgradeError.notAnUpgrade(code)))
|
||||
return true
|
||||
}
|
||||
|
||||
if let cfHeaders = CFHTTPMessageCopyAllHeaderFields(response) {
|
||||
let nsHeaders = cfHeaders.takeRetainedValue() as NSDictionary
|
||||
var headers = [String: String]()
|
||||
@@ -90,6 +84,13 @@ public class FoundationHTTPHandler: HTTPHandler {
|
||||
headers[key] = value
|
||||
}
|
||||
}
|
||||
|
||||
let code = CFHTTPMessageGetResponseStatusCode(response)
|
||||
if code != HTTPWSHeader.switchProtocolCode {
|
||||
delegate?.didReceiveHTTP(event: .failure(HTTPUpgradeError.notAnUpgrade(code, headers)))
|
||||
return true
|
||||
}
|
||||
|
||||
delegate?.didReceiveHTTP(event: .success(headers))
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class FoundationHTTPServerHandler: HTTPServerHandler {
|
||||
return false //not enough data, wait for more
|
||||
}
|
||||
if let method = CFHTTPMessageCopyRequestMethod(response)?.takeRetainedValue() {
|
||||
if method != getVerb {
|
||||
if (method as NSString) != getVerb {
|
||||
delegate?.didReceive(event: .failure(HTTPUpgradeError.invalidData))
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol FrameCollectorDelegate: class {
|
||||
public protocol FrameCollectorDelegate: AnyObject {
|
||||
func didForm(event: FrameCollector.Event)
|
||||
func decompress(data: Data, isFinal: Bool) -> Data?
|
||||
}
|
||||
@@ -84,19 +84,15 @@ public class FrameCollector {
|
||||
}
|
||||
buffer.append(payload)
|
||||
frameCount += 1
|
||||
if isText {
|
||||
if String(data: buffer, encoding: .utf8) == nil {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
delegate?.didForm(event: .error(WSError(type: .protocolError, message: "not valid UTF-8 data", code: errCode)))
|
||||
reset()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if frame.isFin {
|
||||
if isText {
|
||||
let string = String(data: buffer, encoding: .utf8) ?? ""
|
||||
delegate?.didForm(event: .text(string))
|
||||
if let string = String(data: buffer, encoding: .utf8) {
|
||||
delegate?.didForm(event: .text(string))
|
||||
} else {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
delegate?.didForm(event: .error(WSError(type: .protocolError, message: "not valid UTF-8 data", code: errCode)))
|
||||
}
|
||||
} else {
|
||||
delegate?.didForm(event: .binary(buffer))
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public enum FrameEvent {
|
||||
case error(Error)
|
||||
}
|
||||
|
||||
public protocol FramerEventClient: class {
|
||||
public protocol FramerEventClient: AnyObject {
|
||||
func frameProcessed(event: FrameEvent)
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public class WSFramer: Framer {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
return .failed(WSError(type: .protocolError, message: "masked and rsv data is not currently supported", code: errCode))
|
||||
}
|
||||
let isControlFrame = (opcode == .connectionClose || opcode == .ping)
|
||||
let isControlFrame = (opcode == .connectionClose || opcode == .ping || opcode == .pong)
|
||||
if !isControlFrame && (opcode != .binaryFrame && opcode != .continueFrame &&
|
||||
opcode != .textFrame && opcode != .pong) {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
import Foundation
|
||||
|
||||
public enum HTTPUpgradeError: Error {
|
||||
case notAnUpgrade(Int)
|
||||
case notAnUpgrade(Int, [String: String])
|
||||
case invalidData
|
||||
}
|
||||
|
||||
@@ -67,12 +67,14 @@ public struct HTTPWSHeader {
|
||||
req.setValue(HTTPWSHeader.versionValue, forHTTPHeaderField: HTTPWSHeader.versionName)
|
||||
req.setValue(secKeyValue, forHTTPHeaderField: HTTPWSHeader.keyName)
|
||||
|
||||
if let cookies = HTTPCookieStorage.shared.cookies(for: url), !cookies.isEmpty {
|
||||
let headers = HTTPCookie.requestHeaderFields(with: cookies)
|
||||
for (key, val) in headers {
|
||||
req.setValue(key, forHTTPHeaderField: val)
|
||||
if req.allHTTPHeaderFields?["Cookie"] == nil {
|
||||
if let cookies = HTTPCookieStorage.shared.cookies(for: url), !cookies.isEmpty {
|
||||
let headers = HTTPCookie.requestHeaderFields(with: cookies)
|
||||
for (key, val) in headers {
|
||||
req.setValue(val, forHTTPHeaderField: key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if supportsCompression {
|
||||
let val = "permessage-deflate; client_max_window_bits; server_max_window_bits=15"
|
||||
@@ -94,7 +96,7 @@ public enum HTTPEvent {
|
||||
case failure(Error)
|
||||
}
|
||||
|
||||
public protocol HTTPHandlerDelegate: class {
|
||||
public protocol HTTPHandlerDelegate: AnyObject {
|
||||
func didReceiveHTTP(event: HTTPEvent)
|
||||
}
|
||||
|
||||
@@ -104,7 +106,7 @@ public protocol HTTPHandler {
|
||||
func parse(data: Data) -> Int
|
||||
}
|
||||
|
||||
public protocol HTTPServerDelegate: class {
|
||||
public protocol HTTPServerDelegate: AnyObject {
|
||||
func didReceive(event: HTTPEvent)
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ public class StringHTTPHandler: HTTPHandler {
|
||||
}
|
||||
|
||||
if code != HTTPWSHeader.switchProtocolCode {
|
||||
delegate?.didReceiveHTTP(event: .failure(HTTPUpgradeError.notAnUpgrade(code)))
|
||||
delegate?.didReceiveHTTP(event: .failure(HTTPUpgradeError.notAnUpgrade(code, headers)))
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?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>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -44,9 +44,7 @@ extension FoundationSecurity: CertificatePinning {
|
||||
return
|
||||
}
|
||||
|
||||
if let validateDomain = domain {
|
||||
SecTrustSetPolicies(trust, SecPolicyCreateSSL(true, validateDomain as NSString?))
|
||||
}
|
||||
SecTrustSetPolicies(trust, SecPolicyCreateSSL(true, domain as NSString?))
|
||||
|
||||
handleSecurityTrust(trust: trust, completion: completion)
|
||||
}
|
||||
|
||||
@@ -34,12 +34,12 @@ public enum PinningState {
|
||||
|
||||
// CertificatePinning protocol provides an interface for Transports to handle Certificate
|
||||
// or Public Key Pinning.
|
||||
public protocol CertificatePinning: class {
|
||||
public protocol CertificatePinning: AnyObject {
|
||||
func evaluateTrust(trust: SecTrust, domain: String?, completion: ((PinningState) -> ()))
|
||||
}
|
||||
|
||||
// validates the "Sec-WebSocket-Accept" header as defined 1.3 of the RFC 6455
|
||||
// https://tools.ietf.org/html/rfc6455#section-1.3
|
||||
public protocol HeaderValidator: class {
|
||||
public protocol HeaderValidator: AnyObject {
|
||||
func validate(headers: [String: String], key: String) -> Error?
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public protocol Connection {
|
||||
func write(data: Data, opcode: FrameOpCode)
|
||||
}
|
||||
|
||||
public protocol ConnectionDelegate: class {
|
||||
public protocol ConnectionDelegate: AnyObject {
|
||||
func didReceive(event: ServerEvent)
|
||||
}
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@ public class ServerConnection: Connection, HTTPServerDelegate, FramerEventClient
|
||||
case .cancelled:
|
||||
print("server connection cancelled!")
|
||||
//broadcast(event: .cancelled)
|
||||
case .peerClosed:
|
||||
delegate?.didReceive(event: .disconnected(self, "Connection closed by peer", UInt16(FrameOpCode.connectionClose.rawValue)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+15
-3
@@ -1,10 +1,24 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Starscream.h
|
||||
// Starscream
|
||||
//
|
||||
// Created by Austin Cherry on 9/25/14.
|
||||
// Copyright (c) 2014 Vluxe. All rights reserved.
|
||||
// Copyright © 2014 Vluxe. All rights reserved.
|
||||
//
|
||||
// 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/Foundation.h>
|
||||
|
||||
@@ -15,5 +29,3 @@ FOUNDATION_EXPORT double StarscreamVersionNumber;
|
||||
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>
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public struct WSError: Error {
|
||||
}
|
||||
}
|
||||
|
||||
public protocol WebSocketClient: class {
|
||||
public protocol WebSocketClient: AnyObject {
|
||||
func connect()
|
||||
func disconnect(closeCode: UInt16)
|
||||
func write(string: String, completion: (() -> ())?)
|
||||
@@ -85,10 +85,11 @@ public enum WebSocketEvent {
|
||||
case viabilityChanged(Bool)
|
||||
case reconnectSuggested(Bool)
|
||||
case cancelled
|
||||
case peerClosed
|
||||
}
|
||||
|
||||
public protocol WebSocketDelegate: class {
|
||||
func didReceive(event: WebSocketEvent, client: WebSocket)
|
||||
public protocol WebSocketDelegate: AnyObject {
|
||||
func didReceive(event: WebSocketEvent, client: WebSocketClient)
|
||||
}
|
||||
|
||||
open class WebSocket: WebSocketClient, EngineDelegate {
|
||||
@@ -110,11 +111,6 @@ open class WebSocket: WebSocketClient, EngineDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
// serial write queue to ensure writes happen in order
|
||||
private let writeQueue = DispatchQueue(label: "com.vluxe.starscream.writequeue")
|
||||
private var canSend = false
|
||||
private let mutex = DispatchSemaphore(value: 1)
|
||||
|
||||
public init(request: URLRequest, engine: Engine) {
|
||||
self.request = request
|
||||
self.engine = engine
|
||||
|
||||
@@ -47,7 +47,12 @@ public class FoundationTransport: NSObject, Transport, StreamDelegate {
|
||||
onConnect = streamConfiguration
|
||||
}
|
||||
|
||||
public func connect(url: URL, timeout: Double = 10, certificatePinning: CertificatePinning? = nil) {
|
||||
deinit {
|
||||
inputStream?.delegate = nil
|
||||
outputStream?.delegate = nil
|
||||
}
|
||||
|
||||
public func connect(url: URL, timeout: Double = 10, certificatePinning: CertificatePinning? = nil) {
|
||||
guard let parts = url.getParts() else {
|
||||
delegate?.connectionChanged(state: .failed(FoundationTransportError.invalidRequest))
|
||||
return
|
||||
|
||||
@@ -35,7 +35,11 @@ public class TCPTransport: Transport {
|
||||
private weak var delegate: TransportEventClient?
|
||||
private var isRunning = false
|
||||
private var isTLS = false
|
||||
|
||||
|
||||
deinit {
|
||||
disconnect()
|
||||
}
|
||||
|
||||
public var usingTLS: Bool {
|
||||
return self.isTLS
|
||||
}
|
||||
@@ -85,6 +89,7 @@ public class TCPTransport: Transport {
|
||||
public func disconnect() {
|
||||
isRunning = false
|
||||
connection?.cancel()
|
||||
connection = nil
|
||||
}
|
||||
|
||||
public func register(delegate: TransportEventClient) {
|
||||
@@ -141,7 +146,23 @@ public class TCPTransport: Transport {
|
||||
if let data = data {
|
||||
s.delegate?.connectionChanged(state: .receive(data))
|
||||
}
|
||||
s.readLoop()
|
||||
|
||||
// Refer to https://developer.apple.com/documentation/network/implementing_netcat_with_network_framework
|
||||
if let context = context, context.isFinal, isComplete {
|
||||
if let delegate = s.delegate {
|
||||
// Let the owner of this TCPTransport decide what to do next: disconnect or reconnect?
|
||||
delegate.connectionChanged(state: .peerClosed)
|
||||
} else {
|
||||
// No use to keep connection alive
|
||||
s.disconnect()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if error == nil {
|
||||
s.readLoop()
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Transport.swift
|
||||
// Starscream
|
||||
//
|
||||
@@ -25,28 +23,38 @@
|
||||
import Foundation
|
||||
|
||||
public enum ConnectionState {
|
||||
/// Ready connections can send and receive data
|
||||
case connected
|
||||
|
||||
/// Waiting connections have not yet been started, or do not have a viable network
|
||||
case waiting
|
||||
|
||||
/// Cancelled connections have been invalidated by the client and will send no more events
|
||||
case cancelled
|
||||
|
||||
/// Failed connections are disconnected and can no longer send or receive data
|
||||
case failed(Error?)
|
||||
|
||||
//the viability (connection status) of the connection has updated
|
||||
//e.g. connection is down, connection came back up, etc
|
||||
/// Viability (connection status) of the connection has updated
|
||||
/// e.g. connection is down, connection came back up, etc.
|
||||
case viability(Bool)
|
||||
|
||||
//the connection has upgrade to wifi from cellular.
|
||||
//you should consider reconnecting to take advantage of this
|
||||
/// Connection ca be upgraded to wifi from cellular.
|
||||
/// You should consider reconnecting to take advantage of this.
|
||||
case shouldReconnect(Bool)
|
||||
|
||||
//the connection receive data
|
||||
/// Received data
|
||||
case receive(Data)
|
||||
|
||||
/// Remote peer has closed the network connection.
|
||||
case peerClosed
|
||||
}
|
||||
|
||||
public protocol TransportEventClient: class {
|
||||
public protocol TransportEventClient: AnyObject {
|
||||
func connectionChanged(state: ConnectionState)
|
||||
}
|
||||
|
||||
public protocol Transport: class {
|
||||
public protocol Transport: AnyObject {
|
||||
func register(delegate: TransportEventClient)
|
||||
func connect(url: URL, timeout: Double, certificatePinning: CertificatePinning?)
|
||||
func disconnect()
|
||||
|
||||
+7
-4
@@ -1,16 +1,19 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "Starscream"
|
||||
s.version = "4.0.2"
|
||||
s.version = "4.0.4"
|
||||
s.summary = "A conforming WebSocket RFC 6455 client library in Swift."
|
||||
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.ios.deployment_target = '12.0'
|
||||
s.osx.deployment_target = '10.13'
|
||||
s.tvos.deployment_target = '12.0'
|
||||
s.watchos.deployment_target = '2.0'
|
||||
s.source_files = 'Sources/**/*.swift'
|
||||
s.swift_version = '5.0'
|
||||
s.resource_bundles = {
|
||||
'Starscream_Privacy' => ['Sources/PrivacyInfo.xcprivacy'],
|
||||
}
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -36,8 +36,19 @@
|
||||
8A906E3F2208C7E80015057D /* WSCompression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A906E3E2208C7E80015057D /* WSCompression.swift */; };
|
||||
8ABD4470224C036A00FB8370 /* Data+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ABD446F224C036A00FB8370 /* Data+Extensions.swift */; };
|
||||
BBB5ABE8215E2217005B48B6 /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5ABE4215E2217005B48B6 /* WebSocket.swift */; };
|
||||
FC7E667D2B90B3AD00881886 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = FC7E667C2B90B3AD00881886 /* PrivacyInfo.xcprivacy */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
6B0BE7AA24A157BB0051F7A7 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 6B3E79DD19D48B7F006071F7 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 33CCF0841F5DDC030099B092;
|
||||
remoteInfo = Starscream;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
335FA2021F5DF71D00F6D2EC /* Starscream Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Starscream Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CCF0921F5DDC030099B092 /* Starscream.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Starscream.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -70,6 +81,7 @@
|
||||
BBB5ABE4215E2217005B48B6 /* WebSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.swift; name = WebSocket.swift; path = Starscream/WebSocket.swift; sourceTree = "<group>"; tabWidth = 4; };
|
||||
D88EAF811ED4DFD3004FE2C3 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||
D88EAF831ED4E7D8004FE2C3 /* CompressionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompressionTests.swift; sourceTree = "<group>"; };
|
||||
FC7E667C2B90B3AD00881886 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -150,6 +162,7 @@
|
||||
6B3E79E919D48B7F006071F7 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FC7E667C2B90B3AD00881886 /* PrivacyInfo.xcprivacy */,
|
||||
5C13600C1C473BFE00AA3A01 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
@@ -250,6 +263,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
6B0BE7AB24A157BB0051F7A7 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Starscream Tests";
|
||||
productName = StarscreamTests;
|
||||
@@ -280,9 +294,10 @@
|
||||
6B3E79DD19D48B7F006071F7 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftMigration = 0700;
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 1020;
|
||||
LastUpgradeCheck = 1530;
|
||||
ORGANIZATIONNAME = Vluxe;
|
||||
TargetAttributes = {
|
||||
335FA1F41F5DF71D00F6D2EC = {
|
||||
@@ -298,8 +313,8 @@
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 6B3E79DC19D48B7F006071F7;
|
||||
productRefGroup = 6B3E79E719D48B7F006071F7 /* Products */;
|
||||
@@ -324,6 +339,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FC7E667D2B90B3AD00881886 /* PrivacyInfo.xcprivacy in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -372,6 +388,14 @@
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
6B0BE7AB24A157BB0051F7A7 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 33CCF0841F5DDC030099B092 /* Starscream */;
|
||||
targetProxy = 6B0BE7AA24A157BB0051F7A7 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
335FA2001F5DF71D00F6D2EC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
@@ -379,13 +403,24 @@
|
||||
APPLICATION_EXTENSION_API_ONLY = NO;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
"@executable_path/../Frameworks",
|
||||
"@loader_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos appletvsimulator macosx";
|
||||
@@ -403,15 +438,27 @@
|
||||
APPLICATION_EXTENSION_API_ONLY = NO;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
"@executable_path/../Frameworks",
|
||||
"@loader_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos appletvsimulator macosx";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_INSTALL_OBJC_HEADER = NO;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
@@ -422,16 +469,24 @@
|
||||
buildSettings = {
|
||||
BITCODE_GENERATION_MODE = marker;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_MODULE_VERIFIER = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MARKETING_VERSION = 4.0.2;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
|
||||
MARKETING_VERSION = 4.0.4;
|
||||
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
|
||||
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
|
||||
OTHER_LDFLAGS = "-all_load";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -440,7 +495,7 @@
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Debug;
|
||||
@@ -450,25 +505,34 @@
|
||||
buildSettings = {
|
||||
BITCODE_GENERATION_MODE = bitcode;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_MODULE_VERIFIER = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MARKETING_VERSION = 4.0.2;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
|
||||
MARKETING_VERSION = 4.0.4;
|
||||
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
|
||||
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
|
||||
OTHER_LDFLAGS = "-all_load";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Release;
|
||||
@@ -497,6 +561,7 @@
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
@@ -504,8 +569,10 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
@@ -521,13 +588,13 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos";
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos xros xrsimulator";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,4";
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,4,7";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
@@ -557,6 +624,7 @@
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
@@ -564,8 +632,10 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
@@ -574,11 +644,11 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos";
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos xros xrsimulator";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,4";
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,4,7";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1020"
|
||||
LastUpgradeVersion = "1530"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,8 +26,17 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
codeCoverageEnabled = "YES"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CCF0841F5DDC030099B092"
|
||||
BuildableName = "Starscream.framework"
|
||||
BlueprintName = "Starscream"
|
||||
ReferencedContainer = "container:Starscream.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -44,17 +53,6 @@
|
||||
</LocationScenarioReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CCF0841F5DDC030099B092"
|
||||
BuildableName = "Starscream.framework"
|
||||
BlueprintName = "Starscream"
|
||||
ReferencedContainer = "container:Starscream.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -75,8 +73,6 @@
|
||||
ReferencedContainer = "container:Starscream.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FuzzingTests.swift
|
||||
// Starscream
|
||||
@@ -5,6 +6,19 @@
|
||||
// Created by Dalton Cherry on 1/28/19.
|
||||
// Copyright © 2019 Vluxe. All rights reserved.
|
||||
//
|
||||
// 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 XCTest
|
||||
@testable import Starscream
|
||||
@@ -66,6 +80,8 @@ class FuzzingTests: XCTestCase {
|
||||
break
|
||||
case .cancelled:
|
||||
break
|
||||
case .peerClosed:
|
||||
break
|
||||
}
|
||||
}
|
||||
websocket.connect()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// MockServer.swift
|
||||
// Starscream
|
||||
@@ -5,6 +6,19 @@
|
||||
// Created by Dalton Cherry on 1/29/19.
|
||||
// Copyright © 2019 Vluxe. All rights reserved.
|
||||
//
|
||||
// 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
|
||||
@testable import Starscream
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// MockTransport.swift
|
||||
// Starscream
|
||||
//
|
||||
// Created by Dalton Cherry on 1/28/19.
|
||||
// Created by Dalton Cherry on 1/29/19.
|
||||
// Copyright © 2019 Vluxe. All rights reserved.
|
||||
//
|
||||
// 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
|
||||
@testable import Starscream
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// StarscreamTests.swift
|
||||
// StarscreamTests
|
||||
//
|
||||
// Created by Austin Cherry on 9/25/14.
|
||||
// Copyright (c) 2014 Vluxe. All rights reserved.
|
||||
// Copyright © 2014 Vluxe. All rights reserved.
|
||||
//
|
||||
// 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 XCTest
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail && xcodebuild -project Starscream.xcodeproj -scheme Starscream CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO build | xcpretty
|
||||
swift build
|
||||
pod repo update
|
||||
pod lib lint --verbose --allow-warnings
|
||||
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objectVersion = 53;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -160,9 +160,10 @@
|
||||
5C178E141B62D0B900A97204 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftMigration = 0700;
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0640;
|
||||
LastUpgradeCheck = 1430;
|
||||
ORGANIZATIONNAME = vluxe;
|
||||
TargetAttributes = {
|
||||
5C178E1B1B62D0B900A97204 = {
|
||||
@@ -173,10 +174,9 @@
|
||||
};
|
||||
buildConfigurationList = 5C178E171B62D0B900A97204 /* Build configuration list for PBXProject "Autobahn" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
@@ -275,23 +275,36 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
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;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
@@ -307,7 +320,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@@ -320,17 +333,29 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
@@ -346,9 +371,10 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
@@ -361,7 +387,12 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Autobahn/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
@@ -374,7 +405,12 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Autobahn/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.vluxe.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
BIN
Binary file not shown.
@@ -30,19 +30,6 @@ class ViewController: UIViewController, WebSocketDelegate {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// let err = server.start(address: "localhost", port: 8080)
|
||||
// if err != nil {
|
||||
// print("server didn't start!")
|
||||
// }
|
||||
// server.onEvent = { event in
|
||||
// switch event {
|
||||
// case .text(let conn, let string):
|
||||
// let payload = string.data(using: .utf8)!
|
||||
// conn.write(data: payload, opcode: .textFrame)
|
||||
// default:
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
//https://echo.websocket.org
|
||||
var request = URLRequest(url: URL(string: "http://localhost:8080")!) //https://localhost:8080
|
||||
request.timeoutInterval = 5
|
||||
@@ -52,7 +39,7 @@ class ViewController: UIViewController, WebSocketDelegate {
|
||||
}
|
||||
|
||||
// MARK: - WebSocketDelegate
|
||||
func didReceive(event: WebSocketEvent, client: WebSocket) {
|
||||
func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocketClient) {
|
||||
switch event {
|
||||
case .connected(let headers):
|
||||
isConnected = true
|
||||
@@ -77,6 +64,8 @@ class ViewController: UIViewController, WebSocketDelegate {
|
||||
case .error(let error):
|
||||
isConnected = false
|
||||
handleError(error)
|
||||
case .peerClosed:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+13
-12
@@ -2,27 +2,28 @@ default_platform(:ios)
|
||||
|
||||
update_fastlane
|
||||
|
||||
|
||||
desc "Run tests"
|
||||
lane :test do
|
||||
run_tests(
|
||||
devices: ["iPhone 14 Pro", "iPad Pro (11-inch) (4th generation)"],
|
||||
)
|
||||
end
|
||||
|
||||
platform :ios do
|
||||
desc "Deploy new version"
|
||||
lane :release do
|
||||
ensure_git_branch
|
||||
version = version_get_podspec(path: "Starscream.podspec")
|
||||
changelog = prompt(text: "Changelog: ", multi_line_end_keyword: "END")
|
||||
|
||||
github_token = ENV['GITHUB_TOKEN']
|
||||
if !github_token || github_token.empty?
|
||||
github_token = prompt(text: "Please enter your GitHub token: ")
|
||||
end
|
||||
version = version_bump_podspec(path: "Starscream.podspec", version_number: ENV["TAG"])
|
||||
changelog = changelog_from_git_commits(merge_commit_filtering: "exclude_merges")
|
||||
|
||||
github_release = set_github_release(
|
||||
repository_name: "daltoniam/Starscream",
|
||||
api_token: github_token,
|
||||
repository_name: "daltoniam/starscream",
|
||||
api_token: ENV["GITHUB_TOKEN"],
|
||||
name: version,
|
||||
tag_name: version,
|
||||
description: changelog,
|
||||
commitish: "master"
|
||||
)
|
||||
sh("git fetch --tags")
|
||||
pod_push(allow_warnings: true, verbose: true)
|
||||
pod_push(allow_warnings: false, verbose: true)
|
||||
end
|
||||
end
|
||||
|
||||
+26
-12
@@ -1,29 +1,43 @@
|
||||
fastlane documentation
|
||||
================
|
||||
----
|
||||
|
||||
# Installation
|
||||
|
||||
Make sure you have the latest version of the Xcode command line tools installed:
|
||||
|
||||
```
|
||||
```sh
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
Install _fastlane_ using
|
||||
```
|
||||
[sudo] gem install fastlane -NV
|
||||
```
|
||||
or alternatively using `brew cask install fastlane`
|
||||
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
|
||||
|
||||
# Available Actions
|
||||
|
||||
### test
|
||||
|
||||
```sh
|
||||
[bundle exec] fastlane test
|
||||
```
|
||||
|
||||
Run tests
|
||||
|
||||
----
|
||||
|
||||
|
||||
## iOS
|
||||
|
||||
### ios release
|
||||
|
||||
```sh
|
||||
[bundle exec] fastlane ios release
|
||||
```
|
||||
fastlane ios release
|
||||
```
|
||||
|
||||
Deploy new version
|
||||
|
||||
----
|
||||
|
||||
This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.
|
||||
More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
|
||||
The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
|
||||
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
|
||||
|
||||
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
|
||||
|
||||
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
bundle install
|
||||
bundle exec fastlane release
|
||||
Reference in New Issue
Block a user