From 7a2e111cac091fc05f7e3666e0794bee23e5a05b Mon Sep 17 00:00:00 2001 From: Justin Kumpe Date: Sat, 23 Jul 2022 16:56:06 -0500 Subject: [PATCH 01/21] Release 15 --- .bundle/config | 2 + .github/FUNDING.yml | 12 + .github/ISSUE_TEMPLATE/bug-report.md | 33 ++ .github/ISSUE_TEMPLATE/featureRequest.md | 20 ++ .github/workflows/xcode_tests.yml | 74 +++++ Gemfile | 6 + Gemfile.lock | 296 ++++++++++++++++++ Podfile.lock | 77 +++++ Static IP Trainer.xcodeproj/project.pbxproj | 185 +++++++++-- .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../ARRISRG1ViewController.swift | 19 +- .../ARRISRG2ViewController.swift | 18 +- .../{ => Controllers}/AppDelegate.swift | 3 + .../MainViewController.swift | 54 ++-- .../PaceRG1ViewController.swift | 19 +- .../PaceRG2ViewController.swift | 18 +- .../SelectRGViewController.swift | 22 +- .../Controllers/TutorialManager.swift | 56 ++++ .../Base.lproj/LaunchScreen.storyboard | 0 .../{ => Views}/Base.lproj/Main.storyboard | 139 ++++++-- fastlane/Appfile | 8 + fastlane/Fastfile | 87 +++++ fastlane/Matchfile | 13 + podfile | 18 ++ 25 files changed, 1124 insertions(+), 73 deletions(-) create mode 100644 .bundle/config create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/featureRequest.md create mode 100644 .github/workflows/xcode_tests.yml create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 Podfile.lock create mode 100644 Static IP Trainer.xcworkspace/contents.xcworkspacedata create mode 100644 Static IP Trainer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename Static IP Trainer/{ => Controllers}/ARRISRG1ViewController.swift (74%) rename Static IP Trainer/{ => Controllers}/ARRISRG2ViewController.swift (66%) rename Static IP Trainer/{ => Controllers}/AppDelegate.swift (97%) rename Static IP Trainer/{ => Controllers}/MainViewController.swift (85%) rename Static IP Trainer/{ => Controllers}/PaceRG1ViewController.swift (74%) rename Static IP Trainer/{ => Controllers}/PaceRG2ViewController.swift (60%) rename Static IP Trainer/{ => Controllers}/SelectRGViewController.swift (86%) create mode 100644 Static IP Trainer/Controllers/TutorialManager.swift rename Static IP Trainer/{ => Views}/Base.lproj/LaunchScreen.storyboard (100%) rename Static IP Trainer/{ => Views}/Base.lproj/Main.storyboard (89%) create mode 100644 fastlane/Appfile create mode 100644 fastlane/Fastfile create mode 100644 fastlane/Matchfile create mode 100644 podfile diff --git a/.bundle/config b/.bundle/config new file mode 100644 index 0000000..2369228 --- /dev/null +++ b/.bundle/config @@ -0,0 +1,2 @@ +--- +BUNDLE_PATH: "vendor/bundle" diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..06337ad --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: ['https://www.paypal.com/donate?hosted_button_id=XVGSXMWAQV684'] diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..eacb7dd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG] " +labels: bug +assignees: justinkumpe + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Smartphone (please complete the following information):** +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- App Version (found in app settings): +- App Build (found in app settings): + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/featureRequest.md b/.github/ISSUE_TEMPLATE/featureRequest.md new file mode 100644 index 0000000..c5afd77 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/featureRequest.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[FEATURE REQUEST]" +labels: enhancement, wish list +assignees: justinkumpe + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you may have considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/xcode_tests.yml b/.github/workflows/xcode_tests.yml new file mode 100644 index 0000000..cf8ca3b --- /dev/null +++ b/.github/workflows/xcode_tests.yml @@ -0,0 +1,74 @@ +name: iOS project Run Tests + +on: + push: + branches: [ Development ] + +concurrency: + group: build-ios-${{ github.ref }} + cancel-in-progress: true + +jobs: + TestFlight: + if: "contains(github.event.head_commit.message, '#TestFlight')" + runs-on: macos-latest + environment: Apple App Store + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + id: podcache + with: + path: Pods + key: ${{ runner.os }}-pods-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + + - uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ runner.os }}-gem-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gem- + + - name: Bundle dependencies + run: bundle install + + - name: CocoaPods dependencies + env: + newrelic_token: ${{ secrets.NEWRELIC_TOKEN }} + run: bundle exec pod check || bundle exec pod install + + - name: CocoaPods Update + if: "contains(github.event.head_commit.message, '#pod update')" + run: bundle exec pod update + + - name: Fastlane Match + env: + FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }} + FASTLANE_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }} + FASTLANE_USER: "jakumpe@justinkumpe.net" + MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} + MATCH_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} + MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} + run: bundle exec fastlane matchget + + - name: Upload To TestFlight Alpha + if: "!contains(github.event.head_commit.message, '#beta')" + env: + APPLE_APPSTORE_API_ISSUER_ID: ${{ secrets.APPLE_APPSTORE_API_ISSUER_ID }} + APPLE_APP_STORE_API_KEY: ${{ secrets.APPLE_APP_STORE_API_KEY }} + APPLE_APP_STORE_API_KEY_ID: ${{ secrets.APPLE_APP_STORE_API_KEY_ID }} + run: bundle exec fastlane alpha + + - name: Upload To TestFlight Beta + if: "contains(github.event.head_commit.message, '#beta')" + env: + APPLE_APPSTORE_API_ISSUER_ID: ${{ secrets.APPLE_APPSTORE_API_ISSUER_ID }} + APPLE_APP_STORE_API_KEY: ${{ secrets.APPLE_APP_STORE_API_KEY }} + APPLE_APP_STORE_API_KEY_ID: ${{ secrets.APPLE_APP_STORE_API_KEY_ID }} + run: bundle exec fastlane beta + + - name: Commit and Push + run: git commit ./KKid.xcodeproj ./KKid/Info.plist KKidUITests/Info.plist ./fastlane/ -m "Updated Fastfile" && git push \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..9beae7c --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +source "http://rubygems.org" +require 'resolv-replace' +gem "fastlane" +gem "cocoapods" +gem "cocoapods-keys" +gem "cocoapods-check" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..d842a48 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,296 @@ +GEM + remote: http://rubygems.org/ + specs: + CFPropertyList (3.0.5) + rexml + RubyInline (3.12.6) + ZenTest (~> 4.3) + ZenTest (4.12.1) + activesupport (6.1.6.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + artifactory (3.0.15) + atomos (0.1.3) + aws-eventstream (1.2.0) + aws-partitions (1.610.0) + aws-sdk-core (3.131.3) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.525.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.58.0) + aws-sdk-core (~> 3, >= 3.127.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.114.0) + aws-sdk-core (~> 3, >= 3.127.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.4) + aws-sigv4 (1.5.1) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + claide (1.1.0) + cocoapods (1.11.3) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.11.3) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 1.0, < 3.0) + xcodeproj (>= 1.21.0, < 2.0) + cocoapods-check (1.1.0) + cocoapods (~> 1.0) + cocoapods-core (1.11.3) + activesupport (>= 5.0, < 7) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (1.6.3) + cocoapods-keys (2.2.1) + dotenv + osx_keychain + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + concurrent-ruby (1.1.10) + declarative (0.0.20) + digest-crc (0.6.4) + rake (>= 12.0.0, < 14.0.0) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.7.6) + emoji_regex (3.2.3) + escape (0.0.4) + ethon (0.15.0) + ffi (>= 1.15.0) + excon (0.92.4) + faraday (1.10.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) + http-cookie (~> 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.0) + faraday (~> 1.0) + fastimage (2.2.6) + fastlane (2.208.0) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.3, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored + commander (~> 4.6) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-storage (~> 1.31) + highline (~> 2.0) + json (< 3.0.0) + jwt (>= 2.1.0, < 3) + mini_magick (>= 4.9.4, < 5.0.0) + multipart-post (~> 2.0.0) + naturally (~> 2.2) + optparse (~> 0.1.1) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 2.0.0, < 3.0.0) + security (= 0.1.3) + simctl (~> 1.6.3) + terminal-notifier (>= 2.0.0, < 3.0.0) + terminal-table (>= 1.4.5, < 2.0.0) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3) + ffi (1.15.5) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + google-apis-androidpublisher_v3 (0.25.0) + google-apis-core (>= 0.7, < 2.a) + google-apis-core (0.7.0) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + webrick + google-apis-iamcredentials_v1 (0.13.0) + google-apis-core (>= 0.7, < 2.a) + google-apis-playcustomapp_v1 (0.10.0) + google-apis-core (>= 0.7, < 2.a) + google-apis-storage_v1 (0.18.0) + google-apis-core (>= 0.7, < 2.a) + google-cloud-core (1.6.0) + google-cloud-env (~> 1.0) + google-cloud-errors (~> 1.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) + google-cloud-errors (1.2.0) + google-cloud-storage (1.37.0) + addressable (~> 2.8) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.1) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) + mini_mime (~> 1.0) + googleauth (1.2.0) + faraday (>= 0.17.3, < 3.a) + jwt (>= 1.4, < 3.0) + memoist (~> 0.16) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.5) + domain_name (~> 0.5) + httpclient (2.8.3) + i18n (1.12.0) + concurrent-ruby (~> 1.0) + jmespath (1.6.1) + json (2.6.2) + jwt (2.4.1) + memoist (0.16.2) + mini_magick (4.11.0) + mini_mime (1.1.2) + minitest (5.16.2) + molinillo (0.8.0) + multi_json (1.15.0) + multipart-post (2.0.0) + nanaimo (0.3.0) + nap (1.1.0) + naturally (2.2.1) + netrc (0.11.0) + optparse (0.1.1) + os (1.1.4) + osx_keychain (1.0.2) + RubyInline (~> 3) + plist (3.6.0) + public_suffix (4.0.7) + rake (13.0.6) + representable (3.2.0) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rexml (3.2.5) + rouge (2.0.7) + ruby-macho (2.5.1) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + security (0.1.3) + signet (0.17.0) + addressable (~> 2.8) + faraday (>= 0.17.5, < 3.a) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.8) + CFPropertyList + naturally + terminal-notifier (2.0.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + trailblazer-option (0.1.2) + tty-cursor (0.7.1) + tty-screen (0.8.1) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (2.0.5) + concurrent-ruby (~> 1.0) + uber (0.1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + unicode-display_width (1.8.0) + webrick (1.7.0) + word_wrap (1.0.0) + xcodeproj (1.22.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + rexml (~> 3.2.4) + xcpretty (0.3.0) + rouge (~> 2.0.7) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + zeitwerk (2.6.0) + +PLATFORMS + ruby + +DEPENDENCIES + cocoapods + cocoapods-check + cocoapods-keys + fastlane + +BUNDLED WITH + 2.3.18 diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..a62f1da --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,77 @@ +PODS: + - AFCurvedArrowView (1.0.1) + - Alamofire (4.9.1) + - Alamofire-SwiftyJSON (3.0.0): + - Alamofire (~> 4.5) + - SwiftyJSON (~> 4.0.0) + - CollectionViewCenteredFlowLayout (1.0.1) + - DeviceKit (4.6.1) + - FetchedResultsControllerCollectionViewUpdater (0.1.0) + - Haptico (1.1.1) + - Keys (1.0.1) + - KumpeHelpers (4.0): + - Alamofire-SwiftyJSON + - CollectionViewCenteredFlowLayout + - DeviceKit + - FetchedResultsControllerCollectionViewUpdater + - Haptico + - ReachabilitySwift + - SwiftMessages + - Sync + - NewRelicAgent (7.3.7) + - PBTutorialManager (1.1.0): + - AFCurvedArrowView + - ReachabilitySwift (5.0.0) + - SwiftMessages (9.0.6): + - SwiftMessages/App (= 9.0.6) + - SwiftMessages/App (9.0.6) + - SwiftyJSON (4.0.0) + - Sync (6.5.0) + +DEPENDENCIES: + - Keys (from `Pods/CocoaPodsKeys`) + - KumpeHelpers + - NewRelicAgent + - PBTutorialManager + +SPEC REPOS: + https://github.com/CocoaPods/Specs.git: + - AFCurvedArrowView + - Alamofire + - Alamofire-SwiftyJSON + - CollectionViewCenteredFlowLayout + - DeviceKit + - FetchedResultsControllerCollectionViewUpdater + - Haptico + - KumpeHelpers + - NewRelicAgent + - PBTutorialManager + - ReachabilitySwift + - SwiftMessages + - SwiftyJSON + - Sync + +EXTERNAL SOURCES: + Keys: + :path: Pods/CocoaPodsKeys + +SPEC CHECKSUMS: + AFCurvedArrowView: 5fa8fcc1f77f5428ab34d7a1c6696b88c3c20f40 + Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 + Alamofire-SwiftyJSON: 2b3649d57dc7bb2880fb8b86f8bb969397666916 + CollectionViewCenteredFlowLayout: 339b935be4d8578c59e448c8906117a07c657d85 + DeviceKit: 316f28290430467278b8a0d1c895968efa9e16e2 + FetchedResultsControllerCollectionViewUpdater: 10e88db1403d8d6e17a5d323efe1d1fd31dd0e1c + Haptico: 3ab938425737e2b90939d41e1b23538cdbe1cf44 + Keys: a576f4c9c1c641ca913a959a9c62ed3f215a8de9 + KumpeHelpers: 04594e568e664c0d34eaff80b02a927c1f3da751 + NewRelicAgent: 13afbb9545e287293cf7514d344be4ebc9413c6e + PBTutorialManager: 7c2383247c0b0da71cf14438c0a2a737bca51a42 + ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 + SwiftMessages: f0c7ef4705a570ad6c5e208b611f4333e660ed92 + SwiftyJSON: 070dabdcb1beb81b247c65ffa3a79dbbfb3b48aa + Sync: 86bb8aa0ea2f955ea5ac97b7b73129f86591c39e + +PODFILE CHECKSUM: ef91a47504c85d1f6d13736ead021a34de634d70 + +COCOAPODS: 1.11.3 diff --git a/Static IP Trainer.xcodeproj/project.pbxproj b/Static IP Trainer.xcodeproj/project.pbxproj index a37e033..e187c1c 100644 --- a/Static IP Trainer.xcodeproj/project.pbxproj +++ b/Static IP Trainer.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 0F50999E288C9F9600A5A2DC /* TutorialManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F50999D288C9F9600A5A2DC /* TutorialManager.swift */; }; + AA178BD8BCFA879D6DC7E84E /* Pods_Static_IP_Trainer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7671126E632AFB62E06D69CA /* Pods_Static_IP_Trainer.framework */; }; F4C8770A205F51CA007461E6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C87709205F51CA007461E6 /* AppDelegate.swift */; }; F4C8770C205F51CA007461E6 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C8770B205F51CA007461E6 /* MainViewController.swift */; }; F4C8770F205F51CA007461E6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F4C8770D205F51CA007461E6 /* Main.storyboard */; }; @@ -21,6 +23,9 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 0F50999D288C9F9600A5A2DC /* TutorialManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TutorialManager.swift; sourceTree = ""; }; + 2C1963ADF931C4A3917BB4D6 /* Pods-Static IP Trainer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Static IP Trainer.release.xcconfig"; path = "Target Support Files/Pods-Static IP Trainer/Pods-Static IP Trainer.release.xcconfig"; sourceTree = ""; }; + 7671126E632AFB62E06D69CA /* Pods_Static_IP_Trainer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Static_IP_Trainer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F4C87706205F51CA007461E6 /* Static IP Trainer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Static IP Trainer.app"; sourceTree = BUILT_PRODUCTS_DIR; }; F4C87709205F51CA007461E6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; F4C8770B205F51CA007461E6 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; @@ -34,6 +39,7 @@ F4E73639206054600097EE39 /* SelectRGViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectRGViewController.swift; sourceTree = ""; }; F4E7365C206094280097EE39 /* PaceRG1ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaceRG1ViewController.swift; sourceTree = ""; }; F4E7365E2060946F0097EE39 /* PaceRG2ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaceRG2ViewController.swift; sourceTree = ""; }; + FF9F8A53D2E0A8E4DF9F8050 /* Pods-Static IP Trainer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Static IP Trainer.debug.xcconfig"; path = "Target Support Files/Pods-Static IP Trainer/Pods-Static IP Trainer.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -41,17 +47,68 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + AA178BD8BCFA879D6DC7E84E /* Pods_Static_IP_Trainer.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 0F032C43288C8C5400DCE2B0 /* Models */ = { + isa = PBXGroup; + children = ( + ); + path = Models; + sourceTree = ""; + }; + 0F032C44288C8C5D00DCE2B0 /* Controllers */ = { + isa = PBXGroup; + children = ( + F4C87709205F51CA007461E6 /* AppDelegate.swift */, + 0F50999D288C9F9600A5A2DC /* TutorialManager.swift */, + F4C8770B205F51CA007461E6 /* MainViewController.swift */, + F4E73639206054600097EE39 /* SelectRGViewController.swift */, + F4E7365C206094280097EE39 /* PaceRG1ViewController.swift */, + F4CE823B2063440B001AD97B /* ARRISRG1ViewController.swift */, + F4E7365E2060946F0097EE39 /* PaceRG2ViewController.swift */, + F4CE823D20634416001AD97B /* ARRISRG2ViewController.swift */, + ); + path = Controllers; + sourceTree = ""; + }; + 0F032C45288C8C6600DCE2B0 /* Views */ = { + isa = PBXGroup; + children = ( + F4C8770D205F51CA007461E6 /* Main.storyboard */, + F4C87715205F51CA007461E6 /* LaunchScreen.storyboard */, + ); + path = Views; + sourceTree = ""; + }; + 889173D1DA277275C3605140 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7671126E632AFB62E06D69CA /* Pods_Static_IP_Trainer.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + AED7705680428E164DC3E03C /* Pods */ = { + isa = PBXGroup; + children = ( + FF9F8A53D2E0A8E4DF9F8050 /* Pods-Static IP Trainer.debug.xcconfig */, + 2C1963ADF931C4A3917BB4D6 /* Pods-Static IP Trainer.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; F4C876FD205F51CA007461E6 = { isa = PBXGroup; children = ( F4C87708205F51CA007461E6 /* Static IP Trainer */, F4C87707205F51CA007461E6 /* Products */, + AED7705680428E164DC3E03C /* Pods */, + 889173D1DA277275C3605140 /* Frameworks */, ); sourceTree = ""; }; @@ -66,16 +123,10 @@ F4C87708205F51CA007461E6 /* Static IP Trainer */ = { isa = PBXGroup; children = ( - F4C87709205F51CA007461E6 /* AppDelegate.swift */, - F4C8770B205F51CA007461E6 /* MainViewController.swift */, - F4E73639206054600097EE39 /* SelectRGViewController.swift */, - F4E7365C206094280097EE39 /* PaceRG1ViewController.swift */, - F4CE823B2063440B001AD97B /* ARRISRG1ViewController.swift */, - F4E7365E2060946F0097EE39 /* PaceRG2ViewController.swift */, - F4CE823D20634416001AD97B /* ARRISRG2ViewController.swift */, - F4C8770D205F51CA007461E6 /* Main.storyboard */, + 0F032C45288C8C6600DCE2B0 /* Views */, + 0F032C44288C8C5D00DCE2B0 /* Controllers */, + 0F032C43288C8C5400DCE2B0 /* Models */, F4C87713205F51CA007461E6 /* Assets.xcassets */, - F4C87715205F51CA007461E6 /* LaunchScreen.storyboard */, F4C87718205F51CB007461E6 /* Info.plist */, F4C87710205F51CA007461E6 /* Static_IP_Trainer.xcdatamodeld */, ); @@ -89,9 +140,12 @@ isa = PBXNativeTarget; buildConfigurationList = F4C8771B205F51CB007461E6 /* Build configuration list for PBXNativeTarget "Static IP Trainer" */; buildPhases = ( + 1D0F2C408A48914F82FC6A37 /* [CP] Check Pods Manifest.lock */, F4C87702205F51CA007461E6 /* Sources */, F4C87703205F51CA007461E6 /* Frameworks */, F4C87704205F51CA007461E6 /* Resources */, + F6638D66AFCEE2CEB0D08160 /* [CP] Embed Pods Frameworks */, + 0F032C48288C9BCD00DCE2B0 /* ShellScript */, ); buildRules = ( ); @@ -115,7 +169,7 @@ F4C87705205F51CA007461E6 = { CreatedOnToolsVersion = 9.2; LastSwiftMigration = 1140; - ProvisioningStyle = Automatic; + ProvisioningStyle = Manual; }; }; }; @@ -150,6 +204,94 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 0F032C48288C9BCD00DCE2B0 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "SCRIPT=`/usr/bin/find \"${SRCROOT}\" -name newrelic_postbuild.sh | head -n 1`\n\n/bin/sh \"${SCRIPT}\" echo `bundle exec pod keys get newrelic_token`\n"; + }; + 1D0F2C408A48914F82FC6A37 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Static IP Trainer-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + F6638D66AFCEE2CEB0D08160 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Static IP Trainer/Pods-Static IP Trainer-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/AFCurvedArrowView/AFCurvedArrowView.framework", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/Alamofire-SwiftyJSON/Alamofire_SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/CollectionViewCenteredFlowLayout/CollectionViewCenteredFlowLayout.framework", + "${BUILT_PRODUCTS_DIR}/DeviceKit/DeviceKit.framework", + "${BUILT_PRODUCTS_DIR}/FetchedResultsControllerCollectionViewUpdater/FetchedResultsControllerCollectionViewUpdater.framework", + "${BUILT_PRODUCTS_DIR}/Haptico/Haptico.framework", + "${BUILT_PRODUCTS_DIR}/Keys/Keys.framework", + "${BUILT_PRODUCTS_DIR}/KumpeHelpers/KumpeHelpers.framework", + "${BUILT_PRODUCTS_DIR}/PBTutorialManager/PBTutorialManager.framework", + "${BUILT_PRODUCTS_DIR}/ReachabilitySwift/Reachability.framework", + "${BUILT_PRODUCTS_DIR}/SwiftMessages/SwiftMessages.framework", + "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", + "${BUILT_PRODUCTS_DIR}/Sync/Sync.framework", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/NewRelicAgent/NewRelic.framework/NewRelic", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFCurvedArrowView.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire_SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CollectionViewCenteredFlowLayout.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DeviceKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FetchedResultsControllerCollectionViewUpdater.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Haptico.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Keys.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KumpeHelpers.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PBTutorialManager.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftMessages.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sync.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NewRelic.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Static IP Trainer/Pods-Static IP Trainer-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ F4C87702205F51CA007461E6 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -159,6 +301,7 @@ F4CE823E20634416001AD97B /* ARRISRG2ViewController.swift in Sources */, F4E7365F2060946F0097EE39 /* PaceRG2ViewController.swift in Sources */, F4C87712205F51CA007461E6 /* Static_IP_Trainer.xcdatamodeld in Sources */, + 0F50999E288C9F9600A5A2DC /* TutorialManager.swift in Sources */, F4C8770A205F51CA007461E6 /* AppDelegate.swift in Sources */, F4E7365D206094280097EE39 /* PaceRG1ViewController.swift in Sources */, F4E7363A206054600097EE39 /* SelectRGViewController.swift in Sources */, @@ -303,17 +446,20 @@ }; F4C8771C205F51CB007461E6 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = FF9F8A53D2E0A8E4DF9F8050 /* Pods-Static IP Trainer.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14.0; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = 2T42Z3DM34; INFOPLIST_FILE = "Static IP Trainer/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 14.1; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 14.0; + MARKETING_VERSION = 15.0; PRODUCT_BUNDLE_IDENTIFIER = "com.kumpeapps.ios.Static-IP-Trainer"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = "match Development com.kumpeapps.ios.Static-IP-Trainer"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -321,17 +467,20 @@ }; F4C8771D205F51CB007461E6 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 2C1963ADF931C4A3917BB4D6 /* Pods-Static IP Trainer.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14.0; + CODE_SIGN_IDENTITY = "iPhone Distribution"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = 2T42Z3DM34; INFOPLIST_FILE = "Static IP Trainer/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 14.1; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 14.0; + MARKETING_VERSION = 15.0; PRODUCT_BUNDLE_IDENTIFIER = "com.kumpeapps.ios.Static-IP-Trainer"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.kumpeapps.ios.Static-IP-Trainer"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; diff --git a/Static IP Trainer.xcworkspace/contents.xcworkspacedata b/Static IP Trainer.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0ffdd0a --- /dev/null +++ b/Static IP Trainer.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Static IP Trainer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Static IP Trainer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Static IP Trainer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Static IP Trainer/ARRISRG1ViewController.swift b/Static IP Trainer/Controllers/ARRISRG1ViewController.swift similarity index 74% rename from Static IP Trainer/ARRISRG1ViewController.swift rename to Static IP Trainer/Controllers/ARRISRG1ViewController.swift index 663d538..2cb1fa2 100644 --- a/Static IP Trainer/ARRISRG1ViewController.swift +++ b/Static IP Trainer/Controllers/ARRISRG1ViewController.swift @@ -7,6 +7,7 @@ // import UIKit +import KumpeHelpers class ARRISRG1ViewController: UIViewController { @@ -20,7 +21,14 @@ class ARRISRG1ViewController: UIViewController { var SubnetMask = "" var PrimaryDNS = "" var SecondaryDNS = "" - + + // MARK: Buttons + @IBOutlet weak var buttonCancel: UIBarButtonItem! + @IBOutlet weak var buttonShare: UIBarButtonItem! + + // MARK: Parameters + var message: String! = "" + override func viewDidLoad() { super.viewDidLoad() @@ -48,5 +56,14 @@ class ARRISRG1ViewController: UIViewController { } } + // MARK: pressedShare + @IBAction func pressedShare(_ sender: Any) { + KumpeHelpers.Share.text(message, self, shareButton: buttonShare) + } + + // MARK: pressedCancel + @IBAction func pressedCancel(_ sender: Any) { + navigationController?.popToRootViewController(animated: true) + } } diff --git a/Static IP Trainer/ARRISRG2ViewController.swift b/Static IP Trainer/Controllers/ARRISRG2ViewController.swift similarity index 66% rename from Static IP Trainer/ARRISRG2ViewController.swift rename to Static IP Trainer/Controllers/ARRISRG2ViewController.swift index d8cd3a0..b6c4d8c 100644 --- a/Static IP Trainer/ARRISRG2ViewController.swift +++ b/Static IP Trainer/Controllers/ARRISRG2ViewController.swift @@ -7,6 +7,7 @@ // import UIKit +import KumpeHelpers class ARRISRG2ViewController: UIViewController { @IBOutlet weak var RGIPLabel: UILabel! @@ -24,7 +25,14 @@ class ARRISRG2ViewController: UIViewController { var SubnetMask = "" var PrimaryDNS = "" var SecondaryDNS = "" - + + // MARK: Buttons + @IBOutlet weak var buttonCancel: UIBarButtonItem! + @IBOutlet weak var buttonShare: UIBarButtonItem! + + // MARK: Parameters + var message: String! = "" + override func viewDidLoad() { super.viewDidLoad() DHCPStartLabel.text = "\(IPO1).\(IPO2).\(IPO3).\(FUIPO4)" @@ -34,6 +42,14 @@ class ARRISRG2ViewController: UIViewController { // Do any additional setup after loading the view. } + // MARK: pressedShare + @IBAction func pressedShare(_ sender: Any) { + KumpeHelpers.Share.text(message, self, shareButton: buttonShare) + } + // MARK: pressedCancel + @IBAction func pressedCancel(_ sender: Any) { + navigationController?.popToRootViewController(animated: true) + } } diff --git a/Static IP Trainer/AppDelegate.swift b/Static IP Trainer/Controllers/AppDelegate.swift similarity index 97% rename from Static IP Trainer/AppDelegate.swift rename to Static IP Trainer/Controllers/AppDelegate.swift index b877152..2564ac9 100644 --- a/Static IP Trainer/AppDelegate.swift +++ b/Static IP Trainer/Controllers/AppDelegate.swift @@ -8,6 +8,8 @@ import UIKit import CoreData +import NewRelic +import Keys @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { @@ -17,6 +19,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. + NewRelic.start(withApplicationToken:"\(StaticIPTrainerKeys().newrelic_token)") return true } diff --git a/Static IP Trainer/MainViewController.swift b/Static IP Trainer/Controllers/MainViewController.swift similarity index 85% rename from Static IP Trainer/MainViewController.swift rename to Static IP Trainer/Controllers/MainViewController.swift index c5af377..ad99b64 100644 --- a/Static IP Trainer/MainViewController.swift +++ b/Static IP Trainer/Controllers/MainViewController.swift @@ -10,7 +10,7 @@ import UIKit import MessageUI class MainViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource, MFMailComposeViewControllerDelegate { - + //MARK: Set Declared Values @IBOutlet weak var BlockSizePicker: UIPickerView! @IBOutlet weak var IPO1: UITextField! @@ -29,39 +29,46 @@ class MainViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDa let FUAdd = 1 let PrimaryDNS = "68.94.156.1" let SecondaryDNS = "68.94.157.1" - + @IBOutlet weak var labelStartIP: UILabel! + @IBOutlet weak var buttonNext: UIButton! + //MARK: Set Options Array for Block Size Picker var SelectBlockSize = ["Select Block Size", "8", "16", "32", "64"] - //MARK: viewDid Load + //MARK: viewDidLoad override func viewDidLoad() { super.viewDidLoad() //Run Block Size Picker BlockSizePicker.delegate = self BlockSizePicker.dataSource = self - } - + + // MARK: viewDidAppear + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + tutorial() + } + //MARK: Configure Block Size Picker func numberOfComponents(in pickerView: UIPickerView) -> Int { return 1 } - + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { return SelectBlockSize.count } - + func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { return SelectBlockSize[row] } - + func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { self.BlockSize = SelectBlockSize[row] } - + //MARK: Run when Next Button is Pressed @IBAction func NextButtonPressed(_ sender: Any) { - + //If any field is blank then Show Alert (Missing Information Alert) ELSE Set options for specified block size if self.BlockSize == "Select Block Size" || self.BlockSize == "" || IPO4.text?.isEmpty ?? true || IPO3.text?.isEmpty ?? true || IPO2.text?.isEmpty ?? true || IPO1.text?.isEmpty ?? true { showAlert() @@ -86,43 +93,40 @@ class MainViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDa self.LUAdd = 61 self.SubnetMask = "255.255.255.192" } - + //MARK: Calculate RG IP, Last Usable IP, and First Usable IP self.RGIPO4 = String(Int(self.IPO4.text!)! + Int(self.RGAdd)) self.LUIPO4 = String(Int(self.IPO4.text!)! + Int(self.LUAdd)) self.FUIPO4 = String(Int(self.IPO4.text!)! + Int(self.FUAdd)) - + //Show Message (Display Static IP Info Alert) showIPMessage() } } - + //MARK: Missing Information Alert @IBAction func showAlert() { //Configure Alert let alertController = UIAlertController(title: "Missing Information", message: "Please enter IP Address \nand select Block Size", preferredStyle: UIAlertController.Style.alert) alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertAction.Style.default,handler: nil)) - + //Display Alert self.present(alertController, animated: true, completion: nil) } - + //MARK: Display Static IP Info Message //UIAlertControllerStyle.actionSheet shows message at bottom of screen instead of an alert in center of screen @IBAction func showIPMessage() { + let message = "Static IP Information\nFirst Usable: \(self.IPO1.text!).\(self.IPO2.text!).\(self.IPO3.text!).\(self.FUIPO4)\nLast Usable: \(self.IPO1.text!).\(self.IPO2.text!).\(self.IPO3.text!).\(self.LUIPO4)\nRG IP: \(self.IPO1.text!).\(self.IPO2.text!).\(self.IPO3.text!).\(self.RGIPO4)\nSubnet Mask: \(self.SubnetMask)\nPrimary DNS: \(self.PrimaryDNS)\nSecondaryDNS: \(self.SecondaryDNS)" //Configure Message - let alertController = UIAlertController(title: "Static IP Information", message: - "First Usable: \(self.IPO1.text!).\(self.IPO2.text!).\(self.IPO3.text!).\(self.FUIPO4)\nLast Usable: \(self.IPO1.text!).\(self.IPO2.text!).\(self.IPO3.text!).\(self.LUIPO4)\nRG IP: \(self.IPO1.text!).\(self.IPO2.text!).\(self.IPO3.text!).\(self.RGIPO4)\nSubnet Mask: \(self.SubnetMask)\nPrimary DNS: \(self.PrimaryDNS)\nSecondaryDNS: \(self.SecondaryDNS)", preferredStyle: UIAlertController.Style.alert) - - let alertButton1 = UIAlertAction(title: "Email", style: UIAlertAction.Style.default,handler: sendEmail) + let alertController = UIAlertController(title: "Static IP Information", message:message, preferredStyle: UIAlertController.Style.alert) let alertButton2 = UIAlertAction(title: "Next", style: UIAlertAction.Style.default,handler: SelectRG) - alertController.addAction(alertButton1) alertController.addAction(alertButton2) //Display Message self.present(alertController, animated: true, completion: nil) } - + //MARK: Hide Keyboard //Hides Keyboard when user touches outside of text field override func touchesBegan(_ touches: Set, with event: UIEvent?) { @@ -150,16 +154,17 @@ class MainViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDa self.present(alertController, animated: true, completion: nil) } } + //Close Mail App on Send/Cancel/Error func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { controller.dismiss(animated: true) performSegue(withIdentifier: "SelectRG", sender: nil) } - + func SelectRG(action: UIAlertAction){ performSegue(withIdentifier: "SelectRG", sender: nil) } - + //Set Variables to send to Select RG during segue override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "SelectRG" { @@ -173,7 +178,8 @@ class MainViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDa SegueViewController.SubnetMask = self.SubnetMask SegueViewController.PrimaryDNS = self.PrimaryDNS SegueViewController.SecondaryDNS = self.SecondaryDNS + SegueViewController.message = "Static IP Information\nFirst Usable: \(self.IPO1.text!).\(self.IPO2.text!).\(self.IPO3.text!).\(self.FUIPO4)\nLast Usable: \(self.IPO1.text!).\(self.IPO2.text!).\(self.IPO3.text!).\(self.LUIPO4)\nRG IP: \(self.IPO1.text!).\(self.IPO2.text!).\(self.IPO3.text!).\(self.RGIPO4)\nSubnet Mask: \(self.SubnetMask)\nPrimary DNS: \(self.PrimaryDNS)\nSecondaryDNS: \(self.SecondaryDNS)" } } -} +} diff --git a/Static IP Trainer/PaceRG1ViewController.swift b/Static IP Trainer/Controllers/PaceRG1ViewController.swift similarity index 74% rename from Static IP Trainer/PaceRG1ViewController.swift rename to Static IP Trainer/Controllers/PaceRG1ViewController.swift index 18f7721..981cc2c 100644 --- a/Static IP Trainer/PaceRG1ViewController.swift +++ b/Static IP Trainer/Controllers/PaceRG1ViewController.swift @@ -7,6 +7,7 @@ // import UIKit +import KumpeHelpers class PaceRG1ViewController: UIViewController { @@ -20,7 +21,14 @@ class PaceRG1ViewController: UIViewController { var SubnetMask = "" var PrimaryDNS = "" var SecondaryDNS = "" - + + // MARK: Buttons + @IBOutlet weak var buttonCancel: UIBarButtonItem! + @IBOutlet weak var buttonShare: UIBarButtonItem! + + // MARK: Parameters + var message: String! = "" + override func viewDidLoad() { super.viewDidLoad() @@ -48,5 +56,14 @@ class PaceRG1ViewController: UIViewController { } } + // MARK: pressedShare + @IBAction func pressedShare(_ sender: Any) { + KumpeHelpers.Share.text(message, self, shareButton: buttonShare) + } + + // MARK: pressedCancel + @IBAction func pressedCancel(_ sender: Any) { + navigationController?.popToRootViewController(animated: true) + } } diff --git a/Static IP Trainer/PaceRG2ViewController.swift b/Static IP Trainer/Controllers/PaceRG2ViewController.swift similarity index 60% rename from Static IP Trainer/PaceRG2ViewController.swift rename to Static IP Trainer/Controllers/PaceRG2ViewController.swift index 067065b..ed869a9 100644 --- a/Static IP Trainer/PaceRG2ViewController.swift +++ b/Static IP Trainer/Controllers/PaceRG2ViewController.swift @@ -7,6 +7,7 @@ // import UIKit +import KumpeHelpers class PaceRG2ViewController: UIViewController { @IBOutlet weak var RGIPLabel: UILabel! @@ -22,7 +23,14 @@ class PaceRG2ViewController: UIViewController { var SubnetMask = "" var PrimaryDNS = "" var SecondaryDNS = "" - + + // MARK: Buttons + @IBOutlet weak var buttonCancel: UIBarButtonItem! + @IBOutlet weak var buttonShare: UIBarButtonItem! + + // MARK: Parameters + var message: String! = "" + override func viewDidLoad() { super.viewDidLoad() RGIPLabel.text = "\(IPO1).\(IPO2).\(IPO3).\(RGIPO4)" @@ -30,6 +38,14 @@ class PaceRG2ViewController: UIViewController { // Do any additional setup after loading the view. } + // MARK: pressedShare + @IBAction func pressedShare(_ sender: Any) { + KumpeHelpers.Share.text(message, self, shareButton: buttonShare) + } + // MARK: pressedCancel + @IBAction func pressedCancel(_ sender: Any) { + navigationController?.popToRootViewController(animated: true) + } } diff --git a/Static IP Trainer/SelectRGViewController.swift b/Static IP Trainer/Controllers/SelectRGViewController.swift similarity index 86% rename from Static IP Trainer/SelectRGViewController.swift rename to Static IP Trainer/Controllers/SelectRGViewController.swift index 107e5ee..08c2fa2 100644 --- a/Static IP Trainer/SelectRGViewController.swift +++ b/Static IP Trainer/Controllers/SelectRGViewController.swift @@ -7,9 +7,19 @@ // import UIKit +import KumpeHelpers class SelectRGViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource { + + // MARK: Pickers @IBOutlet weak var SelectRGPicker: UIPickerView! + + // MARK: Buttons + @IBOutlet weak var buttonCancel: UIBarButtonItem! + @IBOutlet weak var buttonShare: UIBarButtonItem! + + // MARK: Parameters + var message: String! = "" var SelectRG = ["Select RG", "3801", "5031", "NVGxxx", "5268AC", "BGWxxx"] @@ -24,7 +34,7 @@ class SelectRGViewController: UIViewController, UIPickerViewDelegate, UIPickerVi var PrimaryDNS = "" var SecondaryDNS = "" var SelectedRG = "" - + override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -98,4 +108,14 @@ class SelectRGViewController: UIViewController, UIPickerViewDelegate, UIPickerVi } } + // MARK: pressedShare + @IBAction func pressedShare(_ sender: Any) { + KumpeHelpers.Share.text(message, self, shareButton: buttonShare) + } + + // MARK: pressedCancel + @IBAction func pressedCancel(_ sender: Any) { + navigationController?.popToRootViewController(animated: true) + } + } diff --git a/Static IP Trainer/Controllers/TutorialManager.swift b/Static IP Trainer/Controllers/TutorialManager.swift new file mode 100644 index 0000000..2803506 --- /dev/null +++ b/Static IP Trainer/Controllers/TutorialManager.swift @@ -0,0 +1,56 @@ +// +// TutorialManager.swift +// Static IP Trainer +// +// Created by Justin Kumpe on 7/23/22. +// Copyright © 2022 Justin Kumpe. All rights reserved. +// + +import Foundation +import KumpeHelpers +import PBTutorialManager + +extension MainViewController { + func tutorial() { + let tutorialManager = TutorialManager(parent: view.window!) + let lastBuild = UserDefaults.standard.integer(forKey: "lastBuildMain") + UserDefaults.standard.set(KumpeHelpers.KumpeAPIClient.appBuild, forKey: "lastBuildMain") + + // Create Targets + let targetStartIP = createTutorialTarget(view: labelStartIP, message: "Enter the first IP in the block", position: .top, breakPoint: false) + let targetBlockSize = createTutorialTarget(view: BlockSizePicker, message: "Select Block Size", position: .bottom, breakPoint: true) + let targetNext = createTutorialTarget(view: buttonNext, message: "Click Next to view IP Info and Uverse Gateway Instructions", position: .bottom) + + // Add Targets since build 16 + if lastBuild < 16 { + tutorialManager.addTargets([targetStartIP,targetBlockSize,targetNext]) + } + + // Show Tutorial + tutorialManager.fireTargets() + } +} + +public func createTutorialTarget(view: UIView?, message: String, position: TutorialTarget.TargetPosition, shape: HoleShape = .roundedRect, breakPoint: Bool = true) -> TutorialTarget { + let target = TutorialTarget(view: view) + .withArrow(true) + .widthArrow(50) + .heightArrow(50) + .labelWidth(200) + .position(position) + .shape(shape) + .message(message) + .breakPoint(breakPoint) + return target +} + +extension UIBarButtonItem { + + var view: UIView? { + guard let view = self.value(forKey: "view") as? UIView else { + return nil + } + return view + } + +} diff --git a/Static IP Trainer/Base.lproj/LaunchScreen.storyboard b/Static IP Trainer/Views/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from Static IP Trainer/Base.lproj/LaunchScreen.storyboard rename to Static IP Trainer/Views/Base.lproj/LaunchScreen.storyboard diff --git a/Static IP Trainer/Base.lproj/Main.storyboard b/Static IP Trainer/Views/Base.lproj/Main.storyboard similarity index 89% rename from Static IP Trainer/Base.lproj/Main.storyboard rename to Static IP Trainer/Views/Base.lproj/Main.storyboard index 32e8080..663227f 100644 --- a/Static IP Trainer/Base.lproj/Main.storyboard +++ b/Static IP Trainer/Views/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -26,7 +26,7 @@