Skip to content

Commit 5bf01ec

Browse files
authored
Merge pull request #88 from pusher/single-target-swift-3
Swift 3, single target, Obj-C compat
2 parents 2530f03 + b1eba6d commit 5bf01ec

File tree

72 files changed

+4741
-4240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4741
-4240
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,6 @@ Carthage/Build
5656
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
5757

5858
fastlane/report.xml
59-
fastlane/screenshots
59+
fastlane/screenshots
60+
61+
.swift-version

.travis.yml

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,10 @@
11
language: objective-c
2-
cache: cocoapods
3-
osx_image: xcode7.3
2+
osx_image: xcode8
43
sudo: false
5-
xcode_workspace: PusherSwift.xcworkspace
6-
xcode_project: PusherSwift.xcodeproj
74
env:
8-
global:
9-
- IOS_SDK=iphonesimulator9.3
10-
- IOS_SCHEME="PusherSwiftTests-iOS"
11-
- MACOS_SDK=macosx10.11
12-
- MACOS_SCHEME="PusherSwiftTests-OSX"
13-
- TVOS_SDK=appletvsimulator9.2
14-
- TVOS_SCHEME="PusherSwiftTests-tvOS"
15-
matrix:
16-
- DESTINATION="OS=9.2,name=iPad 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
17-
- DESTINATION="OS=9.2,name=iPad Air" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
18-
- DESTINATION="OS=9.2,name=iPhone 5" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
19-
- DESTINATION="OS=9.2,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
20-
- DESTINATION="OS=9.3,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
21-
- DESTINATION="OS=8.4,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
22-
- DESTINATION="OS=8.4,name=iPad Air" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
23-
- DESTINATION="OS=9.1,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME"
24-
- DESTINATION="OS=9.2,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME"
25-
- DESTINATION="platform=OS X,arch=x86_64" SDK="$MACOS_SDK" SCHEME="$MACOS_SCHEME"
5+
- iOS= DST='platform=iOS Simulator,name=iPhone 6S' ACTION=test DEVICE='iPhone 6s (10.0)'
6+
- tvOS= DST='platform=tvOS Simulator,name=Apple TV 1080p' ACTION=test DEVICE='Apple TV 1080p (10.0)'
7+
- macOS= DST='platform=OS X' ACTION=test
268
before_install:
279
- brew update
2810
- if brew list | grep -q carthage; then
@@ -32,11 +14,9 @@ before_install:
3214
echo Carthage not installed. Installing using homebrew;
3315
brew install carthage;
3416
fi
35-
- gem install cocoapods --no-document
3617
- gem install xcpretty --no-document
37-
install:
38-
- pod update
39-
- pod install
18+
- SIMULATOR_ID=$(xcrun instruments -s | grep -o "$DEVICE \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$/\1/")
19+
- echo "$SIMULATOR_ID"
4020
before_deploy:
4121
- carthage build --no-skip-current --project-directory PusherSwift
4222
- carthage archive PusherSwift --project-directory PusherSwift
@@ -53,10 +33,11 @@ script:
5333
- set -o pipefail
5434
- xcodebuild -version
5535
- xcodebuild -workspace PusherSwift.xcworkspace -list
56-
- if [ "$SCHEME" == "PusherSwiftTests-OSX" ]; then
57-
xcodebuild -workspace PusherSwift.xcworkspace -scheme "$SCHEME" -destination "$DESTINATION" -sdk "$SDK" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO test -enableCodeCoverage YES | xcpretty -tc;
58-
else
59-
xcodebuild -workspace PusherSwift.xcworkspace -scheme "$SCHEME" -destination "$DESTINATION" -sdk "$SDK" test -enableCodeCoverage YES | xcpretty -tc;
36+
- if [ "$DST" != "platform=OS X" ]; then
37+
echo "$SIMULARTOR_ID";
38+
open -a "simulator" --args -CurrentDeviceUDID $SIMULATOR_ID || true; sleep 20;
6039
fi
40+
- xcodebuild -scheme PusherSwift -destination "$DST" -project PusherSwift/PusherSwift.xcodeproj clean build | xcpretty -tc;
41+
- xcodebuild -scheme PusherSwift -destination "$DST" -project PusherSwift/PusherSwift.xcodeproj -enableCodeCoverage YES $ACTION | xcpretty -tc;
6142
after_success:
62-
- sleep 5
43+
- sleep 5

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 3.0.0
4+
5+
* Update to work with Swift 3
6+
* Rewrot all tests using XCTest
7+
* Remove all need for Podfile / Cartfile when building PusherSwift locally
8+
* Combine different builds into single target
9+
* Merge in native notification code into main branch (push-notifications branch)
10+
* Consolidate connection-related handlers / callbacks into `PusherConnectionDelegate`
11+
* Make `requestFor` in `AuthRequestBuilderProtocol` able to fail
12+
* Rename `PresencePusherChannel` -> `PusherPresenceChannel`
13+
* Rename `PresenceChannelMember` -> `PusherPresenceChannelMember`
14+
* Rename `internal` `authMethod` enum case to `inline`
15+
* Add Obj-C compatibility
16+
* Add iOS Obj-C example app
17+
* Add `subscribeToPresenceChannel` method
18+
319
## 2.0.1
420

521
* Fix potential forceful unwrapping of a nil in debug logging when reconnecting (thanks to [@psycotica0](https://github.com/psycotica0) for the spot)
@@ -16,7 +32,7 @@
1632

1733
## 1.0.0
1834

19-
* Add `onMemberAdded`, `onMemberRemoved`, `findMember`, and `me` functions to PresencePusherChannel class
35+
* Add `onMemberAdded`, `onMemberRemoved`, `findMember`, and `me` functions to PusherPresenceChannel class
2036
* Bring CryptoSwift, Starscream and Reachability dependencies inside the PusherSwift library
2137
* Update Quick and Nimble dependencies to remove warnings for Swift compatibility
2238
* Use cocoapods version 1.0.0 on Travis

Cartfile

Whitespace-only changes.

Cartfile.resolved

Whitespace-only changes.

Gemfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 66 deletions
This file was deleted.

Podfile

Lines changed: 0 additions & 28 deletions
This file was deleted.

Podfile.lock

Lines changed: 0 additions & 15 deletions
This file was deleted.

PusherSwift.xcworkspace/contents.xcworkspacedata

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)