diff --git a/ScreenRecord.xcodeproj/project.pbxproj b/ScreenRecord.xcodeproj/project.pbxproj index b4a358f..85b6a7a 100644 --- a/ScreenRecord.xcodeproj/project.pbxproj +++ b/ScreenRecord.xcodeproj/project.pbxproj @@ -91,12 +91,13 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0920; ORGANIZATIONNAME = AppCoda; TargetAttributes = { F45B44761F4FBA7F004CD67F = { CreatedOnToolsVersion = 8.3.3; - DevelopmentTeam = YZP52RND5S; + DevelopmentTeam = 3TCCEYF5TG; + LastSwiftMigration = 0920; ProvisioningStyle = Automatic; }; }; @@ -174,7 +175,9 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; @@ -182,7 +185,11 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -224,7 +231,9 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; @@ -232,7 +241,11 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -261,12 +274,13 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = YZP52RND5S; + DEVELOPMENT_TEAM = 3TCCEYF5TG; INFOPLIST_FILE = ScreenRecord/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.appcoda.ScreenRecord; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -274,12 +288,13 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = YZP52RND5S; + DEVELOPMENT_TEAM = 3TCCEYF5TG; INFOPLIST_FILE = ScreenRecord/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.appcoda.ScreenRecord; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -302,6 +317,7 @@ F45B448B1F4FBA7F004CD67F /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/ScreenRecord.xcodeproj/project.xcworkspace/xcuserdata/mitchellsweet.xcuserdatad/UserInterfaceState.xcuserstate b/ScreenRecord.xcodeproj/project.xcworkspace/xcuserdata/mitchellsweet.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..d223c59 Binary files /dev/null and b/ScreenRecord.xcodeproj/project.xcworkspace/xcuserdata/mitchellsweet.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ScreenRecord.xcodeproj/xcuserdata/mitchellsweet.xcuserdatad/xcschemes/ScreenRecord.xcscheme b/ScreenRecord.xcodeproj/xcuserdata/mitchellsweet.xcuserdatad/xcschemes/ScreenRecord.xcscheme new file mode 100644 index 0000000..4414afb --- /dev/null +++ b/ScreenRecord.xcodeproj/xcuserdata/mitchellsweet.xcuserdatad/xcschemes/ScreenRecord.xcscheme @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ScreenRecord.xcodeproj/xcuserdata/mitchellsweet.xcuserdatad/xcschemes/xcschememanagement.plist b/ScreenRecord.xcodeproj/xcuserdata/mitchellsweet.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..b37eb35 --- /dev/null +++ b/ScreenRecord.xcodeproj/xcuserdata/mitchellsweet.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + ScreenRecord.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + F45B44761F4FBA7F004CD67F + + primary + + + + + diff --git a/ScreenRecord/Base.lproj/Main.storyboard b/ScreenRecord/Base.lproj/Main.storyboard index 5f6f540..4251364 100644 --- a/ScreenRecord/Base.lproj/Main.storyboard +++ b/ScreenRecord/Base.lproj/Main.storyboard @@ -1,11 +1,11 @@ - + - + @@ -21,9 +21,11 @@ - + - + + + @@ -34,39 +36,64 @@ - + - + + + + - + - - + + + + + + + + + + + + + + + diff --git a/ScreenRecord/Info.plist b/ScreenRecord/Info.plist index 38e98af..93b96dc 100644 --- a/ScreenRecord/Info.plist +++ b/ScreenRecord/Info.plist @@ -31,8 +31,6 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight diff --git a/ScreenRecord/ViewController.swift b/ScreenRecord/ViewController.swift index 8baacd9..dd5cc92 100644 --- a/ScreenRecord/ViewController.swift +++ b/ScreenRecord/ViewController.swift @@ -60,7 +60,7 @@ class ViewController: UIViewController, RPPreviewViewControllerDelegate { } } - + func startRecording() { @@ -83,13 +83,17 @@ class ViewController: UIViewController, RPPreviewViewControllerDelegate { } print("Started Recording Successfully") - self.micToggle.isEnabled = false - self.recordButton.backgroundColor = UIColor.red - self.statusLabel.text = "Recording..." - self.statusLabel.textColor = UIColor.red + + DispatchQueue.main.async { + self.micToggle.isEnabled = false + self.recordButton.backgroundColor = UIColor.red + self.statusLabel.text = "Recording..." + self.statusLabel.textColor = UIColor.red + } + self.isRecording = true - + } } @@ -133,3 +137,4 @@ class ViewController: UIViewController, RPPreviewViewControllerDelegate { dismiss(animated: true) } } +