Skip to content

Commit

Permalink
Swift 3 update
Browse files Browse the repository at this point in the history
update to swift 3 , little refactor
  • Loading branch information
dark2torch committed Nov 6, 2016
1 parent fb7ceb2 commit 8003ea0
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 269 deletions.
191 changes: 3 additions & 188 deletions Demo/MOHUDDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,6 @@
ECA66FDC1BB0318900159D98 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ECA66FDA1BB0318900159D98 /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
ECA66FE31BB0318900159D98 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ECA66FC61BB0318900159D98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = ECA66FCD1BB0318900159D98;
remoteInfo = MOHUDDemo;
};
ECA66FEE1BB0318900159D98 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ECA66FC61BB0318900159D98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = ECA66FCD1BB0318900159D98;
remoteInfo = MOHUDDemo;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
EC32AB1E1D2140A40024C3DF /* MOHUD.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MOHUD.storyboard; sourceTree = "<group>"; };
EC32AB1F1D2140A40024C3DF /* MOHUD.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MOHUD.swift; sourceTree = "<group>"; };
Expand All @@ -45,8 +28,6 @@
ECA66FD81BB0318900159D98 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
ECA66FDB1BB0318900159D98 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
ECA66FDD1BB0318900159D98 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
ECA66FE21BB0318900159D98 /* MOHUDDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MOHUDDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
ECA66FED1BB0318900159D98 /* MOHUDDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MOHUDDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -57,20 +38,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
ECA66FDF1BB0318900159D98 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
ECA66FEA1BB0318900159D98 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand Down Expand Up @@ -105,8 +72,6 @@
isa = PBXGroup;
children = (
ECA66FCE1BB0318900159D98 /* MOHUDDemo.app */,
ECA66FE21BB0318900159D98 /* MOHUDDemoTests.xctest */,
ECA66FED1BB0318900159D98 /* MOHUDDemoUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -145,42 +110,6 @@
productReference = ECA66FCE1BB0318900159D98 /* MOHUDDemo.app */;
productType = "com.apple.product-type.application";
};
ECA66FE11BB0318900159D98 /* MOHUDDemoTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = ECA66FF91BB0318900159D98 /* Build configuration list for PBXNativeTarget "MOHUDDemoTests" */;
buildPhases = (
ECA66FDE1BB0318900159D98 /* Sources */,
ECA66FDF1BB0318900159D98 /* Frameworks */,
ECA66FE01BB0318900159D98 /* Resources */,
);
buildRules = (
);
dependencies = (
ECA66FE41BB0318900159D98 /* PBXTargetDependency */,
);
name = MOHUDDemoTests;
productName = MOHUDDemoTests;
productReference = ECA66FE21BB0318900159D98 /* MOHUDDemoTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
ECA66FEC1BB0318900159D98 /* MOHUDDemoUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = ECA66FFC1BB0318900159D98 /* Build configuration list for PBXNativeTarget "MOHUDDemoUITests" */;
buildPhases = (
ECA66FE91BB0318900159D98 /* Sources */,
ECA66FEA1BB0318900159D98 /* Frameworks */,
ECA66FEB1BB0318900159D98 /* Resources */,
);
buildRules = (
);
dependencies = (
ECA66FEF1BB0318900159D98 /* PBXTargetDependency */,
);
name = MOHUDDemoUITests;
productName = MOHUDDemoUITests;
productReference = ECA66FED1BB0318900159D98 /* MOHUDDemoUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -192,14 +121,7 @@
TargetAttributes = {
ECA66FCD1BB0318900159D98 = {
CreatedOnToolsVersion = 7.1;
};
ECA66FE11BB0318900159D98 = {
CreatedOnToolsVersion = 7.1;
TestTargetID = ECA66FCD1BB0318900159D98;
};
ECA66FEC1BB0318900159D98 = {
CreatedOnToolsVersion = 7.1;
TestTargetID = ECA66FCD1BB0318900159D98;
LastSwiftMigration = 0800;
};
};
};
Expand All @@ -217,8 +139,6 @@
projectRoot = "";
targets = (
ECA66FCD1BB0318900159D98 /* MOHUDDemo */,
ECA66FE11BB0318900159D98 /* MOHUDDemoTests */,
ECA66FEC1BB0318900159D98 /* MOHUDDemoUITests */,
);
};
/* End PBXProject section */
Expand All @@ -236,20 +156,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
ECA66FE01BB0318900159D98 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
ECA66FEB1BB0318900159D98 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -263,35 +169,8 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
ECA66FDE1BB0318900159D98 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
ECA66FE91BB0318900159D98 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
ECA66FE41BB0318900159D98 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = ECA66FCD1BB0318900159D98 /* MOHUDDemo */;
targetProxy = ECA66FE31BB0318900159D98 /* PBXContainerItemProxy */;
};
ECA66FEF1BB0318900159D98 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = ECA66FCD1BB0318900159D98 /* MOHUDDemo */;
targetProxy = ECA66FEE1BB0318900159D98 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
ECA66FDA1BB0318900159D98 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
Expand Down Expand Up @@ -393,6 +272,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.whitetorch.MOHUDDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -405,58 +285,11 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.whitetorch.MOHUDDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
ECA66FFA1BB0318900159D98 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = MOHUDDemoTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.whitetorch.MOHUDDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MOHUDDemo.app/MOHUDDemo";
};
name = Debug;
};
ECA66FFB1BB0318900159D98 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = MOHUDDemoTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.whitetorch.MOHUDDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MOHUDDemo.app/MOHUDDemo";
};
name = Release;
};
ECA66FFD1BB0318900159D98 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = MOHUDDemoUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.whitetorch.MOHUDDemoUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_TARGET_NAME = MOHUDDemo;
USES_XCTRUNNER = YES;
};
name = Debug;
};
ECA66FFE1BB0318900159D98 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = MOHUDDemoUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.whitetorch.MOHUDDemoUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_TARGET_NAME = MOHUDDemo;
USES_XCTRUNNER = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -478,24 +311,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
ECA66FF91BB0318900159D98 /* Build configuration list for PBXNativeTarget "MOHUDDemoTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
ECA66FFA1BB0318900159D98 /* Debug */,
ECA66FFB1BB0318900159D98 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
ECA66FFC1BB0318900159D98 /* Build configuration list for PBXNativeTarget "MOHUDDemoUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
ECA66FFD1BB0318900159D98 /* Debug */,
ECA66FFE1BB0318900159D98 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = ECA66FC61BB0318900159D98 /* Project object */;
Expand Down
12 changes: 6 additions & 6 deletions Demo/MOHUDDemo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> 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:.
}

Expand Down
Loading

0 comments on commit 8003ea0

Please sign in to comment.