diff --git a/BPOrganizer.xcodeproj/project.pbxproj b/BPOrganizer.xcodeproj/project.pbxproj index 018bedf..54453b8 100644 --- a/BPOrganizer.xcodeproj/project.pbxproj +++ b/BPOrganizer.xcodeproj/project.pbxproj @@ -7,12 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + BD009A9C26A8B00C00D1E600 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD009A9A26A8B00B00D1E600 /* LaunchScreen.storyboard */; }; BD107EC126866987006D771C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD107EC026866987006D771C /* AppDelegate.swift */; }; BD107EC326866987006D771C /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD107EC226866987006D771C /* SceneDelegate.swift */; }; BD107EC526866987006D771C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD107EC426866987006D771C /* ViewController.swift */; }; BD107EC826866987006D771C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD107EC626866987006D771C /* Main.storyboard */; }; BD107ECA2686698E006D771C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BD107EC92686698E006D771C /* Assets.xcassets */; }; - BD107ECD2686698E006D771C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD107ECB2686698E006D771C /* LaunchScreen.storyboard */; }; BD107ED82686698F006D771C /* BPOrganizerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD107ED72686698F006D771C /* BPOrganizerTests.swift */; }; BD107EE32686698F006D771C /* BPOrganizerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD107EE22686698F006D771C /* BPOrganizerUITests.swift */; }; /* End PBXBuildFile section */ @@ -35,13 +35,13 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + BD009A9B26A8B00B00D1E600 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; BD107EBD26866987006D771C /* BPOrganizer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BPOrganizer.app; sourceTree = BUILT_PRODUCTS_DIR; }; BD107EC026866987006D771C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; BD107EC226866987006D771C /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; BD107EC426866987006D771C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; BD107EC726866987006D771C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; BD107EC92686698E006D771C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - BD107ECC2686698E006D771C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; BD107ECE2686698E006D771C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; BD107ED32686698F006D771C /* BPOrganizerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BPOrganizerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; BD107ED72686698F006D771C /* BPOrganizerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BPOrganizerTests.swift; sourceTree = ""; }; @@ -49,6 +49,7 @@ BD107EDE2686698F006D771C /* BPOrganizerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BPOrganizerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; BD107EE22686698F006D771C /* BPOrganizerUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BPOrganizerUITests.swift; sourceTree = ""; }; BD107EE42686698F006D771C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BDCC271B2699642F005F364A /* BPOrganizer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = BPOrganizer.entitlements; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -99,12 +100,13 @@ BD107EBF26866987006D771C /* BPOrganizer */ = { isa = PBXGroup; children = ( + BDCC271B2699642F005F364A /* BPOrganizer.entitlements */, BD107EC026866987006D771C /* AppDelegate.swift */, BD107EC226866987006D771C /* SceneDelegate.swift */, BD107EC426866987006D771C /* ViewController.swift */, BD107EC626866987006D771C /* Main.storyboard */, BD107EC92686698E006D771C /* Assets.xcassets */, - BD107ECB2686698E006D771C /* LaunchScreen.storyboard */, + BD009A9A26A8B00B00D1E600 /* LaunchScreen.storyboard */, BD107ECE2686698E006D771C /* Info.plist */, ); path = BPOrganizer; @@ -231,7 +233,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - BD107ECD2686698E006D771C /* LaunchScreen.storyboard in Resources */, + BD009A9C26A8B00C00D1E600 /* LaunchScreen.storyboard in Resources */, BD107ECA2686698E006D771C /* Assets.xcassets in Resources */, BD107EC826866987006D771C /* Main.storyboard in Resources */, ); @@ -296,6 +298,14 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + BD009A9A26A8B00B00D1E600 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + BD009A9B26A8B00B00D1E600 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; BD107EC626866987006D771C /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -304,14 +314,6 @@ name = Main.storyboard; sourceTree = ""; }; - BD107ECB2686698E006D771C /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - BD107ECC2686698E006D771C /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -366,7 +368,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -421,7 +423,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -436,7 +438,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = BPOrganizer/BPOrganizer.entitlements; CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = PRBH2T6668; INFOPLIST_FILE = BPOrganizer/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -445,6 +449,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.BPOrganizer; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -455,7 +460,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = BPOrganizer/BPOrganizer.entitlements; CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = PRBH2T6668; INFOPLIST_FILE = BPOrganizer/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -464,6 +471,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.BPOrganizer; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Contents.json b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Contents.json index 9221b9b..bb127f9 100644 --- a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,91 +1,109 @@ { "images" : [ { + "filename" : "Icon-40.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { + "filename" : "Icon-60.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { + "filename" : "Icon-58.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { + "filename" : "Icon-87.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { + "filename" : "Icon-80.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { + "filename" : "Icon-120.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { + "filename" : "Icon-121.png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { + "filename" : "Icon-180.png", "idiom" : "iphone", "scale" : "3x", "size" : "60x60" }, { + "filename" : "Icon-20.png", "idiom" : "ipad", "scale" : "1x", "size" : "20x20" }, { + "filename" : "Icon-41.png", "idiom" : "ipad", "scale" : "2x", "size" : "20x20" }, { + "filename" : "Icon-29.png", "idiom" : "ipad", "scale" : "1x", "size" : "29x29" }, { + "filename" : "Icon-59.png", "idiom" : "ipad", "scale" : "2x", "size" : "29x29" }, { + "filename" : "Icon-42.png", "idiom" : "ipad", "scale" : "1x", "size" : "40x40" }, { + "filename" : "Icon-81.png", "idiom" : "ipad", "scale" : "2x", "size" : "40x40" }, { + "filename" : "Icon-76.png", "idiom" : "ipad", "scale" : "1x", "size" : "76x76" }, { + "filename" : "Icon-152.png", "idiom" : "ipad", "scale" : "2x", "size" : "76x76" }, { + "filename" : "Icon-167.png", "idiom" : "ipad", "scale" : "2x", "size" : "83.5x83.5" }, { + "filename" : "Icon-1024.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-1024.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000..51b97b1 Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-120.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-120.png new file mode 100644 index 0000000..f293751 Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-120.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-121.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-121.png new file mode 100644 index 0000000..f293751 Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-121.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-152.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-152.png new file mode 100644 index 0000000..037a0de Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-152.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-167.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-167.png new file mode 100644 index 0000000..b1175e5 Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-167.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-180.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-180.png new file mode 100644 index 0000000..12be46d Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-180.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-20.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-20.png new file mode 100644 index 0000000..087b47e Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-20.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-29.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-29.png new file mode 100644 index 0000000..cd56fc5 Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-29.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-40.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-40.png new file mode 100644 index 0000000..c7a71cc Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-40.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-41.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-41.png new file mode 100644 index 0000000..c7a71cc Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-41.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-42.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-42.png new file mode 100644 index 0000000..c7a71cc Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-42.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-58.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-58.png new file mode 100644 index 0000000..ad28daa Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-58.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-59.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-59.png new file mode 100644 index 0000000..ad28daa Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-59.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-60.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-60.png new file mode 100644 index 0000000..2f7ce24 Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-60.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 0000000..fd3f44e Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-80.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-80.png new file mode 100644 index 0000000..b2513b4 Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-80.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-81.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-81.png new file mode 100644 index 0000000..b2513b4 Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-81.png differ diff --git a/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-87.png b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-87.png new file mode 100644 index 0000000..f097cc6 Binary files /dev/null and b/BPOrganizer/Assets.xcassets/AppIcon.appiconset/Icon-87.png differ diff --git a/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/Contents.json b/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/Contents.json new file mode 100644 index 0000000..7d2bff1 --- /dev/null +++ b/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "coollogo_com-13092940.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "coollogo_com-13092941.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "coollogo_com-13092942.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092940.png b/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092940.png new file mode 100644 index 0000000..fbf874b Binary files /dev/null and b/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092940.png differ diff --git a/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092941.png b/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092941.png new file mode 100644 index 0000000..fbf874b Binary files /dev/null and b/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092941.png differ diff --git a/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092942.png b/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092942.png new file mode 100644 index 0000000..fbf874b Binary files /dev/null and b/BPOrganizer/Assets.xcassets/Micah Gomez.imageset/coollogo_com-13092942.png differ diff --git a/BPOrganizer/Assets.xcassets/launchicon.imageset/Contents.json b/BPOrganizer/Assets.xcassets/launchicon.imageset/Contents.json new file mode 100644 index 0000000..f07d073 --- /dev/null +++ b/BPOrganizer/Assets.xcassets/launchicon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Icon-512.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Icon-513.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Icon-514.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/BPOrganizer/Assets.xcassets/launchicon.imageset/Icon-512.png b/BPOrganizer/Assets.xcassets/launchicon.imageset/Icon-512.png new file mode 100644 index 0000000..8ffe5ee Binary files /dev/null and b/BPOrganizer/Assets.xcassets/launchicon.imageset/Icon-512.png differ diff --git a/BPOrganizer/Assets.xcassets/launchicon.imageset/Icon-513.png b/BPOrganizer/Assets.xcassets/launchicon.imageset/Icon-513.png new file mode 100644 index 0000000..8ffe5ee Binary files /dev/null and b/BPOrganizer/Assets.xcassets/launchicon.imageset/Icon-513.png differ diff --git a/BPOrganizer/Assets.xcassets/launchicon.imageset/Icon-514.png b/BPOrganizer/Assets.xcassets/launchicon.imageset/Icon-514.png new file mode 100644 index 0000000..8ffe5ee Binary files /dev/null and b/BPOrganizer/Assets.xcassets/launchicon.imageset/Icon-514.png differ diff --git a/BPOrganizer/BPOrganizer.entitlements b/BPOrganizer/BPOrganizer.entitlements new file mode 100644 index 0000000..ee95ab7 --- /dev/null +++ b/BPOrganizer/BPOrganizer.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + + diff --git a/BPOrganizer/Base.lproj/LaunchScreen.storyboard b/BPOrganizer/Base.lproj/LaunchScreen.storyboard index 865e932..1977b90 100644 --- a/BPOrganizer/Base.lproj/LaunchScreen.storyboard +++ b/BPOrganizer/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,12 @@ - - + + + - + + + + @@ -11,10 +15,34 @@ - + - + + + + + + + + + + + + + + + + + + + + @@ -22,4 +50,10 @@ + + + + + + diff --git a/BPOrganizer/Base.lproj/Main.storyboard b/BPOrganizer/Base.lproj/Main.storyboard index 2da9576..18eb6fa 100644 --- a/BPOrganizer/Base.lproj/Main.storyboard +++ b/BPOrganizer/Base.lproj/Main.storyboard @@ -17,8 +17,8 @@ - - + + @@ -36,67 +36,108 @@ + + + + + + - + + + + + + + - + - + - - + + + - + + + + + - - - + + + - - - - - - - - - - - + + + + + + + - @@ -107,7 +148,7 @@ - + @@ -118,8 +159,8 @@ - - + + @@ -137,8 +178,14 @@ + + + + + + @@ -165,8 +212,17 @@ - + @@ -199,7 +255,7 @@ - + @@ -219,8 +275,14 @@ - - + + + + + + + + diff --git a/BPOrganizer/Info.plist b/BPOrganizer/Info.plist index 5b531f7..778a7b6 100644 --- a/BPOrganizer/Info.plist +++ b/BPOrganizer/Info.plist @@ -4,6 +4,8 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + FlashBag CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -17,7 +19,7 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS UIApplicationSceneManifest @@ -52,8 +54,6 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad diff --git a/BPOrganizer/ViewController.swift b/BPOrganizer/ViewController.swift index dc56cc6..b7eb468 100644 --- a/BPOrganizer/ViewController.swift +++ b/BPOrganizer/ViewController.swift @@ -110,13 +110,23 @@ class ViewController: UIViewController, UIDocumentPickerDelegate, UIPickerViewDa func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { - bags[bagPicker.selectedRow(inComponent: 0)].pockets.remove(at: indexPath.row) - tableView.deleteRows(at: [indexPath], with: .fade) - do { - try UserDefaults.standard.setObject(bags, forKey: "bagsSavedData") - } catch { - print(error.localizedDescription) - } + + let dialogMessage = UIAlertController(title: "Warning!", message: "Are you sure you want to delete this pocket?", preferredStyle: .alert) + let ok = UIAlertAction(title: "Yes", style: .destructive, handler: { (action) -> Void in + self.bags[self.bagPicker.selectedRow(inComponent: 0)].pockets.remove(at: indexPath.row) + tableView.deleteRows(at: [indexPath], with: .fade) + do { + try UserDefaults.standard.setObject(self.bags, forKey: "bagsSavedData") + } catch { + print(error.localizedDescription) + } + }) + let cancel = UIAlertAction(title: "No", style: .cancel) { (action) -> Void in + print("Cancel button tapped") + } + dialogMessage.addAction(ok) + dialogMessage.addAction(cancel) + self.present(dialogMessage, animated: true, completion: nil) } } @@ -204,16 +214,34 @@ class ViewController: UIViewController, UIDocumentPickerDelegate, UIPickerViewDa } @IBAction func DeleteBag(_ sender: Any) { - if (bags.count > 0){ - bags.remove(at: bagPicker.selectedRow(inComponent: 0)) - bagPicker.selectRow(0, inComponent: 0, animated: true) - bagPicker.reloadAllComponents() - pocketsTable.reloadData() - do { - try UserDefaults.standard.setObject(bags, forKey: "bagsSavedData") - } catch { - print(error.localizedDescription) - } + if (self.bags.count > 0){ + let dialogMessage = UIAlertController(title: "Warning!", message: "Are you sure you want to delete this bag?", preferredStyle: .alert) + + // Create OK button with action handler + let ok = UIAlertAction(title: "Yes", style: .destructive, handler: { (action) -> Void in + + self.bags.remove(at: self.bagPicker.selectedRow(inComponent: 0)) + self.bagPicker.selectRow(0, inComponent: 0, animated: true) + self.bagPicker.reloadAllComponents() + self.pocketsTable.reloadData() + do { + try UserDefaults.standard.setObject(self.bags, forKey: "bagsSavedData") + } catch { + print(error.localizedDescription) + } + }) + + // Create Cancel button with action handlder + let cancel = UIAlertAction(title: "No", style: .cancel) { (action) -> Void in + print("Cancel button tapped") + } + + //Add OK and Cancel button to dialog message + dialogMessage.addAction(ok) + dialogMessage.addAction(cancel) + + // Present dialog message to user + self.present(dialogMessage, animated: true, completion: nil) } } @@ -234,7 +262,7 @@ class ViewController: UIViewController, UIDocumentPickerDelegate, UIPickerViewDa } searchQuery = (textField!.text ?? "Search") - var didFindMatches = "Matches found:" + var didFindMatches = "Matches found for Query [\(searchQuery)]:" var matchesString = "" for b in self.bags { @@ -256,7 +284,7 @@ class ViewController: UIViewController, UIDocumentPickerDelegate, UIPickerViewDa } if (matchesString == ""){ - didFindMatches = "No Matches Found" + didFindMatches = "No Matches Found for Query [\(searchQuery)]:" } let matchesAlert = UIAlertController(title: didFindMatches, message: matchesString, preferredStyle: .alert) @@ -330,21 +358,31 @@ class ViewController2: UIViewController, UITableViewDataSource, UITableViewDeleg func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { + + let dialogMessage = UIAlertController(title: "Warning!", message: "Are you sure you want to delete this item?", preferredStyle: .alert) + let ok = UIAlertAction(title: "Yes", style: .destructive, handler: { (action) -> Void in do { - bags = try UserDefaults.standard.getObject(forKey: "bagsSavedData", castTo: [bag].self) - print(bags) + self.bags = try UserDefaults.standard.getObject(forKey: "bagsSavedData", castTo: [bag].self) + print(self.bags) } catch { print(error.localizedDescription) } - print("Delete Item: \(bags[passingValues.bag].pockets[passingValues.pocket].contents[indexPath.row])") - bags[passingValues.bag].pockets[passingValues.pocket].contents.remove(at: indexPath.row) + print("Delete Item: \(self.bags[passingValues.bag].pockets[passingValues.pocket].contents[indexPath.row])") + self.bags[passingValues.bag].pockets[passingValues.pocket].contents.remove(at: indexPath.row) //tableView.deleteRows(at: [indexPath], with: .fade) do { - try UserDefaults.standard.setObject(bags, forKey: "bagsSavedData") + try UserDefaults.standard.setObject(self.bags, forKey: "bagsSavedData") } catch { print(error.localizedDescription) } - itemsTable.reloadData() + self.itemsTable.reloadData() + }) + let cancel = UIAlertAction(title: "No", style: .cancel) { (action) -> Void in + print("Cancel button tapped") + } + dialogMessage.addAction(ok) + dialogMessage.addAction(cancel) + self.present(dialogMessage, animated: true, completion: nil) } }