Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

Commit

Permalink
[Example] Fix project for Swift 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinejr committed Sep 29, 2016
1 parent 1913bc6 commit 57684ea
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 17 deletions.
12 changes: 12 additions & 0 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,15 @@ target 'RxPermission_Example' do
pod 'Permission', :git => 'https://github.com/delba/Permission', :branch => 'swift-3.0'
pod 'RxSwift', :git => 'https://github.com/ReactiveX/RxSwift'
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'
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
end
10 changes: 5 additions & 5 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- Permission (1.5)
- RxPermission (0.2):
- RxPermission (1.0.0-beta.1):
- Permission
- RxSwift
- RxSwift (3.0.0-beta.1)
Expand All @@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:branch: swift-3.0
:git: https://github.com/delba/Permission
RxPermission:
:path: "../"
:path: ../
RxSwift:
:git: https://github.com/ReactiveX/RxSwift

Expand All @@ -29,9 +29,9 @@ CHECKOUT OPTIONS:

SPEC CHECKSUMS:
Permission: 2d9647f8b994a5faf7e1c5a40d4328fde158c2f2
RxPermission: ae4eb417194477024fe08443c99ce90dbcba9707
RxPermission: 60c2b2f0e8dfbbef74232b4f824f99b33d8cbccd
RxSwift: 0823e8d7969c23bfa9ddfb2afa4881e424a1a710

PODFILE CHECKSUM: 4b41159dbcdf90412fd7d5e568ebb98713a1704b
PODFILE CHECKSUM: 8ebf23ccfac9b28506cb118f8da61cee08612973

COCOAPODS: 1.1.0.rc.2
COCOAPODS: 1.0.1
14 changes: 12 additions & 2 deletions Example/RxPermission.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = 53CHNC6J63;
LastSwiftMigration = 0800;
};
};
Expand Down Expand Up @@ -194,7 +195,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../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";
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";
showEnvVarsInLog = 0;
};
6673305511CB14E00F9BCB43 /* [CP] Embed Pods Frameworks */ = {
Expand Down Expand Up @@ -274,8 +275,10 @@
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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand Down Expand Up @@ -319,8 +322,10 @@
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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand All @@ -339,6 +344,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -347,7 +353,9 @@
isa = XCBuildConfiguration;
baseConfigurationReference = F94059225A135AE33C5B7775 /* Pods-RxPermission_Example.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 53CHNC6J63;
INFOPLIST_FILE = RxPermission/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
Expand All @@ -361,7 +369,9 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 6D532287AD26864757CF477D /* Pods-RxPermission_Example.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 53CHNC6J63;
INFOPLIST_FILE = RxPermission/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
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 = "0720"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
15 changes: 6 additions & 9 deletions Example/RxPermission/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,31 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


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

func applicationWillResignActive(application: UIApplication) {
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) {
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) {
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) {
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) {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

0 comments on commit 57684ea

Please sign in to comment.