Skip to content

Commit

Permalink
Merge pull request #45 from RxSwiftCommunity/feature/swift3
Browse files Browse the repository at this point in the history
Support for Swift 3 (and Xcode 9.2 beta 2) 🎉
  • Loading branch information
esttorhe authored Jun 27, 2017
2 parents 95d59b2 + 50f2eb8 commit b7a4792
Show file tree
Hide file tree
Showing 22 changed files with 196 additions and 232 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: objective-c
osx_image: xcode7.3
osx_image: xcode8.3
rvm:
- "2.3.1"
- "2.4.1"

env:
global:
Expand All @@ -12,9 +12,6 @@ env:
- OS=macos
- OS=tvos

before_install:
- brew install swiftlint

install:
- gem install bundler --no-doc --no-ri
- bundle install --path="./.vendor/bundle"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Change Log

## [Unreleased](https://github.com/RxSwiftCommunity/RxViewModel/tree/HEAD)
- Support for Swift 3 & 4 [\#45](https://github.com/RxSwiftCommunity/RxViewModel/pull/45) ([freak4pc](https://github.com/freak4pc))

[Full Changelog](https://github.com/RxSwiftCommunity/RxViewModel/compare/3.1.3...HEAD)

Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" ~> 2.5
github "ReactiveX/RxSwift" ~> 3.4
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" "2.6.0"
github "ReactiveX/RxSwift" "3.5.0"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/RxSwift
Submodule RxSwift updated 1159 files
1 change: 1 addition & 0 deletions Demo/.swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0
22 changes: 15 additions & 7 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
TestTargetID = 607FACCF1AFB9204008FA782;
TestTargetID = 1168B9761D2DFF2A00784841;
};
};
};
Expand Down Expand Up @@ -411,7 +411,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
3B32E276864ED8DE0A42EB66 /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -456,7 +456,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
74F4425F80A70ACF54C96776 /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -471,7 +471,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
8B85B57729C5E3D4D213BC72 /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -531,7 +531,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
F088206876394936F4C2A77D /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -627,6 +627,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
PRODUCT_BUNDLE_IDENTIFIER = es.estebantorr.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -641,6 +642,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
PRODUCT_BUNDLE_IDENTIFIER = es.estebantorr.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -655,6 +657,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "es.estebantorr.RxViewModelTests-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.2;
};
name = Debug;
Expand All @@ -669,6 +672,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "es.estebantorr.RxViewModelTests-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.2;
};
name = Release;
Expand All @@ -687,6 +691,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "es.estebantorr.RxViewModelTests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -703,6 +708,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "es.estebantorr.RxViewModelTests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand Down Expand Up @@ -803,7 +809,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
PRODUCT_BUNDLE_IDENTIFIER = "es.estebantorr.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tmp_Example.app/tmp_Example";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo";
};
name = Debug;
};
Expand All @@ -816,7 +823,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
PRODUCT_BUNDLE_IDENTIFIER = "es.estebantorr.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tmp_Example.app/tmp_Example";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo";
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
35 changes: 4 additions & 31 deletions Demo/Demo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,9 @@ import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return true
}
}
8 changes: 0 additions & 8 deletions Demo/Demo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@
import UIKit

class ViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}


}
18 changes: 2 additions & 16 deletions Demo/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!
inhibit_all_warnings!

# Test Libraries
def test_pods
Expand Down Expand Up @@ -36,19 +37,4 @@ target 'RxViewModelTests-macOS' do
library

test_pods
end

# Hack to fix testability until cocoapods gets an update
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['ENABLE_TESTABILITY'] = 'YES'

if target.name.include? "RxViewModel-"
config.build_settings['CLANG_ENABLE_CODE_COVERAGE'] = 'YES'
end
end
end
end
end
end
22 changes: 11 additions & 11 deletions Demo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PODS:
- Nimble (4.1.0)
- Quick (0.9.2)
- RxSwift (2.5.0)
- RxViewModel (3.1.4):
- RxSwift (~> 2.5)
- Nimble (7.0.1)
- Quick (1.1.0)
- RxSwift (3.4.0)
- RxViewModel (4.0.0):
- RxSwift (~> 3.4)

DEPENDENCIES:
- Nimble
Expand All @@ -15,11 +15,11 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Nimble: 97a0a4cae5124c117115634b2d055d8c97d0af19
Quick: 18d057bc66451eedd5d1c8dc99ba2a5db6e60226
RxSwift: 402b41a50e922a0368fc14cb3bc9f4427920e8ae
RxViewModel: cb396b511b9b94bd7a253b86b6b5a65e2b36043e
Nimble: 657d000e11df8aebe27cdaf9d244de7f30ed87f7
Quick: dafc587e21eed9f4cab3249b9f9015b0b7a7f71d
RxSwift: 3789a1af753002a14edecdb698a2424624296a9c
RxViewModel: f306c2963ff6978705c07a5c299abc5cc9f9a982

PODFILE CHECKSUM: 3783e79cefc5ffb9fe32d2e6f6d48bf5ec74e93f
PODFILE CHECKSUM: 5b740ff0f8e82b1a56bee6decd0acad5bd6013b9

COCOAPODS: 1.0.1
COCOAPODS: 1.2.1
Loading

0 comments on commit b7a4792

Please sign in to comment.