diff --git a/dcav-uploader.xcodeproj/project.pbxproj b/dcav-uploader.xcodeproj/project.pbxproj index a1be6b7..c430cbe 100644 --- a/dcav-uploader.xcodeproj/project.pbxproj +++ b/dcav-uploader.xcodeproj/project.pbxproj @@ -149,6 +149,7 @@ TargetAttributes = { ACAAF0011F2F93C600271C26 = { CreatedOnToolsVersion = 8.3.3; + DevelopmentTeam = HU6WPE737K; ProvisioningStyle = Automatic; }; ACAAF0151F2F93C600271C26 = { @@ -345,11 +346,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = HU6WPE737K; INFOPLIST_FILE = "dcav-uploader/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "space.guava.dcav-uploader"; + PRODUCT_BUNDLE_IDENTIFIER = "space.guava-"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 3.0; }; name = Debug; @@ -358,11 +362,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = HU6WPE737K; INFOPLIST_FILE = "dcav-uploader/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "space.guava.dcav-uploader"; + PRODUCT_BUNDLE_IDENTIFIER = "space.guava-"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 3.0; }; name = Release; diff --git a/dcav-uploader/Assets.xcassets/Contents.json b/dcav-uploader/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/dcav-uploader/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/dcav-uploader/Assets.xcassets/savedImage.imageset/Contents.json b/dcav-uploader/Assets.xcassets/savedImage.imageset/Contents.json new file mode 100644 index 0000000..acb6c00 --- /dev/null +++ b/dcav-uploader/Assets.xcassets/savedImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "saved_image.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/dcav-uploader/Assets.xcassets/savedImage.imageset/saved_image.png b/dcav-uploader/Assets.xcassets/savedImage.imageset/saved_image.png new file mode 100644 index 0000000..d291a83 Binary files /dev/null and b/dcav-uploader/Assets.xcassets/savedImage.imageset/saved_image.png differ diff --git a/dcav-uploader/Base.lproj/Main.storyboard b/dcav-uploader/Base.lproj/Main.storyboard index 8584ddf..b65c1d7 100644 --- a/dcav-uploader/Base.lproj/Main.storyboard +++ b/dcav-uploader/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + @@ -76,6 +76,10 @@ + @@ -88,6 +92,7 @@ + @@ -118,4 +123,7 @@ + + + diff --git a/dcav-uploader/Info.plist b/dcav-uploader/Info.plist index 4102788..4ab9e43 100644 --- a/dcav-uploader/Info.plist +++ b/dcav-uploader/Info.plist @@ -20,6 +20,10 @@ 1 LSRequiresIPhoneOS + NSCameraUsageDescription + Need to access camera lol + NSPhotoLibraryUsageDescription + Plz give access UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -39,9 +43,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - NSPhotoLibraryUsageDescription - Plz give access - NSCameraUsageDescription - Need to access camera lol diff --git a/dcav-uploader/ViewController.swift b/dcav-uploader/ViewController.swift index d241865..acff9ff 100644 --- a/dcav-uploader/ViewController.swift +++ b/dcav-uploader/ViewController.swift @@ -16,6 +16,7 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP @IBOutlet weak var dcavTextField: UITextField! var responseString : String! @IBOutlet weak var uploadProgressBar: UIProgressView! + @IBOutlet weak var savedPhotoImageView: UIImageView! override func viewDidLoad() { super.viewDidLoad() @@ -53,6 +54,20 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP } @IBAction func onSaveButton(_ sender: Any) { + UIImageWriteToSavedPhotosAlbum(imageView.image!, nil, nil, nil); + + UIView.animate(withDuration: 0.5, delay:0.0, options:UIViewAnimationOptions.transitionFlipFromTop, animations: { + self.savedPhotoImageView.isHidden = false + self.savedPhotoImageView.alpha = 1 + + }, completion: { finished in + UIView.animate(withDuration: 0.5, delay:1, options:UIViewAnimationOptions.transitionCrossDissolve, animations: { + self.savedPhotoImageView.alpha = 0 + + }, completion: { finished in + self.savedPhotoImageView.isHidden = true + }) + }) } @IBAction func onUploadButton(_ sender: Any) {