diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml new file mode 100644 index 0000000..635232e --- /dev/null +++ b/.github/workflows/swift.yml @@ -0,0 +1,30 @@ +name: iOS Build and Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: macos-latest + env: + XCODE_VERSION: 15.4.0 + IOS_VERSION: 17.5 + PHONE_NAME: 'iPhone 14' + steps: + - uses: actions/checkout@v4 + - name: Set up Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '${{ env.XCODE_VERSION }}' # Specify the Xcode version you need + # - name: Install dependencies + # run: swift package resolve + - name: Build + run: xcodebuild -scheme SideMenuExample -sdk iphonesimulator -destination 'platform=iOS Simulator,name=${{env.PHONE_NAME}},OS=${{env.IOS_VERSION}}' build -allowProvisioningUpdates + - name: Run tests + run: xcodebuild test -scheme SideMenuExampleTests -sdk iphonesimulator -destination 'platform=iOS Simulator,name=${{env.PHONE_NAME}},OS=${{env.IOS_VERSION}}' -allowProvisioningUpdates + - name: Run UI Tests + run: xcodebuild test -scheme SideMenuExampleUITests -sdk iphonesimulator -destination 'platform=iOS Simulator,name=${{env.PHONE_NAME}},OS=${{env.IOS_VERSION}}' -allowProvisioningUpdates diff --git a/README.md b/README.md index bebdf0b..c94fcf2 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ I ran this application with the following, - [MacOS - Sonoma 14.6](https://developer.apple.com/documentation/macos-release-notes/macos-14_6-release-notes) - [xCode - Version 15.4 (15F31d)](https://developer.apple.com/news/releases/?id=05132024a) -- Minimum Deployment set to iOS version 17.5 +- Minimum Deployment set to [iOS version 17.5](https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-17_5-release-notes) Once compiled, the application should present the Home View Controller as seen below with the hidden menu in the upper left of the screen. @@ -17,4 +17,4 @@ Clicking the three lines in the upper left will cause the menu to slide in from ![alt text](docs/img/Menu_View.png) -# [License](https://github.com/DersonProductions/iOS_SideMenu_Example/blob/main/LICENSE) \ No newline at end of file +# [MIT License](https://github.com/DersonProductions/iOS_SideMenu_Example/blob/main/LICENSE) with one small change. \ No newline at end of file diff --git a/SideMenuExample.xcodeproj/project.pbxproj b/SideMenuExample.xcodeproj/project.pbxproj index be868f3..3ec0331 100644 --- a/SideMenuExample.xcodeproj/project.pbxproj +++ b/SideMenuExample.xcodeproj/project.pbxproj @@ -14,9 +14,9 @@ 18D864B72C5F0543009EB9C7 /* ContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D864B62C5F0543009EB9C7 /* ContainerViewController.swift */; }; 18D864BC2C5F0544009EB9C7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 18D864BB2C5F0544009EB9C7 /* Assets.xcassets */; }; 18D864BF2C5F0544009EB9C7 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 18D864BE2C5F0544009EB9C7 /* Base */; }; - 18D864CA2C5F0544009EB9C7 /* SideMenu_ExTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D864C92C5F0544009EB9C7 /* SideMenu_ExTests.swift */; }; - 18D864D42C5F0544009EB9C7 /* SideMenu_ExUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D864D32C5F0544009EB9C7 /* SideMenu_ExUITests.swift */; }; - 18D864D62C5F0544009EB9C7 /* SideMenu_ExUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D864D52C5F0544009EB9C7 /* SideMenu_ExUITestsLaunchTests.swift */; }; + 18D864CA2C5F0544009EB9C7 /* SideMenuExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D864C92C5F0544009EB9C7 /* SideMenuExampleTests.swift */; }; + 18D864D42C5F0544009EB9C7 /* SideMenuExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D864D32C5F0544009EB9C7 /* SideMenuExampleUITests.swift */; }; + 18D864D62C5F0544009EB9C7 /* SideMenuExampleUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D864D52C5F0544009EB9C7 /* SideMenuExampleUITestsLaunchTests.swift */; }; 18D864E62C5F0BBC009EB9C7 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D864E52C5F0BBC009EB9C7 /* HomeViewController.swift */; }; 18D864E82C5F0BF7009EB9C7 /* MenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D864E72C5F0BF7009EB9C7 /* MenuViewController.swift */; }; /* End PBXBuildFile section */ @@ -49,10 +49,10 @@ 18D864BE2C5F0544009EB9C7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 18D864C02C5F0544009EB9C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = SideMenuExample/Info.plist; sourceTree = SOURCE_ROOT; }; 18D864C52C5F0544009EB9C7 /* SideMenuExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SideMenuExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 18D864C92C5F0544009EB9C7 /* SideMenu_ExTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenu_ExTests.swift; sourceTree = ""; }; + 18D864C92C5F0544009EB9C7 /* SideMenuExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenuExampleTests.swift; sourceTree = ""; }; 18D864CF2C5F0544009EB9C7 /* SideMenuExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SideMenuExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 18D864D32C5F0544009EB9C7 /* SideMenu_ExUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenu_ExUITests.swift; sourceTree = ""; }; - 18D864D52C5F0544009EB9C7 /* SideMenu_ExUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenu_ExUITestsLaunchTests.swift; sourceTree = ""; }; + 18D864D32C5F0544009EB9C7 /* SideMenuExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenuExampleUITests.swift; sourceTree = ""; }; + 18D864D52C5F0544009EB9C7 /* SideMenuExampleUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenuExampleUITestsLaunchTests.swift; sourceTree = ""; }; 18D864E52C5F0BBC009EB9C7 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; 18D864E72C5F0BF7009EB9C7 /* MenuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuViewController.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -86,8 +86,8 @@ isa = PBXGroup; children = ( 18D864B12C5F0543009EB9C7 /* SideMenuExample */, - 18D864C82C5F0544009EB9C7 /* SideMenu_ExTests */, - 18D864D22C5F0544009EB9C7 /* SideMenu_ExUITests */, + 18D864C82C5F0544009EB9C7 /* SideMenuExampleTests */, + 18D864D22C5F0544009EB9C7 /* SideMenuExampleUITests */, 18D864B02C5F0543009EB9C7 /* Products */, ); sourceTree = ""; @@ -115,21 +115,21 @@ path = SideMenuExample; sourceTree = ""; }; - 18D864C82C5F0544009EB9C7 /* SideMenu_ExTests */ = { + 18D864C82C5F0544009EB9C7 /* SideMenuExampleTests */ = { isa = PBXGroup; children = ( - 18D864C92C5F0544009EB9C7 /* SideMenu_ExTests.swift */, + 18D864C92C5F0544009EB9C7 /* SideMenuExampleTests.swift */, ); - path = SideMenu_ExTests; + path = SideMenuExampleTests; sourceTree = ""; }; - 18D864D22C5F0544009EB9C7 /* SideMenu_ExUITests */ = { + 18D864D22C5F0544009EB9C7 /* SideMenuExampleUITests */ = { isa = PBXGroup; children = ( - 18D864D32C5F0544009EB9C7 /* SideMenu_ExUITests.swift */, - 18D864D52C5F0544009EB9C7 /* SideMenu_ExUITestsLaunchTests.swift */, + 18D864D32C5F0544009EB9C7 /* SideMenuExampleUITests.swift */, + 18D864D52C5F0544009EB9C7 /* SideMenuExampleUITestsLaunchTests.swift */, ); - path = SideMenu_ExUITests; + path = SideMenuExampleUITests; sourceTree = ""; }; 18D864E22C5F09C0009EB9C7 /* ViewControllers */ = { @@ -288,7 +288,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 18D864CA2C5F0544009EB9C7 /* SideMenu_ExTests.swift in Sources */, + 18D864CA2C5F0544009EB9C7 /* SideMenuExampleTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -296,8 +296,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 18D864D42C5F0544009EB9C7 /* SideMenu_ExUITests.swift in Sources */, - 18D864D62C5F0544009EB9C7 /* SideMenu_ExUITestsLaunchTests.swift in Sources */, + 18D864D42C5F0544009EB9C7 /* SideMenuExampleUITests.swift in Sources */, + 18D864D62C5F0544009EB9C7 /* SideMenuExampleUITestsLaunchTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -452,6 +452,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 7G864964AM; @@ -470,6 +471,7 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = us.dersonproductions.SideMenuExample; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -481,6 +483,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 7G864964AM; @@ -499,6 +502,7 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = us.dersonproductions.SideMenuExample; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -512,11 +516,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 3467688GKK; + DEVELOPMENT_TEAM = 7G864964AM; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 17.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "us.dersonproductions.SideMenu-ExTests"; + PRODUCT_BUNDLE_IDENTIFIER = us.dersonproductions.SideMenuExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; @@ -532,11 +536,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 3467688GKK; + DEVELOPMENT_TEAM = 7G864964AM; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 17.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "us.dersonproductions.SideMenu-ExTests"; + PRODUCT_BUNDLE_IDENTIFIER = us.dersonproductions.SideMenuExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; @@ -551,15 +555,16 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 3467688GKK; + DEVELOPMENT_TEAM = 7G864964AM; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "us.dersonproductions.SideMenu-ExUITests"; + PRODUCT_BUNDLE_IDENTIFIER = us.dersonproductions.SideMenuExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = SideMenu_Ex; + TEST_TARGET_NAME = SideMenuExample; }; name = Debug; }; @@ -569,15 +574,16 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 3467688GKK; + DEVELOPMENT_TEAM = 7G864964AM; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "us.dersonproductions.SideMenu-ExUITests"; + PRODUCT_BUNDLE_IDENTIFIER = us.dersonproductions.SideMenuExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = SideMenu_Ex; + TEST_TARGET_NAME = SideMenuExample; }; name = Release; }; diff --git a/SideMenu_ExTests/SideMenu_ExTests.swift b/SideMenuExampleTests/SideMenuExampleTests.swift similarity index 94% rename from SideMenu_ExTests/SideMenu_ExTests.swift rename to SideMenuExampleTests/SideMenuExampleTests.swift index 442d569..6698683 100644 --- a/SideMenu_ExTests/SideMenu_ExTests.swift +++ b/SideMenuExampleTests/SideMenuExampleTests.swift @@ -1,6 +1,6 @@ // -// SideMenu_ExTests.swift -// SideMenu_ExTests +// SideMenuExampleTests.swift +// SideMenuExampleTests // // Created by Derson Productions, LLC on 2024-AUG-03. // @@ -31,9 +31,9 @@ // SOFTWARE. import XCTest -@testable import SideMenu_Ex +@testable import SideMenuExample -final class SideMenu_ExTests: XCTestCase { +final class SideMenuExampleTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. diff --git a/SideMenu_ExUITests/SideMenu_ExUITests.swift b/SideMenuExampleUITests/SideMenuExampleUITests.swift similarity index 96% rename from SideMenu_ExUITests/SideMenu_ExUITests.swift rename to SideMenuExampleUITests/SideMenuExampleUITests.swift index e7ead28..8989eb7 100644 --- a/SideMenu_ExUITests/SideMenu_ExUITests.swift +++ b/SideMenuExampleUITests/SideMenuExampleUITests.swift @@ -1,6 +1,6 @@ // -// SideMenu_ExUITests.swift -// SideMenu_ExUITests +// SideMenuExampleUITests.swift +// SideMenuExampleUITests // // Created by Derson Productions, LLC on 2024-AUG-03. // @@ -32,7 +32,7 @@ import XCTest -final class SideMenu_ExUITests: XCTestCase { +final class SideMenuExampleUITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. diff --git a/SideMenu_ExUITests/SideMenu_ExUITestsLaunchTests.swift b/SideMenuExampleUITests/SideMenuExampleUITestsLaunchTests.swift similarity index 94% rename from SideMenu_ExUITests/SideMenu_ExUITestsLaunchTests.swift rename to SideMenuExampleUITests/SideMenuExampleUITestsLaunchTests.swift index 62644a7..b0785c9 100644 --- a/SideMenu_ExUITests/SideMenu_ExUITestsLaunchTests.swift +++ b/SideMenuExampleUITests/SideMenuExampleUITestsLaunchTests.swift @@ -1,6 +1,6 @@ // -// SideMenu_ExUITestsLaunchTests.swift -// SideMenu_ExUITests +// SideMenuExampleUITestsLaunchTests.swift +// SideMenuExampleUITests // // Created by Derson Productions, LLC on 2024-AUG-03. // @@ -32,7 +32,7 @@ import XCTest -final class SideMenu_ExUITestsLaunchTests: XCTestCase { +final class SideMenuExampleUITestsLaunchTests: XCTestCase { override class var runsForEachTargetApplicationUIConfiguration: Bool { true diff --git a/_Package.swift b/_Package.swift new file mode 100644 index 0000000..b853727 --- /dev/null +++ b/_Package.swift @@ -0,0 +1,39 @@ +// swift-tools-version:5.7 +import PackageDescription + +let package = Package( + name: "iOS_SideMenu_Example", + defaultLocalization: "en", + platforms: [ + .iOS(.v16) + ], + products: [ + .library( + name: "iOS_SideMenu_Example", + targets: ["iOS_SideMenu_Example"]), + ], + dependencies: [ + // No external dependencies + ], + targets: [ + .target( + name: "iOS_SideMenu_Example", + dependencies: [], + path: "SideMenuExample", + exclude: [ + "Info.plist" + ], + resources: [ + .process("Assets.xcassets") + ], + swiftSettings: [ + .define("PLATFORM_IOS") + ] + ), + .testTarget( + name: "iOS_SideMenu_ExampleTests", + dependencies: ["iOS_SideMenu_Example"], + path: "SideMenuExampleTests" + ), + ] +) \ No newline at end of file