-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from apivideo/bugfix/ios_request_queue
fix(ios): fix the way RequestTaskQueue operation is synchronous
- Loading branch information
Showing
10 changed files
with
123 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-swift: | ||
name: Build with swift | ||
runs-on: macos-12 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: xcode version | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '13.4.1' | ||
- name: Build Package with swift | ||
run: swift build | ||
|
||
build-xcodebuild: | ||
name: Build with xcodebuild | ||
runs-on: macos-12 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: xcode version | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '13.4.1' | ||
- name: Set Default Scheme | ||
run: | | ||
scheme_list=$(xcodebuild -list -json | tr -d "\n") | ||
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['workspace']['schemes'][0]") | ||
echo $default | cat >default | ||
echo Using default scheme: $default | ||
- name: Build Package with xcodebuild | ||
env: | ||
scheme: ${{ 'default' }} | ||
run: | | ||
if [ $scheme = default ]; then scheme=$(cat default); fi | ||
xcodebuild -scheme $scheme -destination 'platform=iOS Simulator,name=iPhone 13' | ||
- name: Build Example | ||
env: | ||
scheme: ${{ 'default' }} | ||
run: | | ||
if [ $scheme = default ]; then scheme=$(cat default); fi | ||
xcodebuild clean build -project Example/Example.xcodeproj -scheme $scheme -sdk iphoneos | ||
cocoapods: | ||
name: Verify cocopods podspec | ||
needs: [ build-xcodebuild ] | ||
runs-on: macos-12 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: xcode version | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '13.4.1' | ||
- name: Verify cocoapods | ||
run: pod lib lint --allow-warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
// ProgressiveUploadSessioning.swift | ||
// ProgressiveUploadSessionProtocol.swift | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol ProgressiveUploadSessionProtocol { | ||
func uploadPart(file: URL, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) throws -> RequestTask | ||
func uploadLastPart(file: URL, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) throws -> RequestTask | ||
func uploadPart(file: URL, partId: Int, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) throws -> RequestTask | ||
func uploadLastPart(file: URL, partId: Int, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) throws -> RequestTask | ||
func uploadPart(file: URL, partId: Int, isLastPart: Bool, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) throws -> RequestTask | ||
func uploadPart(file: URL, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) -> RequestTask | ||
func uploadLastPart(file: URL, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) -> RequestTask | ||
func uploadPart(file: URL, partId: Int, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) -> RequestTask | ||
func uploadLastPart(file: URL, partId: Int, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) -> RequestTask | ||
func uploadPart(file: URL, partId: Int, isLastPart: Bool, onProgressReady: ((Progress) -> Void)?, apiResponseQueue: DispatchQueue, completion: @escaping ((_ data: Video?, _ error: Error?) -> Void)) -> RequestTask | ||
|
||
func cancel() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters