Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
USE_CCACHE: 1
SDK_VERSION: 11.0.0.GA
SDK_VERSION: 13.4.1.GA
MODULE_ID: ti.socketio
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7

- name: Use Node.js 14.x
uses: actions/setup-node@v2
- name: Use Node.js 22.x
uses: actions/setup-node@v7
with:
node-version: '14.x'
node-version: '22.x'

- name: Cache Node.js modules
id: node-cache
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }}
Expand All @@ -38,17 +38,17 @@ jobs:
${{ runner.OS }}-

- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v6
with:
distribution: 'adopt'
java-version: 11
distribution: 'temurin'
java-version: 18

- run: npm ci
name: Install dependencies
if: steps.node-cache.outputs.cache-hit != 'true'

- name: Cache Gradle packages
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: |
~/.gradle/caches
Expand All @@ -71,28 +71,31 @@ jobs:
run: brew install ccache

- name: Retrieve ccache
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-

- name: Build and Test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
target: playstore
script: npm run test:android -- --sdkVersion ${{ env.SDK_VERSION }}
disable-animations: false # defaulting to true, the commands sent to emulator to do this sometimes run too quickly after boot and cause "adb: device offline" failures
- name: Build module
run: ti build -p android --build-only -d android --sdk ${{ env.SDK_VERSION }}

# - name: Build and Test
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 29
# target: playstore
# script: npm run test:android -- --sdkVersion ${{ env.SDK_VERSION }}
# disable-animations: false # defaulting to true, the commands sent to emulator to do this sometimes run too quickly after boot and cause "adb: device offline" failures

- name: Show summary of ccache configuration and statistics counters
run: ccache --show-stats

# TODO: Grab the version so zip file name can contain it

- name: Archive Android zip
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v7
with:
name: ${{ env.MODULE_ID }}-android
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
name: Verify contributor

steps:
- uses: tidev/tidev-cla-action@v1
- uses: tidev/tidev-cla-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
name: Docs
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7

- name: Use Node.js 14.x
uses: actions/setup-node@v2
- name: Use Node.js 22.x
uses: actions/setup-node@v7
with:
node-version: '14.x'
node-version: '22.x'

- run: npm ci
name: Install dependencies
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ jobs:
runs-on: macos-latest
name: iOS
env:
SDK_VERSION: 11.0.0.GA
SDK_VERSION: 13.4.1.GA
MODULE_ID: ti.socketio
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7

- name: Use Node.js 14.x
uses: actions/setup-node@v2
- name: Use Node.js 22.x
uses: actions/setup-node@v7
with:
node-version: '14.x'
node-version: '22.x'

- name: Cache Node.js modules
id: node-cache
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }}
Expand All @@ -53,11 +53,14 @@ jobs:
- run: sed -i .bak 's/TITANIUM_SDK_VERSION = .*/TITANIUM_SDK_VERSION = ${{ env.SDK_VERSION }}/' ios/titanium.xcconfig
name: Set to Build with newly installed SDK

- run: npm run test:ios -- --sdkVersion ${{ env.SDK_VERSION }}
name: Build and Test
- name: Build module
run: ti build -p ios --build-only -d ios --sdk ${{ env.SDK_VERSION }}

# - run: npm run test:ios -- --sdkVersion ${{ env.SDK_VERSION }}
# name: Build and Test

- name: Archive iOS artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v7
with:
name: ${{ env.MODULE_ID }}-ios
path: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
runs-on: ubuntu-latest
name: JavaScript
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7

- name: Use Node.js 14.x
uses: actions/setup-node@v2
- name: Use Node.js 22.x
uses: actions/setup-node@v7
with:
node-version: '14.x'
node-version: '22.x'

- name: Cache Node.js modules
id: node-cache
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ node_modules/

# Test reports
TESTS-*.xml

# Ignored, see the README.md in platform/ for details
/ios/platform/Starscream.xcframework
/ios/platform/SocketIO.xcframework
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
## Requirements

- [x] Android: Titanium SDK 9.0.0+
- [x] iOS: Titanium SDK 7.4.0+ / Xcode 10.2 / Swift 5.0+
- [x] iOS: Titanium SDK 13.1.0+ / Xcode 15+

> 💡 The iOS module is built with Swift 5.0 and you need to have the same Swift version installed to be able to use this module. You can check your current Swift version by using swift -v from the terminal.
> 💡 The iOS module version 4.x supports Socket.io Server 3.x/4.x. The native client is a Swift package, so Titanium SDK 13.1.0 or later is required.

> 💡 The Android module version 4.x will support Socket.io Server 3.x/4.x

Expand Down
16 changes: 16 additions & 0 deletions ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- Rewrote the module in Swift.
- Updated the native client to socket.io-client-swift 16.1.1. The module now speaks the socket.io v3 and v4 protocol. Servers that run socket.io v2 are no longer supported.
- The native client is resolved with Swift Package Manager through `spm.json`. The module needs Titanium SDK 13.1.0.GA or later.
- The `path` option is passed to the native client instead of being ignored.

### Fixed

- Sockets connect automatically again unless `autoConnect: false` is set.
- The connect timeout defaults to 20 seconds, same as the web client.
- `emit()` sends each argument as a separate argument and calls the ack callback.
- `once()` is available again.
- `connect_timeout` fires to the handlers that were registered with `on()`.
- Query parameters of the connect URL are passed as `connectParams`.

## [2.0.0] - 2019-02-06

### Added
Expand Down
1 change: 0 additions & 1 deletion ios/Cartfile

This file was deleted.

2 changes: 0 additions & 2 deletions ios/Cartfile.resolved

This file was deleted.

22 changes: 0 additions & 22 deletions ios/Classes/ComAppcTitaniumSocketioModuleAssets.m

This file was deleted.

33 changes: 0 additions & 33 deletions ios/Classes/SocketIOClientProxy.h

This file was deleted.

Loading
Loading