├── .bundle └── config ├── .gitignore ├── .ruby-version ├── .swiftformat ├── .swiftlint.yml ├── .travis.yml ├── CLI ├── _license_plist │ ├── Package.resolved │ └── Package.swift ├── _swiftformat │ ├── Package.resolved │ └── Package.swift ├── _swiftgen │ ├── Package.resolved │ └── Package.swift ├── _swiftlint │ ├── Package.resolved │ └── Package.swift └── _xcodegen │ ├── Package.resolved │ └── Package.swift ├── Gemfile ├── Gemfile.lock ├── LICENSE.md ├── LongWeekend ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Resource │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon_1024@1x.png │ │ │ ├── icon_20@1x.png │ │ │ ├── icon_20@2x.png │ │ │ ├── icon_20@3x.png │ │ │ ├── icon_29@1x.png │ │ │ ├── icon_29@2x.png │ │ │ ├── icon_29@3x.png │ │ │ ├── icon_40@1x.png │ │ │ ├── icon_40@2x.png │ │ │ ├── icon_40@3x.png │ │ │ ├── icon_60@2x.png │ │ │ ├── icon_60@3x.png │ │ │ ├── icon_76@1x.png │ │ │ ├── icon_76@2x.png │ │ │ └── icon_83.5@2x.png │ │ └── Contents.json │ ├── Info.plist │ ├── Localizable │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── Localizable.strings │ │ └── ja.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── Localizable.strings │ └── Settings.bundle │ │ ├── Root.plist │ │ ├── com.funzin.longweekend.latest_result.txt │ │ ├── com.funzin.longweekend.plist │ │ ├── com.funzin.longweekend │ │ ├── Google-Mobile-Ads-SDK.plist │ │ ├── GoogleAppMeasurement.plist │ │ ├── GoogleDataTransport.plist │ │ ├── GoogleUserMessagingPlatform.plist │ │ ├── GoogleUtilities.plist │ │ ├── Keys.plist │ │ ├── PromisesObjC.plist │ │ ├── SwiftyUserDefaults.plist │ │ ├── abseil-cpp-SwiftPM.plist │ │ ├── boringssl-SwiftPM.plist │ │ ├── firebase-ios-sdk.plist │ │ ├── grpc-SwiftPM.plist │ │ ├── gtm-session-fetcher.plist │ │ ├── holiday_jp-swift.plist │ │ ├── leveldb.plist │ │ ├── nanopb.plist │ │ ├── promises.plist │ │ └── swift-protobuf.plist │ │ ├── en.lproj │ │ └── Root.strings │ │ └── ja.lproj │ │ └── Root.strings └── Source │ ├── AppDelegate.swift │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── Common │ ├── DateManager.swift │ ├── LongWeekendCalculator.swift │ └── UserDefaultsKey.swift │ ├── Enum │ ├── NationalHolidaySegment.swift │ └── SortCriteriaSegment.swift │ ├── Extension │ └── DateExtension.swift │ ├── Generated │ └── Strings.swift │ ├── Model │ └── LongWeekendModel.swift │ ├── SceneDelegate.swift │ └── View │ ├── AdBannerView.swift │ ├── LongWeekend │ ├── LongWeekendList.swift │ ├── LongWeekendListViewModel.swift │ └── LongWeekendRow.swift │ └── Setting │ ├── SettingView.swift │ └── SettingViewModel.swift ├── LongWeekendTests ├── Common │ └── TestCase.swift ├── Info.plist └── Tests │ ├── DateManagerTests.swift │ ├── LongWeekendCalculatorTests.swift │ ├── LongWeekendListViewModelTests.swift │ └── SettingViewModelTests.swift ├── Makefile ├── Podfile ├── Podfile.lock ├── README.md ├── Resource ├── Design │ ├── banner.png │ ├── design.sketch │ └── icon.png ├── GIF │ └── demo.gif └── Image │ ├── darkmode │ ├── en │ │ ├── main.png │ │ └── setting.png │ └── jp │ │ ├── main.png │ │ └── setting.png │ └── default │ ├── en │ ├── main.png │ └── setting.png │ └── jp │ ├── main.png │ └── setting.png ├── codecov.yml ├── fastlane └── Fastfile ├── project.yml ├── renovate.json └── swiftgen.yml /.bundle/config: -------------------------------------------------------------------------------- 1 | --- 2 | BUNDLE_PATH: "vendor/bundle" 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### https://raw.github.com/github/gitignore/c1faae44aebe587bbb90d60e21ca928e0116e8d4/Swift.gitignore 2 | 3 | # Xcode 4 | # 5 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 6 | 7 | ## Build generated 8 | DerivedData/ 9 | 10 | ## Various settings 11 | *.pbxuser 12 | !default.pbxuser 13 | *.mode1v3 14 | !default.mode1v3 15 | *.mode2v3 16 | !default.mode2v3 17 | *.perspectivev3 18 | !default.perspectivev3 19 | xcuserdata/ 20 | 21 | ## Other 22 | *.moved-aside 23 | *.xccheckout 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | *.dSYM.zip 30 | *.dSYM 31 | 32 | ## Playgrounds 33 | timeline.xctimeline 34 | playground.xcworkspace 35 | 36 | # Swift Package Manager 37 | # 38 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 39 | # Packages/ 40 | # Package.pins 41 | # Package.resolved 42 | .build/ 43 | 44 | # CocoaPods 45 | # 46 | # We recommend against adding the Pods directory to your .gitignore. However 47 | # you should judge for yourself, the pros and cons are mentioned at: 48 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 49 | # 50 | # Pods/ 51 | # 52 | # Add this line if you want to avoid checking in source code from the Xcode workspace 53 | # *.xcworkspace 54 | 55 | # Carthage 56 | # 57 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 58 | Carthage/Checkouts 59 | 60 | # Carthage/Build 61 | 62 | # Accio dependency management 63 | Dependencies/ 64 | .accio/ 65 | 66 | # fastlane 67 | # 68 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 69 | # screenshots whenever they are needed. 70 | # For more information about the recommended setup visit: 71 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 72 | 73 | fastlane/report.xml 74 | fastlane/Preview.html 75 | fastlane/screenshots/**/*.png 76 | fastlane/test_output 77 | 78 | # Code Injection 79 | # 80 | # After new code Injection tools there's a generated folder /iOSInjectionProject 81 | # https://github.com/johnno1962/injectionforxcode 82 | 83 | iOSInjectionProject/ 84 | 85 | 86 | ### https://raw.github.com/github/gitignore/c1faae44aebe587bbb90d60e21ca928e0116e8d4/Global/Xcode.gitignore 87 | 88 | # Xcode 89 | # 90 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 91 | 92 | ## User settings 93 | xcuserdata/ 94 | 95 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 96 | *.xcscmblueprint 97 | *.xccheckout 98 | 99 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 100 | DerivedData/ 101 | *.moved-aside 102 | *.pbxuser 103 | !default.pbxuser 104 | *.mode1v3 105 | !default.mode1v3 106 | *.mode2v3 107 | !default.mode2v3 108 | *.perspectivev3 109 | !default.perspectivev3 110 | 111 | ## Xcode Patch 112 | *.xcodeproj/* 113 | !*.xcodeproj/project.pbxproj 114 | !*.xcodeproj/xcshareddata/ 115 | !*.xcworkspace/contents.xcworkspacedata 116 | /*.gcno 117 | 118 | 119 | ## Use xcodegen 120 | LongWeekend.xcworkspace 121 | LongWeekend.xcodeproj 122 | 123 | vendor/ 124 | GoogleService-Info.plist 125 | Pods/ 126 | Carthage/ 127 | .env 128 | fastlane/Appfile 129 | fastlane/README.md 130 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.6.5 2 | -------------------------------------------------------------------------------- /.swiftformat: -------------------------------------------------------------------------------- 1 | # disable 2 | --disable wrapMultilineStatementBraces 3 | 4 | # format options 5 | --stripunusedargs closure-only 6 | --self init-only 7 | --commas inline 8 | --extensionacl on-declarations 9 | 10 | # file options 11 | --exclude \ 12 | Pods,\ 13 | CLI,\ 14 | .spm 15 | 16 | # version 17 | --swiftversion 5 18 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - force_cast 3 | - function_body_length 4 | - identifier_name 5 | - large_tuple 6 | - nesting 7 | - multiple_closures_with_trailing_closure 8 | 9 | included: 10 | - LongWeekend 11 | - LongWeekendTests 12 | 13 | excluded: 14 | - Pods/ 15 | - Carthage/ 16 | - vender/ 17 | 18 | line_length: 300 19 | 20 | cyclomatic_complexity: 15 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | cache: 3 | bundler: true 4 | cocoapods: true 5 | directories: 6 | - CLI 7 | osx_image: xcode12.5 8 | xcode_workspace: LongWeekend.xcworkspace 9 | xcode_scheme: LongWeekend 10 | xcode_sdk: iphonesimulator 11 | before_install: 12 | - brew update 13 | - make bootstrap 14 | before_script: 15 | - set -o pipefail 16 | script: 17 | - xcodebuild -workspace LongWeekend.xcworkspace -scheme LongWeekend -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=14.5,name=iPhone 12 Pro' test 18 | after_success: 19 | - bash <(curl -s https://codecov.io/bash) 20 | notifications: 21 | email: false 22 | -------------------------------------------------------------------------------- /CLI/_license_plist/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "APIKit", 6 | "repositoryURL": "https://github.com/ishkawa/APIKit.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "c8f5320d84c4c34c0fd965da3c7957819a1ccdd4", 10 | "version": "5.2.0" 11 | } 12 | }, 13 | { 14 | "package": "HeliumLogger", 15 | "repositoryURL": "https://github.com/Kitura/HeliumLogger.git", 16 | "state": { 17 | "branch": null, 18 | "revision": "55fd2f0b70793017acee853c53cfcf8da0bd8d8d", 19 | "version": "1.9.200" 20 | } 21 | }, 22 | { 23 | "package": "LicensePlist", 24 | "repositoryURL": "https://github.com/mono0926/LicensePlist", 25 | "state": { 26 | "branch": null, 27 | "revision": "38db6f435cc77513a528780d14b1b29daf042439", 28 | "version": "3.13.0" 29 | } 30 | }, 31 | { 32 | "package": "LoggerAPI", 33 | "repositoryURL": "https://github.com/Kitura/LoggerAPI.git", 34 | "state": { 35 | "branch": null, 36 | "revision": "e82d34eab3f0b05391082b11ea07d3b70d2f65bb", 37 | "version": "1.9.200" 38 | } 39 | }, 40 | { 41 | "package": "swift-argument-parser", 42 | "repositoryURL": "https://github.com/apple/swift-argument-parser.git", 43 | "state": { 44 | "branch": null, 45 | "revision": "986d191f94cec88f6350056da59c2e59e83d1229", 46 | "version": "0.4.3" 47 | } 48 | }, 49 | { 50 | "package": "HTMLEntities", 51 | "repositoryURL": "https://github.com/Kitura/swift-html-entities.git", 52 | "state": { 53 | "branch": null, 54 | "revision": "2b14531d0c36dbb7c1c45a4d38db9c2e7898a307", 55 | "version": "3.0.200" 56 | } 57 | }, 58 | { 59 | "package": "swift-log", 60 | "repositoryURL": "https://github.com/apple/swift-log.git", 61 | "state": { 62 | "branch": null, 63 | "revision": "5d66f7ba25daf4f94100e7022febf3c75e37a6c7", 64 | "version": "1.4.2" 65 | } 66 | }, 67 | { 68 | "package": "Yaml", 69 | "repositoryURL": "https://github.com/behrang/YamlSwift.git", 70 | "state": { 71 | "branch": null, 72 | "revision": "287f5cab7da0d92eb947b5fd8151b203ae04a9a3", 73 | "version": "3.4.4" 74 | } 75 | } 76 | ] 77 | }, 78 | "version": 1 79 | } 80 | -------------------------------------------------------------------------------- /CLI/_license_plist/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.4 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "_licesnse_plist", 7 | dependencies: [ 8 | .package(url: "https://github.com/mono0926/LicensePlist", .exact("3.13.0")) 9 | ] 10 | ) 11 | -------------------------------------------------------------------------------- /CLI/_swiftformat/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "SwiftFormat", 6 | "repositoryURL": "https://github.com/nicklockwood/SwiftFormat", 7 | "state": { 8 | "branch": null, 9 | "revision": "872e7034f54aeee3f20acf790ecc13e1383f7360", 10 | "version": "0.48.4" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /CLI/_swiftformat/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.4 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "_swiftformat", 7 | dependencies: [ 8 | .package(url: "https://github.com/nicklockwood/SwiftFormat", .exact("0.48.4")) 9 | ] 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /CLI/_swiftgen/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "Commander", 6 | "repositoryURL": "https://github.com/kylef/Commander.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "4b6133c3071d521489a80c38fb92d7983f19d438", 10 | "version": "0.9.1" 11 | } 12 | }, 13 | { 14 | "package": "Kanna", 15 | "repositoryURL": "https://github.com/tid-kijyun/Kanna.git", 16 | "state": { 17 | "branch": null, 18 | "revision": "c657fb9f5827ef138068215c76ad0bb62bbc92da", 19 | "version": "5.2.4" 20 | } 21 | }, 22 | { 23 | "package": "PathKit", 24 | "repositoryURL": "https://github.com/kylef/PathKit.git", 25 | "state": { 26 | "branch": null, 27 | "revision": "e2f5be30e4c8f531c9c1e8765aa7b71c0a45d7a0", 28 | "version": "0.9.2" 29 | } 30 | }, 31 | { 32 | "package": "Spectre", 33 | "repositoryURL": "https://github.com/kylef/Spectre.git", 34 | "state": { 35 | "branch": null, 36 | "revision": "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53", 37 | "version": "0.9.2" 38 | } 39 | }, 40 | { 41 | "package": "Stencil", 42 | "repositoryURL": "https://github.com/kylef/Stencil.git", 43 | "state": { 44 | "branch": null, 45 | "revision": "0e9a78d6584e3812cd9c09494d5c7b483e8f533c", 46 | "version": "0.13.1" 47 | } 48 | }, 49 | { 50 | "package": "StencilSwiftKit", 51 | "repositoryURL": "https://github.com/SwiftGen/StencilSwiftKit.git", 52 | "state": { 53 | "branch": null, 54 | "revision": "dbf02bd6afe71b65ead2bd250aaf974abc688094", 55 | "version": "2.7.2" 56 | } 57 | }, 58 | { 59 | "package": "SwiftGen", 60 | "repositoryURL": "https://github.com/SwiftGen/SwiftGen", 61 | "state": { 62 | "branch": null, 63 | "revision": "0c67b63f43814a8d7eb71f685f0bf504b03223f3", 64 | "version": "6.4.0" 65 | } 66 | }, 67 | { 68 | "package": "Yams", 69 | "repositoryURL": "https://github.com/jpsim/Yams.git", 70 | "state": { 71 | "branch": null, 72 | "revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa", 73 | "version": "4.0.6" 74 | } 75 | } 76 | ] 77 | }, 78 | "version": 1 79 | } 80 | -------------------------------------------------------------------------------- /CLI/_swiftgen/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.4 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "_swiftgen", 7 | dependencies: [ 8 | .package(url: "https://github.com/SwiftGen/SwiftGen", .exact("6.4.0")) 9 | ] 10 | ) 11 | -------------------------------------------------------------------------------- /CLI/_swiftlint/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "SourceKitten", 6 | "repositoryURL": "https://github.com/jpsim/SourceKitten.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "7f4be006fe73211b0fd9666c73dc2f2303ffa756", 10 | "version": "0.31.0" 11 | } 12 | }, 13 | { 14 | "package": "swift-argument-parser", 15 | "repositoryURL": "https://github.com/apple/swift-argument-parser.git", 16 | "state": { 17 | "branch": null, 18 | "revision": "9564d61b08a5335ae0a36f789a7d71493eacadfc", 19 | "version": "0.3.2" 20 | } 21 | }, 22 | { 23 | "package": "SwiftLint", 24 | "repositoryURL": "https://github.com/realm/SwiftLint", 25 | "state": { 26 | "branch": null, 27 | "revision": "180d94132758dd183124ab1e63d6aa8e10023ec2", 28 | "version": "0.43.1" 29 | } 30 | }, 31 | { 32 | "package": "SwiftyTextTable", 33 | "repositoryURL": "https://github.com/scottrhoyt/SwiftyTextTable.git", 34 | "state": { 35 | "branch": null, 36 | "revision": "c6df6cf533d120716bff38f8ff9885e1ce2a4ac3", 37 | "version": "0.9.0" 38 | } 39 | }, 40 | { 41 | "package": "SWXMLHash", 42 | "repositoryURL": "https://github.com/drmohundro/SWXMLHash.git", 43 | "state": { 44 | "branch": null, 45 | "revision": "9183170d20857753d4f331b0ca63f73c60764bf3", 46 | "version": "5.0.2" 47 | } 48 | }, 49 | { 50 | "package": "Yams", 51 | "repositoryURL": "https://github.com/jpsim/Yams.git", 52 | "state": { 53 | "branch": null, 54 | "revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa", 55 | "version": "4.0.6" 56 | } 57 | } 58 | ] 59 | }, 60 | "version": 1 61 | } 62 | -------------------------------------------------------------------------------- /CLI/_swiftlint/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.4 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "_swiftlint", 7 | dependencies: [ 8 | .package(url: "https://github.com/realm/SwiftLint", .exact("0.43.1")) 9 | ] 10 | ) 11 | -------------------------------------------------------------------------------- /CLI/_xcodegen/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "AEXML", 6 | "repositoryURL": "https://github.com/tadija/AEXML", 7 | "state": { 8 | "branch": null, 9 | "revision": "8623e73b193386909566a9ca20203e33a09af142", 10 | "version": "4.5.0" 11 | } 12 | }, 13 | { 14 | "package": "GraphViz", 15 | "repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git", 16 | "state": { 17 | "branch": null, 18 | "revision": "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", 19 | "version": "0.2.0" 20 | } 21 | }, 22 | { 23 | "package": "JSONUtilities", 24 | "repositoryURL": "https://github.com/yonaskolb/JSONUtilities.git", 25 | "state": { 26 | "branch": null, 27 | "revision": "128d2ffc22467f69569ef8ff971683e2393191a0", 28 | "version": "4.2.0" 29 | } 30 | }, 31 | { 32 | "package": "PathKit", 33 | "repositoryURL": "https://github.com/kylef/PathKit.git", 34 | "state": { 35 | "branch": null, 36 | "revision": "73f8e9dca9b7a3078cb79128217dc8f2e585a511", 37 | "version": "1.0.0" 38 | } 39 | }, 40 | { 41 | "package": "Rainbow", 42 | "repositoryURL": "https://github.com/onevcat/Rainbow.git", 43 | "state": { 44 | "branch": null, 45 | "revision": "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", 46 | "version": "3.2.0" 47 | } 48 | }, 49 | { 50 | "package": "Spectre", 51 | "repositoryURL": "https://github.com/kylef/Spectre.git", 52 | "state": { 53 | "branch": null, 54 | "revision": "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53", 55 | "version": "0.9.2" 56 | } 57 | }, 58 | { 59 | "package": "SwiftCLI", 60 | "repositoryURL": "https://github.com/jakeheis/SwiftCLI.git", 61 | "state": { 62 | "branch": null, 63 | "revision": "2816678bcc37f4833d32abeddbdf5e757fa891d8", 64 | "version": "6.0.2" 65 | } 66 | }, 67 | { 68 | "package": "Version", 69 | "repositoryURL": "https://github.com/mxcl/Version", 70 | "state": { 71 | "branch": null, 72 | "revision": "1fe824b80d89201652e7eca7c9252269a1d85e25", 73 | "version": "2.0.1" 74 | } 75 | }, 76 | { 77 | "package": "XcodeGen", 78 | "repositoryURL": "https://github.com/yonaskolb/xcodegen", 79 | "state": { 80 | "branch": null, 81 | "revision": "39ee9c2981ae6f63c9081130e2475c318ca01935", 82 | "version": "2.23.1" 83 | } 84 | }, 85 | { 86 | "package": "XcodeProj", 87 | "repositoryURL": "https://github.com/tuist/XcodeProj.git", 88 | "state": { 89 | "branch": null, 90 | "revision": "45e349e1c4e4da1a85a7b9392b737acde2e2f2a8", 91 | "version": "7.23.0" 92 | } 93 | }, 94 | { 95 | "package": "Yams", 96 | "repositoryURL": "https://github.com/jpsim/Yams.git", 97 | "state": { 98 | "branch": null, 99 | "revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa", 100 | "version": "4.0.6" 101 | } 102 | } 103 | ] 104 | }, 105 | "version": 1 106 | } 107 | -------------------------------------------------------------------------------- /CLI/_xcodegen/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.4 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "_xcodegen", 7 | dependencies: [ 8 | .package(url: "https://github.com/yonaskolb/xcodegen", .exact("2.23.1")) 9 | ] 10 | ) 11 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem 'cocoapods', '1.10.2' 3 | gem 'cocoapods-keys', '2.2.1' 4 | gem "fastlane", '2.191.0' 5 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.3) 5 | RubyInline (3.12.5) 6 | ZenTest (~> 4.3) 7 | ZenTest (4.12.0) 8 | activesupport (5.2.6) 9 | concurrent-ruby (~> 1.0, >= 1.0.2) 10 | i18n (>= 0.7, < 2) 11 | minitest (~> 5.1) 12 | tzinfo (~> 1.1) 13 | addressable (2.8.0) 14 | public_suffix (>= 2.0.2, < 5.0) 15 | algoliasearch (1.27.5) 16 | httpclient (~> 2.8, >= 2.8.3) 17 | json (>= 1.5.1) 18 | artifactory (3.0.15) 19 | atomos (0.1.3) 20 | aws-eventstream (1.1.1) 21 | aws-partitions (1.484.0) 22 | aws-sdk-core (3.119.0) 23 | aws-eventstream (~> 1, >= 1.0.2) 24 | aws-partitions (~> 1, >= 1.239.0) 25 | aws-sigv4 (~> 1.1) 26 | jmespath (~> 1.0) 27 | aws-sdk-kms (1.46.0) 28 | aws-sdk-core (~> 3, >= 3.119.0) 29 | aws-sigv4 (~> 1.1) 30 | aws-sdk-s3 (1.98.0) 31 | aws-sdk-core (~> 3, >= 3.119.0) 32 | aws-sdk-kms (~> 1) 33 | aws-sigv4 (~> 1.1) 34 | aws-sigv4 (1.2.4) 35 | aws-eventstream (~> 1, >= 1.0.2) 36 | babosa (1.0.4) 37 | claide (1.0.3) 38 | cocoapods (1.10.2) 39 | addressable (~> 2.6) 40 | claide (>= 1.0.2, < 2.0) 41 | cocoapods-core (= 1.10.2) 42 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 43 | cocoapods-downloader (>= 1.4.0, < 2.0) 44 | cocoapods-plugins (>= 1.0.0, < 2.0) 45 | cocoapods-search (>= 1.0.0, < 2.0) 46 | cocoapods-trunk (>= 1.4.0, < 2.0) 47 | cocoapods-try (>= 1.1.0, < 2.0) 48 | colored2 (~> 3.1) 49 | escape (~> 0.0.4) 50 | fourflusher (>= 2.3.0, < 3.0) 51 | gh_inspector (~> 1.0) 52 | molinillo (~> 0.6.6) 53 | nap (~> 1.0) 54 | ruby-macho (~> 1.4) 55 | xcodeproj (>= 1.19.0, < 2.0) 56 | cocoapods-core (1.10.2) 57 | activesupport (> 5.0, < 6) 58 | addressable (~> 2.6) 59 | algoliasearch (~> 1.0) 60 | concurrent-ruby (~> 1.1) 61 | fuzzy_match (~> 2.0.4) 62 | nap (~> 1.0) 63 | netrc (~> 0.11) 64 | public_suffix 65 | typhoeus (~> 1.0) 66 | cocoapods-deintegrate (1.0.4) 67 | cocoapods-downloader (1.4.0) 68 | cocoapods-keys (2.2.1) 69 | dotenv 70 | osx_keychain 71 | cocoapods-plugins (1.0.0) 72 | nap 73 | cocoapods-search (1.0.0) 74 | cocoapods-trunk (1.5.0) 75 | nap (>= 0.8, < 2.0) 76 | netrc (~> 0.11) 77 | cocoapods-try (1.2.0) 78 | colored (1.2) 79 | colored2 (3.1.2) 80 | commander (4.6.0) 81 | highline (~> 2.0.0) 82 | concurrent-ruby (1.1.9) 83 | declarative (0.0.20) 84 | digest-crc (0.6.4) 85 | rake (>= 12.0.0, < 14.0.0) 86 | domain_name (0.5.20190701) 87 | unf (>= 0.0.5, < 1.0.0) 88 | dotenv (2.7.6) 89 | emoji_regex (3.2.2) 90 | escape (0.0.4) 91 | ethon (0.14.0) 92 | ffi (>= 1.15.0) 93 | excon (0.85.0) 94 | faraday (1.6.0) 95 | faraday-em_http (~> 1.0) 96 | faraday-em_synchrony (~> 1.0) 97 | faraday-excon (~> 1.1) 98 | faraday-httpclient (~> 1.0.1) 99 | faraday-net_http (~> 1.0) 100 | faraday-net_http_persistent (~> 1.1) 101 | faraday-patron (~> 1.0) 102 | faraday-rack (~> 1.0) 103 | multipart-post (>= 1.2, < 3) 104 | ruby2_keywords (>= 0.0.4) 105 | faraday-cookie_jar (0.0.7) 106 | faraday (>= 0.8.0) 107 | http-cookie (~> 1.0.0) 108 | faraday-em_http (1.0.0) 109 | faraday-em_synchrony (1.0.0) 110 | faraday-excon (1.1.0) 111 | faraday-httpclient (1.0.1) 112 | faraday-net_http (1.0.1) 113 | faraday-net_http_persistent (1.2.0) 114 | faraday-patron (1.0.0) 115 | faraday-rack (1.0.0) 116 | faraday_middleware (1.1.0) 117 | faraday (~> 1.0) 118 | fastimage (2.2.4) 119 | fastlane (2.191.0) 120 | CFPropertyList (>= 2.3, < 4.0.0) 121 | addressable (>= 2.8, < 3.0.0) 122 | artifactory (~> 3.0) 123 | aws-sdk-s3 (~> 1.0) 124 | babosa (>= 1.0.3, < 2.0.0) 125 | bundler (>= 1.12.0, < 3.0.0) 126 | colored 127 | commander (~> 4.6) 128 | dotenv (>= 2.1.1, < 3.0.0) 129 | emoji_regex (>= 0.1, < 4.0) 130 | excon (>= 0.71.0, < 1.0.0) 131 | faraday (~> 1.0) 132 | faraday-cookie_jar (~> 0.0.6) 133 | faraday_middleware (~> 1.0) 134 | fastimage (>= 2.1.0, < 3.0.0) 135 | gh_inspector (>= 1.1.2, < 2.0.0) 136 | google-apis-androidpublisher_v3 (~> 0.3) 137 | google-apis-playcustomapp_v1 (~> 0.1) 138 | google-cloud-storage (~> 1.31) 139 | highline (~> 2.0) 140 | json (< 3.0.0) 141 | jwt (>= 2.1.0, < 3) 142 | mini_magick (>= 4.9.4, < 5.0.0) 143 | multipart-post (~> 2.0.0) 144 | naturally (~> 2.2) 145 | plist (>= 3.1.0, < 4.0.0) 146 | rubyzip (>= 2.0.0, < 3.0.0) 147 | security (= 0.1.3) 148 | simctl (~> 1.6.3) 149 | terminal-notifier (>= 2.0.0, < 3.0.0) 150 | terminal-table (>= 1.4.5, < 2.0.0) 151 | tty-screen (>= 0.6.3, < 1.0.0) 152 | tty-spinner (>= 0.8.0, < 1.0.0) 153 | word_wrap (~> 1.0.0) 154 | xcodeproj (>= 1.13.0, < 2.0.0) 155 | xcpretty (~> 0.3.0) 156 | xcpretty-travis-formatter (>= 0.0.3) 157 | ffi (1.15.3) 158 | fourflusher (2.3.1) 159 | fuzzy_match (2.0.4) 160 | gh_inspector (1.1.3) 161 | google-apis-androidpublisher_v3 (0.10.0) 162 | google-apis-core (>= 0.4, < 2.a) 163 | google-apis-core (0.4.1) 164 | addressable (~> 2.5, >= 2.5.1) 165 | googleauth (>= 0.16.2, < 2.a) 166 | httpclient (>= 2.8.1, < 3.a) 167 | mini_mime (~> 1.0) 168 | representable (~> 3.0) 169 | retriable (>= 2.0, < 4.a) 170 | rexml 171 | webrick 172 | google-apis-iamcredentials_v1 (0.6.0) 173 | google-apis-core (>= 0.4, < 2.a) 174 | google-apis-playcustomapp_v1 (0.5.0) 175 | google-apis-core (>= 0.4, < 2.a) 176 | google-apis-storage_v1 (0.6.0) 177 | google-apis-core (>= 0.4, < 2.a) 178 | google-cloud-core (1.6.0) 179 | google-cloud-env (~> 1.0) 180 | google-cloud-errors (~> 1.0) 181 | google-cloud-env (1.5.0) 182 | faraday (>= 0.17.3, < 2.0) 183 | google-cloud-errors (1.1.0) 184 | google-cloud-storage (1.34.1) 185 | addressable (~> 2.5) 186 | digest-crc (~> 0.4) 187 | google-apis-iamcredentials_v1 (~> 0.1) 188 | google-apis-storage_v1 (~> 0.1) 189 | google-cloud-core (~> 1.6) 190 | googleauth (>= 0.16.2, < 2.a) 191 | mini_mime (~> 1.0) 192 | googleauth (0.17.0) 193 | faraday (>= 0.17.3, < 2.0) 194 | jwt (>= 1.4, < 3.0) 195 | memoist (~> 0.16) 196 | multi_json (~> 1.11) 197 | os (>= 0.9, < 2.0) 198 | signet (~> 0.14) 199 | highline (2.0.3) 200 | http-cookie (1.0.4) 201 | domain_name (~> 0.5) 202 | httpclient (2.8.3) 203 | i18n (1.8.10) 204 | concurrent-ruby (~> 1.0) 205 | jmespath (1.4.0) 206 | json (2.5.1) 207 | jwt (2.2.3) 208 | memoist (0.16.2) 209 | mini_magick (4.11.0) 210 | mini_mime (1.1.0) 211 | minitest (5.14.4) 212 | molinillo (0.6.6) 213 | multi_json (1.15.0) 214 | multipart-post (2.0.0) 215 | nanaimo (0.3.0) 216 | nap (1.1.0) 217 | naturally (2.2.1) 218 | netrc (0.11.0) 219 | os (1.1.1) 220 | osx_keychain (1.0.2) 221 | RubyInline (~> 3) 222 | plist (3.6.0) 223 | public_suffix (4.0.6) 224 | rake (13.0.6) 225 | representable (3.1.1) 226 | declarative (< 0.1.0) 227 | trailblazer-option (>= 0.1.1, < 0.2.0) 228 | uber (< 0.2.0) 229 | retriable (3.1.2) 230 | rexml (3.2.5) 231 | rouge (2.0.7) 232 | ruby-macho (1.4.0) 233 | ruby2_keywords (0.0.5) 234 | rubyzip (2.3.2) 235 | security (0.1.3) 236 | signet (0.15.0) 237 | addressable (~> 2.3) 238 | faraday (>= 0.17.3, < 2.0) 239 | jwt (>= 1.5, < 3.0) 240 | multi_json (~> 1.10) 241 | simctl (1.6.8) 242 | CFPropertyList 243 | naturally 244 | terminal-notifier (2.0.0) 245 | terminal-table (1.8.0) 246 | unicode-display_width (~> 1.1, >= 1.1.1) 247 | thread_safe (0.3.6) 248 | trailblazer-option (0.1.1) 249 | tty-cursor (0.7.1) 250 | tty-screen (0.8.1) 251 | tty-spinner (0.9.3) 252 | tty-cursor (~> 0.7) 253 | typhoeus (1.4.0) 254 | ethon (>= 0.9.0) 255 | tzinfo (1.2.9) 256 | thread_safe (~> 0.1) 257 | uber (0.1.0) 258 | unf (0.1.4) 259 | unf_ext 260 | unf_ext (0.0.7.7) 261 | unicode-display_width (1.7.0) 262 | webrick (1.7.0) 263 | word_wrap (1.0.0) 264 | xcodeproj (1.20.0) 265 | CFPropertyList (>= 2.3.3, < 4.0) 266 | atomos (~> 0.1.3) 267 | claide (>= 1.0.2, < 2.0) 268 | colored2 (~> 3.1) 269 | nanaimo (~> 0.3.0) 270 | rexml (~> 3.2.4) 271 | xcpretty (0.3.0) 272 | rouge (~> 2.0.7) 273 | xcpretty-travis-formatter (1.0.1) 274 | xcpretty (~> 0.2, >= 0.0.7) 275 | 276 | PLATFORMS 277 | ruby 278 | 279 | DEPENDENCIES 280 | cocoapods (= 1.10.2) 281 | cocoapods-keys (= 2.2.1) 282 | fastlane (= 2.191.0) 283 | 284 | BUNDLED WITH 285 | 2.2.15 286 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Fumito Nakazawa 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LongWeekend/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon_20@2x.png", 5 | "idiom" : "iphone", 6 | "scale" : "2x", 7 | "size" : "20x20" 8 | }, 9 | { 10 | "filename" : "icon_20@3x.png", 11 | "idiom" : "iphone", 12 | "scale" : "3x", 13 | "size" : "20x20" 14 | }, 15 | { 16 | "filename" : "icon_29@2x.png", 17 | "idiom" : "iphone", 18 | "scale" : "2x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "icon_29@3x.png", 23 | "idiom" : "iphone", 24 | "scale" : "3x", 25 | "size" : "29x29" 26 | }, 27 | { 28 | "filename" : "icon_40@2x.png", 29 | "idiom" : "iphone", 30 | "scale" : "2x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "filename" : "icon_40@3x.png", 35 | "idiom" : "iphone", 36 | "scale" : "3x", 37 | "size" : "40x40" 38 | }, 39 | { 40 | "filename" : "icon_60@2x.png", 41 | "idiom" : "iphone", 42 | "scale" : "2x", 43 | "size" : "60x60" 44 | }, 45 | { 46 | "filename" : "icon_60@3x.png", 47 | "idiom" : "iphone", 48 | "scale" : "3x", 49 | "size" : "60x60" 50 | }, 51 | { 52 | "filename" : "icon_20@1x.png", 53 | "idiom" : "ipad", 54 | "scale" : "1x", 55 | "size" : "20x20" 56 | }, 57 | { 58 | "filename" : "icon_20@2x.png", 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "20x20" 62 | }, 63 | { 64 | "filename" : "icon_29@1x.png", 65 | "idiom" : "ipad", 66 | "scale" : "1x", 67 | "size" : "29x29" 68 | }, 69 | { 70 | "filename" : "icon_29@2x.png", 71 | "idiom" : "ipad", 72 | "scale" : "2x", 73 | "size" : "29x29" 74 | }, 75 | { 76 | "filename" : "icon_40@1x.png", 77 | "idiom" : "ipad", 78 | "scale" : "1x", 79 | "size" : "40x40" 80 | }, 81 | { 82 | "filename" : "icon_40@2x.png", 83 | "idiom" : "ipad", 84 | "scale" : "2x", 85 | "size" : "40x40" 86 | }, 87 | { 88 | "filename" : "icon_76@1x.png", 89 | "idiom" : "ipad", 90 | "scale" : "1x", 91 | "size" : "76x76" 92 | }, 93 | { 94 | "filename" : "icon_76@2x.png", 95 | "idiom" : "ipad", 96 | "scale" : "2x", 97 | "size" : "76x76" 98 | }, 99 | { 100 | "filename" : "icon_83.5@2x.png", 101 | "idiom" : "ipad", 102 | "scale" : "2x", 103 | "size" : "83.5x83.5" 104 | }, 105 | { 106 | "filename" : "icon_1024@1x.png", 107 | "idiom" : "ios-marketing", 108 | "scale" : "1x", 109 | "size" : "1024x1024" 110 | } 111 | ], 112 | "info" : { 113 | "author" : "xcode", 114 | "version" : 1 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_1024@1x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_20@1x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_20@2x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_20@3x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_29@1x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_29@2x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_29@3x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_40@1x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_40@2x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_40@3x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_60@2x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_60@3x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_76@1x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_76@2x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/LongWeekend/Resource/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png -------------------------------------------------------------------------------- /LongWeekend/Resource/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | 2 21 | GADApplicationIdentifier 22 | ca-app-pub-3940256099942544~1458002511 23 | GADIsAdManagerApp 24 | 25 | LSRequiresIPhoneOS 26 | 27 | NSUserTrackingUsageDescription 28 | Used to display appropriate ads. 29 | UIApplicationSceneManifest 30 | 31 | UIApplicationSupportsMultipleScenes 32 | 33 | UISceneConfigurations 34 | 35 | UIWindowSceneSessionRoleApplication 36 | 37 | 38 | UISceneConfigurationName 39 | Default Configuration 40 | UISceneDelegateClassName 41 | $(PRODUCT_MODULE_NAME).SceneDelegate 42 | 43 | 44 | 45 | 46 | UILaunchStoryboardName 47 | LaunchScreen 48 | UIRequiredDeviceCapabilities 49 | 50 | armv7 51 | 52 | UISupportedInterfaceOrientations 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationLandscapeLeft 56 | UIInterfaceOrientationLandscapeRight 57 | 58 | UISupportedInterfaceOrientations~ipad 59 | 60 | UIInterfaceOrientationPortrait 61 | UIInterfaceOrientationPortraitUpsideDown 62 | UIInterfaceOrientationLandscapeLeft 63 | UIInterfaceOrientationLandscapeRight 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Localizable/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* 2 | InfoPlist.strings 3 | LongWeekend 4 | 5 | Created by funzin on 2019/10/27. 6 | 7 | */ 8 | 9 | "CFBundleDisplayName" = "LongWeekend"; 10 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Localizable/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | LongWeekend 4 | 5 | Created by funzin on 2019/10/26. 6 | 7 | */ 8 | 9 | "longWeekend" = "LongWeekend"; 10 | "days" = "Days"; 11 | "holidayPeriod" = "Holiday period"; 12 | "paidDays" = "Paid days"; 13 | "numberOfPaidDays" = "Number of paid days"; 14 | "minimumNumberOfHolidays" = "Minimum number of holidays"; 15 | "nationalHoliday" = "National holiday"; 16 | "unspecified" = "Unspecified"; 17 | "containsNationalHoliday" = "Contains nationalholiday"; 18 | "notContainNationalHoliday" = "Not contain nationalholiday"; 19 | "sortCriteria" = "Sort criteria"; 20 | "numberOfHolidays" = "Number of holidays"; 21 | "date" = "Date"; 22 | "fromDate" = "from"; 23 | "toDate" = "to"; 24 | "setting" = "Setting"; 25 | "save" = "Save"; 26 | "savedSetting" = "Saved!"; 27 | "close" = "Close"; 28 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Localizable/ja.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* 2 | InfoPlist.strings 3 | LongWeekend 4 | 5 | Created by funzin on 2019/10/27. 6 | 7 | */ 8 | 9 | "CFBundleDisplayName" = "連休チェッカー"; 10 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Localizable/ja.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | LongWeekend 4 | 5 | Created by funzin on 2019/10/26. 6 | 7 | */ 8 | 9 | "longWeekend" = "連休"; 10 | "days" = "日間"; 11 | "holidayPeriod" = "休日期間"; 12 | "paidDays" = "有給・代休使用日"; 13 | "numberOfPaidDays" = "有給・代休消化日数"; 14 | "minimumNumberOfHolidays" = "最低休日数"; 15 | "nationalHoliday" = "祝日"; 16 | "unspecified" = "指定なし"; 17 | "containsNationalHoliday" = "祝日を含む"; 18 | "notContainNationalHoliday" = "祝日を含まない"; 19 | "sortCriteria" = "並び替え基準"; 20 | "numberOfHolidays" = "休日数"; 21 | "date" = "日付"; 22 | "fromDate" = "from"; 23 | "toDate" = "to"; 24 | "setting" = "設定"; 25 | "save" = "Save"; 26 | "savedSetting" = "保存が完了しました。"; 27 | "close" = "閉じる"; 28 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Type 9 | PSGroupSpecifier 10 | FooterText 11 | Copyright 12 | 13 | 14 | Type 15 | PSChildPaneSpecifier 16 | Title 17 | Licenses 18 | File 19 | com.mono0926.LicensePlist 20 | 21 | 22 | Type 23 | PSTitleValueSpecifier 24 | DefaultValue 25 | 1.0.0 26 | Title 27 | Version 28 | Key 29 | sbVersion 30 | 31 | 32 | StringsTable 33 | Root 34 | 35 | 36 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend.latest_result.txt: -------------------------------------------------------------------------------- 1 | name: Google-Mobile-Ads-SDK, nameSpecified: 2 | body: Copyright 2021 Googl… 3 | version: 8.5.0 4 | 5 | name: GoogleAppMeasurement, nameSpecified: 6 | body: Copyright 2021 Googl… 7 | version: 8.1.0 8 | 9 | name: GoogleUserMessagingPlatform, nameSpecified: 10 | body: Copyright 2021 Googl… 11 | version: 2.0.0 12 | 13 | name: GoogleUtilities, nameSpecified: 14 | body: 15 | … 16 | version: 7.4.1 17 | 18 | name: Keys, nameSpecified: 19 | body: MIT LICENSE Found in… 20 | version: 1.0.1 21 | 22 | name: nanopb, nameSpecified: 23 | body: Copyright (c) 2011 P… 24 | version: 2.30908.0 25 | 26 | name: PromisesObjC, nameSpecified: 27 | body: 28 | … 29 | version: 1.2.12 30 | 31 | name: abseil-cpp-SwiftPM, nameSpecified: abseil, owner: firebase, version: 0.20200225.3 32 | 33 | name: boringssl-SwiftPM, nameSpecified: BoringSSL-GRPC, owner: firebase, version: 0.7.1 34 | 35 | name: firebase-ios-sdk, nameSpecified: Firebase, owner: firebase, version: 8.0.0 36 | 37 | name: GoogleAppMeasurement, nameSpecified: GoogleAppMeasurement, owner: google, version: 8.0.0 38 | 39 | name: GoogleDataTransport, nameSpecified: GoogleDataTransport, owner: google, version: 8.4.0 40 | 41 | name: GoogleUtilities, nameSpecified: GoogleUtilities, owner: google, version: 7.4.1 42 | 43 | name: grpc-SwiftPM, nameSpecified: gRPC, owner: firebase, version: 1.28.4 44 | 45 | name: gtm-session-fetcher, nameSpecified: GTMSessionFetcher, owner: google, version: 1.5.0 46 | 47 | name: holiday_jp-swift, nameSpecified: HolidayJp, owner: funzin, version: 48 | 49 | name: leveldb, nameSpecified: leveldb, owner: firebase, version: 1.22.2 50 | 51 | name: nanopb, nameSpecified: nanopb, owner: firebase, version: 2.30908.0 52 | 53 | name: promises, nameSpecified: Promises, owner: google, version: 1.2.12 54 | 55 | name: swift-protobuf, nameSpecified: SwiftProtobuf, owner: apple, version: 1.17.0 56 | 57 | name: SwiftyUserDefaults, nameSpecified: SwiftyUserDefaults, owner: sunshinejr, version: 5.3.0 58 | 59 | add-version-numbers: false 60 | 61 | LicensePlist Version: 3.13.0 -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Title 9 | Licenses 10 | Type 11 | PSGroupSpecifier 12 | 13 | 14 | File 15 | com.funzin.longweekend/abseil-cpp-SwiftPM 16 | Title 17 | abseil 18 | Type 19 | PSChildPaneSpecifier 20 | 21 | 22 | File 23 | com.funzin.longweekend/boringssl-SwiftPM 24 | Title 25 | BoringSSL-GRPC 26 | Type 27 | PSChildPaneSpecifier 28 | 29 | 30 | File 31 | com.funzin.longweekend/firebase-ios-sdk 32 | Title 33 | Firebase 34 | Type 35 | PSChildPaneSpecifier 36 | 37 | 38 | File 39 | com.funzin.longweekend/Google-Mobile-Ads-SDK 40 | Title 41 | Google-Mobile-Ads-SDK 42 | Type 43 | PSChildPaneSpecifier 44 | 45 | 46 | File 47 | com.funzin.longweekend/GoogleAppMeasurement 48 | Title 49 | GoogleAppMeasurement 50 | Type 51 | PSChildPaneSpecifier 52 | 53 | 54 | File 55 | com.funzin.longweekend/GoogleDataTransport 56 | Title 57 | GoogleDataTransport 58 | Type 59 | PSChildPaneSpecifier 60 | 61 | 62 | File 63 | com.funzin.longweekend/GoogleUserMessagingPlatform 64 | Title 65 | GoogleUserMessagingPlatform 66 | Type 67 | PSChildPaneSpecifier 68 | 69 | 70 | File 71 | com.funzin.longweekend/GoogleUtilities 72 | Title 73 | GoogleUtilities 74 | Type 75 | PSChildPaneSpecifier 76 | 77 | 78 | File 79 | com.funzin.longweekend/grpc-SwiftPM 80 | Title 81 | gRPC 82 | Type 83 | PSChildPaneSpecifier 84 | 85 | 86 | File 87 | com.funzin.longweekend/gtm-session-fetcher 88 | Title 89 | GTMSessionFetcher 90 | Type 91 | PSChildPaneSpecifier 92 | 93 | 94 | File 95 | com.funzin.longweekend/holiday_jp-swift 96 | Title 97 | HolidayJp 98 | Type 99 | PSChildPaneSpecifier 100 | 101 | 102 | File 103 | com.funzin.longweekend/Keys 104 | Title 105 | Keys 106 | Type 107 | PSChildPaneSpecifier 108 | 109 | 110 | File 111 | com.funzin.longweekend/leveldb 112 | Title 113 | leveldb 114 | Type 115 | PSChildPaneSpecifier 116 | 117 | 118 | File 119 | com.funzin.longweekend/nanopb 120 | Title 121 | nanopb 122 | Type 123 | PSChildPaneSpecifier 124 | 125 | 126 | File 127 | com.funzin.longweekend/promises 128 | Title 129 | Promises 130 | Type 131 | PSChildPaneSpecifier 132 | 133 | 134 | File 135 | com.funzin.longweekend/PromisesObjC 136 | Title 137 | PromisesObjC 138 | Type 139 | PSChildPaneSpecifier 140 | 141 | 142 | File 143 | com.funzin.longweekend/swift-protobuf 144 | Title 145 | SwiftProtobuf 146 | Type 147 | PSChildPaneSpecifier 148 | 149 | 150 | File 151 | com.funzin.longweekend/SwiftyUserDefaults 152 | Title 153 | SwiftyUserDefaults 154 | Type 155 | PSChildPaneSpecifier 156 | 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/Google-Mobile-Ads-SDK.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | Copyright 2021 Google 10 | Type 11 | PSGroupSpecifier 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/GoogleAppMeasurement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | 10 | Apache License 11 | Version 2.0, January 2004 12 | http://www.apache.org/licenses/ 13 | 14 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 15 | 16 | 1. Definitions. 17 | 18 | "License" shall mean the terms and conditions for use, reproduction, 19 | and distribution as defined by Sections 1 through 9 of this document. 20 | 21 | "Licensor" shall mean the copyright owner or entity authorized by 22 | the copyright owner that is granting the License. 23 | 24 | "Legal Entity" shall mean the union of the acting entity and all 25 | other entities that control, are controlled by, or are under common 26 | control with that entity. For the purposes of this definition, 27 | "control" means (i) the power, direct or indirect, to cause the 28 | direction or management of such entity, whether by contract or 29 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 30 | outstanding shares, or (iii) beneficial ownership of such entity. 31 | 32 | "You" (or "Your") shall mean an individual or Legal Entity 33 | exercising permissions granted by this License. 34 | 35 | "Source" form shall mean the preferred form for making modifications, 36 | including but not limited to software source code, documentation 37 | source, and configuration files. 38 | 39 | "Object" form shall mean any form resulting from mechanical 40 | transformation or translation of a Source form, including but 41 | not limited to compiled object code, generated documentation, 42 | and conversions to other media types. 43 | 44 | "Work" shall mean the work of authorship, whether in Source or 45 | Object form, made available under the License, as indicated by a 46 | copyright notice that is included in or attached to the work 47 | (an example is provided in the Appendix below). 48 | 49 | "Derivative Works" shall mean any work, whether in Source or Object 50 | form, that is based on (or derived from) the Work and for which the 51 | editorial revisions, annotations, elaborations, or other modifications 52 | represent, as a whole, an original work of authorship. For the purposes 53 | of this License, Derivative Works shall not include works that remain 54 | separable from, or merely link (or bind by name) to the interfaces of, 55 | the Work and Derivative Works thereof. 56 | 57 | "Contribution" shall mean any work of authorship, including 58 | the original version of the Work and any modifications or additions 59 | to that Work or Derivative Works thereof, that is intentionally 60 | submitted to Licensor for inclusion in the Work by the copyright owner 61 | or by an individual or Legal Entity authorized to submit on behalf of 62 | the copyright owner. For the purposes of this definition, "submitted" 63 | means any form of electronic, verbal, or written communication sent 64 | to the Licensor or its representatives, including but not limited to 65 | communication on electronic mailing lists, source code control systems, 66 | and issue tracking systems that are managed by, or on behalf of, the 67 | Licensor for the purpose of discussing and improving the Work, but 68 | excluding communication that is conspicuously marked or otherwise 69 | designated in writing by the copyright owner as "Not a Contribution." 70 | 71 | "Contributor" shall mean Licensor and any individual or Legal Entity 72 | on behalf of whom a Contribution has been received by Licensor and 73 | subsequently incorporated within the Work. 74 | 75 | 2. Grant of Copyright License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | copyright license to reproduce, prepare Derivative Works of, 79 | publicly display, publicly perform, sublicense, and distribute the 80 | Work and such Derivative Works in Source or Object form. 81 | 82 | 3. Grant of Patent License. Subject to the terms and conditions of 83 | this License, each Contributor hereby grants to You a perpetual, 84 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 85 | (except as stated in this section) patent license to make, have made, 86 | use, offer to sell, sell, import, and otherwise transfer the Work, 87 | where such license applies only to those patent claims licensable 88 | by such Contributor that are necessarily infringed by their 89 | Contribution(s) alone or by combination of their Contribution(s) 90 | with the Work to which such Contribution(s) was submitted. If You 91 | institute patent litigation against any entity (including a 92 | cross-claim or counterclaim in a lawsuit) alleging that the Work 93 | or a Contribution incorporated within the Work constitutes direct 94 | or contributory patent infringement, then any patent licenses 95 | granted to You under this License for that Work shall terminate 96 | as of the date such litigation is filed. 97 | 98 | 4. Redistribution. You may reproduce and distribute copies of the 99 | Work or Derivative Works thereof in any medium, with or without 100 | modifications, and in Source or Object form, provided that You 101 | meet the following conditions: 102 | 103 | (a) You must give any other recipients of the Work or 104 | Derivative Works a copy of this License; and 105 | 106 | (b) You must cause any modified files to carry prominent notices 107 | stating that You changed the files; and 108 | 109 | (c) You must retain, in the Source form of any Derivative Works 110 | that You distribute, all copyright, patent, trademark, and 111 | attribution notices from the Source form of the Work, 112 | excluding those notices that do not pertain to any part of 113 | the Derivative Works; and 114 | 115 | (d) If the Work includes a "NOTICE" text file as part of its 116 | distribution, then any Derivative Works that You distribute must 117 | include a readable copy of the attribution notices contained 118 | within such NOTICE file, excluding those notices that do not 119 | pertain to any part of the Derivative Works, in at least one 120 | of the following places: within a NOTICE text file distributed 121 | as part of the Derivative Works; within the Source form or 122 | documentation, if provided along with the Derivative Works; or, 123 | within a display generated by the Derivative Works, if and 124 | wherever such third-party notices normally appear. The contents 125 | of the NOTICE file are for informational purposes only and 126 | do not modify the License. You may add Your own attribution 127 | notices within Derivative Works that You distribute, alongside 128 | or as an addendum to the NOTICE text from the Work, provided 129 | that such additional attribution notices cannot be construed 130 | as modifying the License. 131 | 132 | You may add Your own copyright statement to Your modifications and 133 | may provide additional or different license terms and conditions 134 | for use, reproduction, or distribution of Your modifications, or 135 | for any such Derivative Works as a whole, provided Your use, 136 | reproduction, and distribution of the Work otherwise complies with 137 | the conditions stated in this License. 138 | 139 | 5. Submission of Contributions. Unless You explicitly state otherwise, 140 | any Contribution intentionally submitted for inclusion in the Work 141 | by You to the Licensor shall be under the terms and conditions of 142 | this License, without any additional terms or conditions. 143 | Notwithstanding the above, nothing herein shall supersede or modify 144 | the terms of any separate license agreement you may have executed 145 | with Licensor regarding such Contributions. 146 | 147 | 6. Trademarks. This License does not grant permission to use the trade 148 | names, trademarks, service marks, or product names of the Licensor, 149 | except as required for reasonable and customary use in describing the 150 | origin of the Work and reproducing the content of the NOTICE file. 151 | 152 | 7. Disclaimer of Warranty. Unless required by applicable law or 153 | agreed to in writing, Licensor provides the Work (and each 154 | Contributor provides its Contributions) on an "AS IS" BASIS, 155 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 156 | implied, including, without limitation, any warranties or conditions 157 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 158 | PARTICULAR PURPOSE. You are solely responsible for determining the 159 | appropriateness of using or redistributing the Work and assume any 160 | risks associated with Your exercise of permissions under this License. 161 | 162 | 8. Limitation of Liability. In no event and under no legal theory, 163 | whether in tort (including negligence), contract, or otherwise, 164 | unless required by applicable law (such as deliberate and grossly 165 | negligent acts) or agreed to in writing, shall any Contributor be 166 | liable to You for damages, including any direct, indirect, special, 167 | incidental, or consequential damages of any character arising as a 168 | result of this License or out of the use or inability to use the 169 | Work (including but not limited to damages for loss of goodwill, 170 | work stoppage, computer failure or malfunction, or any and all 171 | other commercial damages or losses), even if such Contributor 172 | has been advised of the possibility of such damages. 173 | 174 | 9. Accepting Warranty or Additional Liability. While redistributing 175 | the Work or Derivative Works thereof, You may choose to offer, 176 | and charge a fee for, acceptance of support, warranty, indemnity, 177 | or other liability obligations and/or rights consistent with this 178 | License. However, in accepting such obligations, You may act only 179 | on Your own behalf and on Your sole responsibility, not on behalf 180 | of any other Contributor, and only if You agree to indemnify, 181 | defend, and hold each Contributor harmless for any liability 182 | incurred by, or claims asserted against, such Contributor by reason 183 | of your accepting any such warranty or additional liability. 184 | 185 | END OF TERMS AND CONDITIONS 186 | 187 | APPENDIX: How to apply the Apache License to your work. 188 | 189 | To apply the Apache License to your work, attach the following 190 | boilerplate notice, with the fields enclosed by brackets "[]" 191 | replaced with your own identifying information. (Don't include 192 | the brackets!) The text should be enclosed in the appropriate 193 | comment syntax for the file format. We also recommend that a 194 | file or class name and description of purpose be included on the 195 | same "printed page" as the copyright notice for easier 196 | identification within third-party archives. 197 | 198 | Copyright [yyyy] [name of copyright owner] 199 | 200 | Licensed under the Apache License, Version 2.0 (the "License"); 201 | you may not use this file except in compliance with the License. 202 | You may obtain a copy of the License at 203 | 204 | http://www.apache.org/licenses/LICENSE-2.0 205 | 206 | Unless required by applicable law or agreed to in writing, software 207 | distributed under the License is distributed on an "AS IS" BASIS, 208 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 | See the License for the specific language governing permissions and 210 | limitations under the License. 211 | 212 | Type 213 | PSGroupSpecifier 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/GoogleDataTransport.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | 10 | Apache License 11 | Version 2.0, January 2004 12 | http://www.apache.org/licenses/ 13 | 14 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 15 | 16 | 1. Definitions. 17 | 18 | "License" shall mean the terms and conditions for use, reproduction, 19 | and distribution as defined by Sections 1 through 9 of this document. 20 | 21 | "Licensor" shall mean the copyright owner or entity authorized by 22 | the copyright owner that is granting the License. 23 | 24 | "Legal Entity" shall mean the union of the acting entity and all 25 | other entities that control, are controlled by, or are under common 26 | control with that entity. For the purposes of this definition, 27 | "control" means (i) the power, direct or indirect, to cause the 28 | direction or management of such entity, whether by contract or 29 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 30 | outstanding shares, or (iii) beneficial ownership of such entity. 31 | 32 | "You" (or "Your") shall mean an individual or Legal Entity 33 | exercising permissions granted by this License. 34 | 35 | "Source" form shall mean the preferred form for making modifications, 36 | including but not limited to software source code, documentation 37 | source, and configuration files. 38 | 39 | "Object" form shall mean any form resulting from mechanical 40 | transformation or translation of a Source form, including but 41 | not limited to compiled object code, generated documentation, 42 | and conversions to other media types. 43 | 44 | "Work" shall mean the work of authorship, whether in Source or 45 | Object form, made available under the License, as indicated by a 46 | copyright notice that is included in or attached to the work 47 | (an example is provided in the Appendix below). 48 | 49 | "Derivative Works" shall mean any work, whether in Source or Object 50 | form, that is based on (or derived from) the Work and for which the 51 | editorial revisions, annotations, elaborations, or other modifications 52 | represent, as a whole, an original work of authorship. For the purposes 53 | of this License, Derivative Works shall not include works that remain 54 | separable from, or merely link (or bind by name) to the interfaces of, 55 | the Work and Derivative Works thereof. 56 | 57 | "Contribution" shall mean any work of authorship, including 58 | the original version of the Work and any modifications or additions 59 | to that Work or Derivative Works thereof, that is intentionally 60 | submitted to Licensor for inclusion in the Work by the copyright owner 61 | or by an individual or Legal Entity authorized to submit on behalf of 62 | the copyright owner. For the purposes of this definition, "submitted" 63 | means any form of electronic, verbal, or written communication sent 64 | to the Licensor or its representatives, including but not limited to 65 | communication on electronic mailing lists, source code control systems, 66 | and issue tracking systems that are managed by, or on behalf of, the 67 | Licensor for the purpose of discussing and improving the Work, but 68 | excluding communication that is conspicuously marked or otherwise 69 | designated in writing by the copyright owner as "Not a Contribution." 70 | 71 | "Contributor" shall mean Licensor and any individual or Legal Entity 72 | on behalf of whom a Contribution has been received by Licensor and 73 | subsequently incorporated within the Work. 74 | 75 | 2. Grant of Copyright License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | copyright license to reproduce, prepare Derivative Works of, 79 | publicly display, publicly perform, sublicense, and distribute the 80 | Work and such Derivative Works in Source or Object form. 81 | 82 | 3. Grant of Patent License. Subject to the terms and conditions of 83 | this License, each Contributor hereby grants to You a perpetual, 84 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 85 | (except as stated in this section) patent license to make, have made, 86 | use, offer to sell, sell, import, and otherwise transfer the Work, 87 | where such license applies only to those patent claims licensable 88 | by such Contributor that are necessarily infringed by their 89 | Contribution(s) alone or by combination of their Contribution(s) 90 | with the Work to which such Contribution(s) was submitted. If You 91 | institute patent litigation against any entity (including a 92 | cross-claim or counterclaim in a lawsuit) alleging that the Work 93 | or a Contribution incorporated within the Work constitutes direct 94 | or contributory patent infringement, then any patent licenses 95 | granted to You under this License for that Work shall terminate 96 | as of the date such litigation is filed. 97 | 98 | 4. Redistribution. You may reproduce and distribute copies of the 99 | Work or Derivative Works thereof in any medium, with or without 100 | modifications, and in Source or Object form, provided that You 101 | meet the following conditions: 102 | 103 | (a) You must give any other recipients of the Work or 104 | Derivative Works a copy of this License; and 105 | 106 | (b) You must cause any modified files to carry prominent notices 107 | stating that You changed the files; and 108 | 109 | (c) You must retain, in the Source form of any Derivative Works 110 | that You distribute, all copyright, patent, trademark, and 111 | attribution notices from the Source form of the Work, 112 | excluding those notices that do not pertain to any part of 113 | the Derivative Works; and 114 | 115 | (d) If the Work includes a "NOTICE" text file as part of its 116 | distribution, then any Derivative Works that You distribute must 117 | include a readable copy of the attribution notices contained 118 | within such NOTICE file, excluding those notices that do not 119 | pertain to any part of the Derivative Works, in at least one 120 | of the following places: within a NOTICE text file distributed 121 | as part of the Derivative Works; within the Source form or 122 | documentation, if provided along with the Derivative Works; or, 123 | within a display generated by the Derivative Works, if and 124 | wherever such third-party notices normally appear. The contents 125 | of the NOTICE file are for informational purposes only and 126 | do not modify the License. You may add Your own attribution 127 | notices within Derivative Works that You distribute, alongside 128 | or as an addendum to the NOTICE text from the Work, provided 129 | that such additional attribution notices cannot be construed 130 | as modifying the License. 131 | 132 | You may add Your own copyright statement to Your modifications and 133 | may provide additional or different license terms and conditions 134 | for use, reproduction, or distribution of Your modifications, or 135 | for any such Derivative Works as a whole, provided Your use, 136 | reproduction, and distribution of the Work otherwise complies with 137 | the conditions stated in this License. 138 | 139 | 5. Submission of Contributions. Unless You explicitly state otherwise, 140 | any Contribution intentionally submitted for inclusion in the Work 141 | by You to the Licensor shall be under the terms and conditions of 142 | this License, without any additional terms or conditions. 143 | Notwithstanding the above, nothing herein shall supersede or modify 144 | the terms of any separate license agreement you may have executed 145 | with Licensor regarding such Contributions. 146 | 147 | 6. Trademarks. This License does not grant permission to use the trade 148 | names, trademarks, service marks, or product names of the Licensor, 149 | except as required for reasonable and customary use in describing the 150 | origin of the Work and reproducing the content of the NOTICE file. 151 | 152 | 7. Disclaimer of Warranty. Unless required by applicable law or 153 | agreed to in writing, Licensor provides the Work (and each 154 | Contributor provides its Contributions) on an "AS IS" BASIS, 155 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 156 | implied, including, without limitation, any warranties or conditions 157 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 158 | PARTICULAR PURPOSE. You are solely responsible for determining the 159 | appropriateness of using or redistributing the Work and assume any 160 | risks associated with Your exercise of permissions under this License. 161 | 162 | 8. Limitation of Liability. In no event and under no legal theory, 163 | whether in tort (including negligence), contract, or otherwise, 164 | unless required by applicable law (such as deliberate and grossly 165 | negligent acts) or agreed to in writing, shall any Contributor be 166 | liable to You for damages, including any direct, indirect, special, 167 | incidental, or consequential damages of any character arising as a 168 | result of this License or out of the use or inability to use the 169 | Work (including but not limited to damages for loss of goodwill, 170 | work stoppage, computer failure or malfunction, or any and all 171 | other commercial damages or losses), even if such Contributor 172 | has been advised of the possibility of such damages. 173 | 174 | 9. Accepting Warranty or Additional Liability. While redistributing 175 | the Work or Derivative Works thereof, You may choose to offer, 176 | and charge a fee for, acceptance of support, warranty, indemnity, 177 | or other liability obligations and/or rights consistent with this 178 | License. However, in accepting such obligations, You may act only 179 | on Your own behalf and on Your sole responsibility, not on behalf 180 | of any other Contributor, and only if You agree to indemnify, 181 | defend, and hold each Contributor harmless for any liability 182 | incurred by, or claims asserted against, such Contributor by reason 183 | of your accepting any such warranty or additional liability. 184 | 185 | END OF TERMS AND CONDITIONS 186 | 187 | APPENDIX: How to apply the Apache License to your work. 188 | 189 | To apply the Apache License to your work, attach the following 190 | boilerplate notice, with the fields enclosed by brackets "[]" 191 | replaced with your own identifying information. (Don't include 192 | the brackets!) The text should be enclosed in the appropriate 193 | comment syntax for the file format. We also recommend that a 194 | file or class name and description of purpose be included on the 195 | same "printed page" as the copyright notice for easier 196 | identification within third-party archives. 197 | 198 | Copyright [yyyy] [name of copyright owner] 199 | 200 | Licensed under the Apache License, Version 2.0 (the "License"); 201 | you may not use this file except in compliance with the License. 202 | You may obtain a copy of the License at 203 | 204 | http://www.apache.org/licenses/LICENSE-2.0 205 | 206 | Unless required by applicable law or agreed to in writing, software 207 | distributed under the License is distributed on an "AS IS" BASIS, 208 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 | See the License for the specific language governing permissions and 210 | limitations under the License. 211 | 212 | Type 213 | PSGroupSpecifier 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/GoogleUserMessagingPlatform.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | Copyright 2021 Google 10 | Type 11 | PSGroupSpecifier 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/Keys.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | MIT LICENSE Found in the repo 10 | Type 11 | PSGroupSpecifier 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/PromisesObjC.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | 10 | Apache License 11 | Version 2.0, January 2004 12 | http://www.apache.org/licenses/ 13 | 14 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 15 | 16 | 1. Definitions. 17 | 18 | "License" shall mean the terms and conditions for use, reproduction, 19 | and distribution as defined by Sections 1 through 9 of this document. 20 | 21 | "Licensor" shall mean the copyright owner or entity authorized by 22 | the copyright owner that is granting the License. 23 | 24 | "Legal Entity" shall mean the union of the acting entity and all 25 | other entities that control, are controlled by, or are under common 26 | control with that entity. For the purposes of this definition, 27 | "control" means (i) the power, direct or indirect, to cause the 28 | direction or management of such entity, whether by contract or 29 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 30 | outstanding shares, or (iii) beneficial ownership of such entity. 31 | 32 | "You" (or "Your") shall mean an individual or Legal Entity 33 | exercising permissions granted by this License. 34 | 35 | "Source" form shall mean the preferred form for making modifications, 36 | including but not limited to software source code, documentation 37 | source, and configuration files. 38 | 39 | "Object" form shall mean any form resulting from mechanical 40 | transformation or translation of a Source form, including but 41 | not limited to compiled object code, generated documentation, 42 | and conversions to other media types. 43 | 44 | "Work" shall mean the work of authorship, whether in Source or 45 | Object form, made available under the License, as indicated by a 46 | copyright notice that is included in or attached to the work 47 | (an example is provided in the Appendix below). 48 | 49 | "Derivative Works" shall mean any work, whether in Source or Object 50 | form, that is based on (or derived from) the Work and for which the 51 | editorial revisions, annotations, elaborations, or other modifications 52 | represent, as a whole, an original work of authorship. For the purposes 53 | of this License, Derivative Works shall not include works that remain 54 | separable from, or merely link (or bind by name) to the interfaces of, 55 | the Work and Derivative Works thereof. 56 | 57 | "Contribution" shall mean any work of authorship, including 58 | the original version of the Work and any modifications or additions 59 | to that Work or Derivative Works thereof, that is intentionally 60 | submitted to Licensor for inclusion in the Work by the copyright owner 61 | or by an individual or Legal Entity authorized to submit on behalf of 62 | the copyright owner. For the purposes of this definition, "submitted" 63 | means any form of electronic, verbal, or written communication sent 64 | to the Licensor or its representatives, including but not limited to 65 | communication on electronic mailing lists, source code control systems, 66 | and issue tracking systems that are managed by, or on behalf of, the 67 | Licensor for the purpose of discussing and improving the Work, but 68 | excluding communication that is conspicuously marked or otherwise 69 | designated in writing by the copyright owner as "Not a Contribution." 70 | 71 | "Contributor" shall mean Licensor and any individual or Legal Entity 72 | on behalf of whom a Contribution has been received by Licensor and 73 | subsequently incorporated within the Work. 74 | 75 | 2. Grant of Copyright License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | copyright license to reproduce, prepare Derivative Works of, 79 | publicly display, publicly perform, sublicense, and distribute the 80 | Work and such Derivative Works in Source or Object form. 81 | 82 | 3. Grant of Patent License. Subject to the terms and conditions of 83 | this License, each Contributor hereby grants to You a perpetual, 84 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 85 | (except as stated in this section) patent license to make, have made, 86 | use, offer to sell, sell, import, and otherwise transfer the Work, 87 | where such license applies only to those patent claims licensable 88 | by such Contributor that are necessarily infringed by their 89 | Contribution(s) alone or by combination of their Contribution(s) 90 | with the Work to which such Contribution(s) was submitted. If You 91 | institute patent litigation against any entity (including a 92 | cross-claim or counterclaim in a lawsuit) alleging that the Work 93 | or a Contribution incorporated within the Work constitutes direct 94 | or contributory patent infringement, then any patent licenses 95 | granted to You under this License for that Work shall terminate 96 | as of the date such litigation is filed. 97 | 98 | 4. Redistribution. You may reproduce and distribute copies of the 99 | Work or Derivative Works thereof in any medium, with or without 100 | modifications, and in Source or Object form, provided that You 101 | meet the following conditions: 102 | 103 | (a) You must give any other recipients of the Work or 104 | Derivative Works a copy of this License; and 105 | 106 | (b) You must cause any modified files to carry prominent notices 107 | stating that You changed the files; and 108 | 109 | (c) You must retain, in the Source form of any Derivative Works 110 | that You distribute, all copyright, patent, trademark, and 111 | attribution notices from the Source form of the Work, 112 | excluding those notices that do not pertain to any part of 113 | the Derivative Works; and 114 | 115 | (d) If the Work includes a "NOTICE" text file as part of its 116 | distribution, then any Derivative Works that You distribute must 117 | include a readable copy of the attribution notices contained 118 | within such NOTICE file, excluding those notices that do not 119 | pertain to any part of the Derivative Works, in at least one 120 | of the following places: within a NOTICE text file distributed 121 | as part of the Derivative Works; within the Source form or 122 | documentation, if provided along with the Derivative Works; or, 123 | within a display generated by the Derivative Works, if and 124 | wherever such third-party notices normally appear. The contents 125 | of the NOTICE file are for informational purposes only and 126 | do not modify the License. You may add Your own attribution 127 | notices within Derivative Works that You distribute, alongside 128 | or as an addendum to the NOTICE text from the Work, provided 129 | that such additional attribution notices cannot be construed 130 | as modifying the License. 131 | 132 | You may add Your own copyright statement to Your modifications and 133 | may provide additional or different license terms and conditions 134 | for use, reproduction, or distribution of Your modifications, or 135 | for any such Derivative Works as a whole, provided Your use, 136 | reproduction, and distribution of the Work otherwise complies with 137 | the conditions stated in this License. 138 | 139 | 5. Submission of Contributions. Unless You explicitly state otherwise, 140 | any Contribution intentionally submitted for inclusion in the Work 141 | by You to the Licensor shall be under the terms and conditions of 142 | this License, without any additional terms or conditions. 143 | Notwithstanding the above, nothing herein shall supersede or modify 144 | the terms of any separate license agreement you may have executed 145 | with Licensor regarding such Contributions. 146 | 147 | 6. Trademarks. This License does not grant permission to use the trade 148 | names, trademarks, service marks, or product names of the Licensor, 149 | except as required for reasonable and customary use in describing the 150 | origin of the Work and reproducing the content of the NOTICE file. 151 | 152 | 7. Disclaimer of Warranty. Unless required by applicable law or 153 | agreed to in writing, Licensor provides the Work (and each 154 | Contributor provides its Contributions) on an "AS IS" BASIS, 155 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 156 | implied, including, without limitation, any warranties or conditions 157 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 158 | PARTICULAR PURPOSE. You are solely responsible for determining the 159 | appropriateness of using or redistributing the Work and assume any 160 | risks associated with Your exercise of permissions under this License. 161 | 162 | 8. Limitation of Liability. In no event and under no legal theory, 163 | whether in tort (including negligence), contract, or otherwise, 164 | unless required by applicable law (such as deliberate and grossly 165 | negligent acts) or agreed to in writing, shall any Contributor be 166 | liable to You for damages, including any direct, indirect, special, 167 | incidental, or consequential damages of any character arising as a 168 | result of this License or out of the use or inability to use the 169 | Work (including but not limited to damages for loss of goodwill, 170 | work stoppage, computer failure or malfunction, or any and all 171 | other commercial damages or losses), even if such Contributor 172 | has been advised of the possibility of such damages. 173 | 174 | 9. Accepting Warranty or Additional Liability. While redistributing 175 | the Work or Derivative Works thereof, You may choose to offer, 176 | and charge a fee for, acceptance of support, warranty, indemnity, 177 | or other liability obligations and/or rights consistent with this 178 | License. However, in accepting such obligations, You may act only 179 | on Your own behalf and on Your sole responsibility, not on behalf 180 | of any other Contributor, and only if You agree to indemnify, 181 | defend, and hold each Contributor harmless for any liability 182 | incurred by, or claims asserted against, such Contributor by reason 183 | of your accepting any such warranty or additional liability. 184 | 185 | END OF TERMS AND CONDITIONS 186 | 187 | APPENDIX: How to apply the Apache License to your work. 188 | 189 | To apply the Apache License to your work, attach the following 190 | boilerplate notice, with the fields enclosed by brackets "[]" 191 | replaced with your own identifying information. (Don't include 192 | the brackets!) The text should be enclosed in the appropriate 193 | comment syntax for the file format. We also recommend that a 194 | file or class name and description of purpose be included on the 195 | same "printed page" as the copyright notice for easier 196 | identification within third-party archives. 197 | 198 | Copyright [yyyy] [name of copyright owner] 199 | 200 | Licensed under the Apache License, Version 2.0 (the "License"); 201 | you may not use this file except in compliance with the License. 202 | You may obtain a copy of the License at 203 | 204 | http://www.apache.org/licenses/LICENSE-2.0 205 | 206 | Unless required by applicable law or agreed to in writing, software 207 | distributed under the License is distributed on an "AS IS" BASIS, 208 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 | See the License for the specific language governing permissions and 210 | limitations under the License. 211 | 212 | Type 213 | PSGroupSpecifier 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/SwiftyUserDefaults.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The MIT License (MIT) 10 | 11 | Copyright (c) 2015-present Radosław Pietruszewski, Łukasz Mróz 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 | SOFTWARE. 30 | 31 | Type 32 | PSGroupSpecifier 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/firebase-ios-sdk.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | 10 | Apache License 11 | Version 2.0, January 2004 12 | http://www.apache.org/licenses/ 13 | 14 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 15 | 16 | 1. Definitions. 17 | 18 | "License" shall mean the terms and conditions for use, reproduction, 19 | and distribution as defined by Sections 1 through 9 of this document. 20 | 21 | "Licensor" shall mean the copyright owner or entity authorized by 22 | the copyright owner that is granting the License. 23 | 24 | "Legal Entity" shall mean the union of the acting entity and all 25 | other entities that control, are controlled by, or are under common 26 | control with that entity. For the purposes of this definition, 27 | "control" means (i) the power, direct or indirect, to cause the 28 | direction or management of such entity, whether by contract or 29 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 30 | outstanding shares, or (iii) beneficial ownership of such entity. 31 | 32 | "You" (or "Your") shall mean an individual or Legal Entity 33 | exercising permissions granted by this License. 34 | 35 | "Source" form shall mean the preferred form for making modifications, 36 | including but not limited to software source code, documentation 37 | source, and configuration files. 38 | 39 | "Object" form shall mean any form resulting from mechanical 40 | transformation or translation of a Source form, including but 41 | not limited to compiled object code, generated documentation, 42 | and conversions to other media types. 43 | 44 | "Work" shall mean the work of authorship, whether in Source or 45 | Object form, made available under the License, as indicated by a 46 | copyright notice that is included in or attached to the work 47 | (an example is provided in the Appendix below). 48 | 49 | "Derivative Works" shall mean any work, whether in Source or Object 50 | form, that is based on (or derived from) the Work and for which the 51 | editorial revisions, annotations, elaborations, or other modifications 52 | represent, as a whole, an original work of authorship. For the purposes 53 | of this License, Derivative Works shall not include works that remain 54 | separable from, or merely link (or bind by name) to the interfaces of, 55 | the Work and Derivative Works thereof. 56 | 57 | "Contribution" shall mean any work of authorship, including 58 | the original version of the Work and any modifications or additions 59 | to that Work or Derivative Works thereof, that is intentionally 60 | submitted to Licensor for inclusion in the Work by the copyright owner 61 | or by an individual or Legal Entity authorized to submit on behalf of 62 | the copyright owner. For the purposes of this definition, "submitted" 63 | means any form of electronic, verbal, or written communication sent 64 | to the Licensor or its representatives, including but not limited to 65 | communication on electronic mailing lists, source code control systems, 66 | and issue tracking systems that are managed by, or on behalf of, the 67 | Licensor for the purpose of discussing and improving the Work, but 68 | excluding communication that is conspicuously marked or otherwise 69 | designated in writing by the copyright owner as "Not a Contribution." 70 | 71 | "Contributor" shall mean Licensor and any individual or Legal Entity 72 | on behalf of whom a Contribution has been received by Licensor and 73 | subsequently incorporated within the Work. 74 | 75 | 2. Grant of Copyright License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | copyright license to reproduce, prepare Derivative Works of, 79 | publicly display, publicly perform, sublicense, and distribute the 80 | Work and such Derivative Works in Source or Object form. 81 | 82 | 3. Grant of Patent License. Subject to the terms and conditions of 83 | this License, each Contributor hereby grants to You a perpetual, 84 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 85 | (except as stated in this section) patent license to make, have made, 86 | use, offer to sell, sell, import, and otherwise transfer the Work, 87 | where such license applies only to those patent claims licensable 88 | by such Contributor that are necessarily infringed by their 89 | Contribution(s) alone or by combination of their Contribution(s) 90 | with the Work to which such Contribution(s) was submitted. If You 91 | institute patent litigation against any entity (including a 92 | cross-claim or counterclaim in a lawsuit) alleging that the Work 93 | or a Contribution incorporated within the Work constitutes direct 94 | or contributory patent infringement, then any patent licenses 95 | granted to You under this License for that Work shall terminate 96 | as of the date such litigation is filed. 97 | 98 | 4. Redistribution. You may reproduce and distribute copies of the 99 | Work or Derivative Works thereof in any medium, with or without 100 | modifications, and in Source or Object form, provided that You 101 | meet the following conditions: 102 | 103 | (a) You must give any other recipients of the Work or 104 | Derivative Works a copy of this License; and 105 | 106 | (b) You must cause any modified files to carry prominent notices 107 | stating that You changed the files; and 108 | 109 | (c) You must retain, in the Source form of any Derivative Works 110 | that You distribute, all copyright, patent, trademark, and 111 | attribution notices from the Source form of the Work, 112 | excluding those notices that do not pertain to any part of 113 | the Derivative Works; and 114 | 115 | (d) If the Work includes a "NOTICE" text file as part of its 116 | distribution, then any Derivative Works that You distribute must 117 | include a readable copy of the attribution notices contained 118 | within such NOTICE file, excluding those notices that do not 119 | pertain to any part of the Derivative Works, in at least one 120 | of the following places: within a NOTICE text file distributed 121 | as part of the Derivative Works; within the Source form or 122 | documentation, if provided along with the Derivative Works; or, 123 | within a display generated by the Derivative Works, if and 124 | wherever such third-party notices normally appear. The contents 125 | of the NOTICE file are for informational purposes only and 126 | do not modify the License. You may add Your own attribution 127 | notices within Derivative Works that You distribute, alongside 128 | or as an addendum to the NOTICE text from the Work, provided 129 | that such additional attribution notices cannot be construed 130 | as modifying the License. 131 | 132 | You may add Your own copyright statement to Your modifications and 133 | may provide additional or different license terms and conditions 134 | for use, reproduction, or distribution of Your modifications, or 135 | for any such Derivative Works as a whole, provided Your use, 136 | reproduction, and distribution of the Work otherwise complies with 137 | the conditions stated in this License. 138 | 139 | 5. Submission of Contributions. Unless You explicitly state otherwise, 140 | any Contribution intentionally submitted for inclusion in the Work 141 | by You to the Licensor shall be under the terms and conditions of 142 | this License, without any additional terms or conditions. 143 | Notwithstanding the above, nothing herein shall supersede or modify 144 | the terms of any separate license agreement you may have executed 145 | with Licensor regarding such Contributions. 146 | 147 | 6. Trademarks. This License does not grant permission to use the trade 148 | names, trademarks, service marks, or product names of the Licensor, 149 | except as required for reasonable and customary use in describing the 150 | origin of the Work and reproducing the content of the NOTICE file. 151 | 152 | 7. Disclaimer of Warranty. Unless required by applicable law or 153 | agreed to in writing, Licensor provides the Work (and each 154 | Contributor provides its Contributions) on an "AS IS" BASIS, 155 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 156 | implied, including, without limitation, any warranties or conditions 157 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 158 | PARTICULAR PURPOSE. You are solely responsible for determining the 159 | appropriateness of using or redistributing the Work and assume any 160 | risks associated with Your exercise of permissions under this License. 161 | 162 | 8. Limitation of Liability. In no event and under no legal theory, 163 | whether in tort (including negligence), contract, or otherwise, 164 | unless required by applicable law (such as deliberate and grossly 165 | negligent acts) or agreed to in writing, shall any Contributor be 166 | liable to You for damages, including any direct, indirect, special, 167 | incidental, or consequential damages of any character arising as a 168 | result of this License or out of the use or inability to use the 169 | Work (including but not limited to damages for loss of goodwill, 170 | work stoppage, computer failure or malfunction, or any and all 171 | other commercial damages or losses), even if such Contributor 172 | has been advised of the possibility of such damages. 173 | 174 | 9. Accepting Warranty or Additional Liability. While redistributing 175 | the Work or Derivative Works thereof, You may choose to offer, 176 | and charge a fee for, acceptance of support, warranty, indemnity, 177 | or other liability obligations and/or rights consistent with this 178 | License. However, in accepting such obligations, You may act only 179 | on Your own behalf and on Your sole responsibility, not on behalf 180 | of any other Contributor, and only if You agree to indemnify, 181 | defend, and hold each Contributor harmless for any liability 182 | incurred by, or claims asserted against, such Contributor by reason 183 | of your accepting any such warranty or additional liability. 184 | 185 | END OF TERMS AND CONDITIONS 186 | 187 | APPENDIX: How to apply the Apache License to your work. 188 | 189 | To apply the Apache License to your work, attach the following 190 | boilerplate notice, with the fields enclosed by brackets "[]" 191 | replaced with your own identifying information. (Don't include 192 | the brackets!) The text should be enclosed in the appropriate 193 | comment syntax for the file format. We also recommend that a 194 | file or class name and description of purpose be included on the 195 | same "printed page" as the copyright notice for easier 196 | identification within third-party archives. 197 | 198 | Copyright [yyyy] [name of copyright owner] 199 | 200 | Licensed under the Apache License, Version 2.0 (the "License"); 201 | you may not use this file except in compliance with the License. 202 | You may obtain a copy of the License at 203 | 204 | http://www.apache.org/licenses/LICENSE-2.0 205 | 206 | Unless required by applicable law or agreed to in writing, software 207 | distributed under the License is distributed on an "AS IS" BASIS, 208 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 | See the License for the specific language governing permissions and 210 | limitations under the License. 211 | 212 | Type 213 | PSGroupSpecifier 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/grpc-SwiftPM.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | 10 | Apache License 11 | Version 2.0, January 2004 12 | http://www.apache.org/licenses/ 13 | 14 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 15 | 16 | 1. Definitions. 17 | 18 | "License" shall mean the terms and conditions for use, reproduction, 19 | and distribution as defined by Sections 1 through 9 of this document. 20 | 21 | "Licensor" shall mean the copyright owner or entity authorized by 22 | the copyright owner that is granting the License. 23 | 24 | "Legal Entity" shall mean the union of the acting entity and all 25 | other entities that control, are controlled by, or are under common 26 | control with that entity. For the purposes of this definition, 27 | "control" means (i) the power, direct or indirect, to cause the 28 | direction or management of such entity, whether by contract or 29 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 30 | outstanding shares, or (iii) beneficial ownership of such entity. 31 | 32 | "You" (or "Your") shall mean an individual or Legal Entity 33 | exercising permissions granted by this License. 34 | 35 | "Source" form shall mean the preferred form for making modifications, 36 | including but not limited to software source code, documentation 37 | source, and configuration files. 38 | 39 | "Object" form shall mean any form resulting from mechanical 40 | transformation or translation of a Source form, including but 41 | not limited to compiled object code, generated documentation, 42 | and conversions to other media types. 43 | 44 | "Work" shall mean the work of authorship, whether in Source or 45 | Object form, made available under the License, as indicated by a 46 | copyright notice that is included in or attached to the work 47 | (an example is provided in the Appendix below). 48 | 49 | "Derivative Works" shall mean any work, whether in Source or Object 50 | form, that is based on (or derived from) the Work and for which the 51 | editorial revisions, annotations, elaborations, or other modifications 52 | represent, as a whole, an original work of authorship. For the purposes 53 | of this License, Derivative Works shall not include works that remain 54 | separable from, or merely link (or bind by name) to the interfaces of, 55 | the Work and Derivative Works thereof. 56 | 57 | "Contribution" shall mean any work of authorship, including 58 | the original version of the Work and any modifications or additions 59 | to that Work or Derivative Works thereof, that is intentionally 60 | submitted to Licensor for inclusion in the Work by the copyright owner 61 | or by an individual or Legal Entity authorized to submit on behalf of 62 | the copyright owner. For the purposes of this definition, "submitted" 63 | means any form of electronic, verbal, or written communication sent 64 | to the Licensor or its representatives, including but not limited to 65 | communication on electronic mailing lists, source code control systems, 66 | and issue tracking systems that are managed by, or on behalf of, the 67 | Licensor for the purpose of discussing and improving the Work, but 68 | excluding communication that is conspicuously marked or otherwise 69 | designated in writing by the copyright owner as "Not a Contribution." 70 | 71 | "Contributor" shall mean Licensor and any individual or Legal Entity 72 | on behalf of whom a Contribution has been received by Licensor and 73 | subsequently incorporated within the Work. 74 | 75 | 2. Grant of Copyright License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | copyright license to reproduce, prepare Derivative Works of, 79 | publicly display, publicly perform, sublicense, and distribute the 80 | Work and such Derivative Works in Source or Object form. 81 | 82 | 3. Grant of Patent License. Subject to the terms and conditions of 83 | this License, each Contributor hereby grants to You a perpetual, 84 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 85 | (except as stated in this section) patent license to make, have made, 86 | use, offer to sell, sell, import, and otherwise transfer the Work, 87 | where such license applies only to those patent claims licensable 88 | by such Contributor that are necessarily infringed by their 89 | Contribution(s) alone or by combination of their Contribution(s) 90 | with the Work to which such Contribution(s) was submitted. If You 91 | institute patent litigation against any entity (including a 92 | cross-claim or counterclaim in a lawsuit) alleging that the Work 93 | or a Contribution incorporated within the Work constitutes direct 94 | or contributory patent infringement, then any patent licenses 95 | granted to You under this License for that Work shall terminate 96 | as of the date such litigation is filed. 97 | 98 | 4. Redistribution. You may reproduce and distribute copies of the 99 | Work or Derivative Works thereof in any medium, with or without 100 | modifications, and in Source or Object form, provided that You 101 | meet the following conditions: 102 | 103 | (a) You must give any other recipients of the Work or 104 | Derivative Works a copy of this License; and 105 | 106 | (b) You must cause any modified files to carry prominent notices 107 | stating that You changed the files; and 108 | 109 | (c) You must retain, in the Source form of any Derivative Works 110 | that You distribute, all copyright, patent, trademark, and 111 | attribution notices from the Source form of the Work, 112 | excluding those notices that do not pertain to any part of 113 | the Derivative Works; and 114 | 115 | (d) If the Work includes a "NOTICE" text file as part of its 116 | distribution, then any Derivative Works that You distribute must 117 | include a readable copy of the attribution notices contained 118 | within such NOTICE file, excluding those notices that do not 119 | pertain to any part of the Derivative Works, in at least one 120 | of the following places: within a NOTICE text file distributed 121 | as part of the Derivative Works; within the Source form or 122 | documentation, if provided along with the Derivative Works; or, 123 | within a display generated by the Derivative Works, if and 124 | wherever such third-party notices normally appear. The contents 125 | of the NOTICE file are for informational purposes only and 126 | do not modify the License. You may add Your own attribution 127 | notices within Derivative Works that You distribute, alongside 128 | or as an addendum to the NOTICE text from the Work, provided 129 | that such additional attribution notices cannot be construed 130 | as modifying the License. 131 | 132 | You may add Your own copyright statement to Your modifications and 133 | may provide additional or different license terms and conditions 134 | for use, reproduction, or distribution of Your modifications, or 135 | for any such Derivative Works as a whole, provided Your use, 136 | reproduction, and distribution of the Work otherwise complies with 137 | the conditions stated in this License. 138 | 139 | 5. Submission of Contributions. Unless You explicitly state otherwise, 140 | any Contribution intentionally submitted for inclusion in the Work 141 | by You to the Licensor shall be under the terms and conditions of 142 | this License, without any additional terms or conditions. 143 | Notwithstanding the above, nothing herein shall supersede or modify 144 | the terms of any separate license agreement you may have executed 145 | with Licensor regarding such Contributions. 146 | 147 | 6. Trademarks. This License does not grant permission to use the trade 148 | names, trademarks, service marks, or product names of the Licensor, 149 | except as required for reasonable and customary use in describing the 150 | origin of the Work and reproducing the content of the NOTICE file. 151 | 152 | 7. Disclaimer of Warranty. Unless required by applicable law or 153 | agreed to in writing, Licensor provides the Work (and each 154 | Contributor provides its Contributions) on an "AS IS" BASIS, 155 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 156 | implied, including, without limitation, any warranties or conditions 157 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 158 | PARTICULAR PURPOSE. You are solely responsible for determining the 159 | appropriateness of using or redistributing the Work and assume any 160 | risks associated with Your exercise of permissions under this License. 161 | 162 | 8. Limitation of Liability. In no event and under no legal theory, 163 | whether in tort (including negligence), contract, or otherwise, 164 | unless required by applicable law (such as deliberate and grossly 165 | negligent acts) or agreed to in writing, shall any Contributor be 166 | liable to You for damages, including any direct, indirect, special, 167 | incidental, or consequential damages of any character arising as a 168 | result of this License or out of the use or inability to use the 169 | Work (including but not limited to damages for loss of goodwill, 170 | work stoppage, computer failure or malfunction, or any and all 171 | other commercial damages or losses), even if such Contributor 172 | has been advised of the possibility of such damages. 173 | 174 | 9. Accepting Warranty or Additional Liability. While redistributing 175 | the Work or Derivative Works thereof, You may choose to offer, 176 | and charge a fee for, acceptance of support, warranty, indemnity, 177 | or other liability obligations and/or rights consistent with this 178 | License. However, in accepting such obligations, You may act only 179 | on Your own behalf and on Your sole responsibility, not on behalf 180 | of any other Contributor, and only if You agree to indemnify, 181 | defend, and hold each Contributor harmless for any liability 182 | incurred by, or claims asserted against, such Contributor by reason 183 | of your accepting any such warranty or additional liability. 184 | 185 | END OF TERMS AND CONDITIONS 186 | 187 | APPENDIX: How to apply the Apache License to your work. 188 | 189 | To apply the Apache License to your work, attach the following 190 | boilerplate notice, with the fields enclosed by brackets "[]" 191 | replaced with your own identifying information. (Don't include 192 | the brackets!) The text should be enclosed in the appropriate 193 | comment syntax for the file format. We also recommend that a 194 | file or class name and description of purpose be included on the 195 | same "printed page" as the copyright notice for easier 196 | identification within third-party archives. 197 | 198 | Copyright [yyyy] [name of copyright owner] 199 | 200 | Licensed under the Apache License, Version 2.0 (the "License"); 201 | you may not use this file except in compliance with the License. 202 | You may obtain a copy of the License at 203 | 204 | http://www.apache.org/licenses/LICENSE-2.0 205 | 206 | Unless required by applicable law or agreed to in writing, software 207 | distributed under the License is distributed on an "AS IS" BASIS, 208 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 | See the License for the specific language governing permissions and 210 | limitations under the License. 211 | 212 | Type 213 | PSGroupSpecifier 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/gtm-session-fetcher.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | 10 | Apache License 11 | Version 2.0, January 2004 12 | http://www.apache.org/licenses/ 13 | 14 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 15 | 16 | 1. Definitions. 17 | 18 | "License" shall mean the terms and conditions for use, reproduction, 19 | and distribution as defined by Sections 1 through 9 of this document. 20 | 21 | "Licensor" shall mean the copyright owner or entity authorized by 22 | the copyright owner that is granting the License. 23 | 24 | "Legal Entity" shall mean the union of the acting entity and all 25 | other entities that control, are controlled by, or are under common 26 | control with that entity. For the purposes of this definition, 27 | "control" means (i) the power, direct or indirect, to cause the 28 | direction or management of such entity, whether by contract or 29 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 30 | outstanding shares, or (iii) beneficial ownership of such entity. 31 | 32 | "You" (or "Your") shall mean an individual or Legal Entity 33 | exercising permissions granted by this License. 34 | 35 | "Source" form shall mean the preferred form for making modifications, 36 | including but not limited to software source code, documentation 37 | source, and configuration files. 38 | 39 | "Object" form shall mean any form resulting from mechanical 40 | transformation or translation of a Source form, including but 41 | not limited to compiled object code, generated documentation, 42 | and conversions to other media types. 43 | 44 | "Work" shall mean the work of authorship, whether in Source or 45 | Object form, made available under the License, as indicated by a 46 | copyright notice that is included in or attached to the work 47 | (an example is provided in the Appendix below). 48 | 49 | "Derivative Works" shall mean any work, whether in Source or Object 50 | form, that is based on (or derived from) the Work and for which the 51 | editorial revisions, annotations, elaborations, or other modifications 52 | represent, as a whole, an original work of authorship. For the purposes 53 | of this License, Derivative Works shall not include works that remain 54 | separable from, or merely link (or bind by name) to the interfaces of, 55 | the Work and Derivative Works thereof. 56 | 57 | "Contribution" shall mean any work of authorship, including 58 | the original version of the Work and any modifications or additions 59 | to that Work or Derivative Works thereof, that is intentionally 60 | submitted to Licensor for inclusion in the Work by the copyright owner 61 | or by an individual or Legal Entity authorized to submit on behalf of 62 | the copyright owner. For the purposes of this definition, "submitted" 63 | means any form of electronic, verbal, or written communication sent 64 | to the Licensor or its representatives, including but not limited to 65 | communication on electronic mailing lists, source code control systems, 66 | and issue tracking systems that are managed by, or on behalf of, the 67 | Licensor for the purpose of discussing and improving the Work, but 68 | excluding communication that is conspicuously marked or otherwise 69 | designated in writing by the copyright owner as "Not a Contribution." 70 | 71 | "Contributor" shall mean Licensor and any individual or Legal Entity 72 | on behalf of whom a Contribution has been received by Licensor and 73 | subsequently incorporated within the Work. 74 | 75 | 2. Grant of Copyright License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | copyright license to reproduce, prepare Derivative Works of, 79 | publicly display, publicly perform, sublicense, and distribute the 80 | Work and such Derivative Works in Source or Object form. 81 | 82 | 3. Grant of Patent License. Subject to the terms and conditions of 83 | this License, each Contributor hereby grants to You a perpetual, 84 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 85 | (except as stated in this section) patent license to make, have made, 86 | use, offer to sell, sell, import, and otherwise transfer the Work, 87 | where such license applies only to those patent claims licensable 88 | by such Contributor that are necessarily infringed by their 89 | Contribution(s) alone or by combination of their Contribution(s) 90 | with the Work to which such Contribution(s) was submitted. If You 91 | institute patent litigation against any entity (including a 92 | cross-claim or counterclaim in a lawsuit) alleging that the Work 93 | or a Contribution incorporated within the Work constitutes direct 94 | or contributory patent infringement, then any patent licenses 95 | granted to You under this License for that Work shall terminate 96 | as of the date such litigation is filed. 97 | 98 | 4. Redistribution. You may reproduce and distribute copies of the 99 | Work or Derivative Works thereof in any medium, with or without 100 | modifications, and in Source or Object form, provided that You 101 | meet the following conditions: 102 | 103 | (a) You must give any other recipients of the Work or 104 | Derivative Works a copy of this License; and 105 | 106 | (b) You must cause any modified files to carry prominent notices 107 | stating that You changed the files; and 108 | 109 | (c) You must retain, in the Source form of any Derivative Works 110 | that You distribute, all copyright, patent, trademark, and 111 | attribution notices from the Source form of the Work, 112 | excluding those notices that do not pertain to any part of 113 | the Derivative Works; and 114 | 115 | (d) If the Work includes a "NOTICE" text file as part of its 116 | distribution, then any Derivative Works that You distribute must 117 | include a readable copy of the attribution notices contained 118 | within such NOTICE file, excluding those notices that do not 119 | pertain to any part of the Derivative Works, in at least one 120 | of the following places: within a NOTICE text file distributed 121 | as part of the Derivative Works; within the Source form or 122 | documentation, if provided along with the Derivative Works; or, 123 | within a display generated by the Derivative Works, if and 124 | wherever such third-party notices normally appear. The contents 125 | of the NOTICE file are for informational purposes only and 126 | do not modify the License. You may add Your own attribution 127 | notices within Derivative Works that You distribute, alongside 128 | or as an addendum to the NOTICE text from the Work, provided 129 | that such additional attribution notices cannot be construed 130 | as modifying the License. 131 | 132 | You may add Your own copyright statement to Your modifications and 133 | may provide additional or different license terms and conditions 134 | for use, reproduction, or distribution of Your modifications, or 135 | for any such Derivative Works as a whole, provided Your use, 136 | reproduction, and distribution of the Work otherwise complies with 137 | the conditions stated in this License. 138 | 139 | 5. Submission of Contributions. Unless You explicitly state otherwise, 140 | any Contribution intentionally submitted for inclusion in the Work 141 | by You to the Licensor shall be under the terms and conditions of 142 | this License, without any additional terms or conditions. 143 | Notwithstanding the above, nothing herein shall supersede or modify 144 | the terms of any separate license agreement you may have executed 145 | with Licensor regarding such Contributions. 146 | 147 | 6. Trademarks. This License does not grant permission to use the trade 148 | names, trademarks, service marks, or product names of the Licensor, 149 | except as required for reasonable and customary use in describing the 150 | origin of the Work and reproducing the content of the NOTICE file. 151 | 152 | 7. Disclaimer of Warranty. Unless required by applicable law or 153 | agreed to in writing, Licensor provides the Work (and each 154 | Contributor provides its Contributions) on an "AS IS" BASIS, 155 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 156 | implied, including, without limitation, any warranties or conditions 157 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 158 | PARTICULAR PURPOSE. You are solely responsible for determining the 159 | appropriateness of using or redistributing the Work and assume any 160 | risks associated with Your exercise of permissions under this License. 161 | 162 | 8. Limitation of Liability. In no event and under no legal theory, 163 | whether in tort (including negligence), contract, or otherwise, 164 | unless required by applicable law (such as deliberate and grossly 165 | negligent acts) or agreed to in writing, shall any Contributor be 166 | liable to You for damages, including any direct, indirect, special, 167 | incidental, or consequential damages of any character arising as a 168 | result of this License or out of the use or inability to use the 169 | Work (including but not limited to damages for loss of goodwill, 170 | work stoppage, computer failure or malfunction, or any and all 171 | other commercial damages or losses), even if such Contributor 172 | has been advised of the possibility of such damages. 173 | 174 | 9. Accepting Warranty or Additional Liability. While redistributing 175 | the Work or Derivative Works thereof, You may choose to offer, 176 | and charge a fee for, acceptance of support, warranty, indemnity, 177 | or other liability obligations and/or rights consistent with this 178 | License. However, in accepting such obligations, You may act only 179 | on Your own behalf and on Your sole responsibility, not on behalf 180 | of any other Contributor, and only if You agree to indemnify, 181 | defend, and hold each Contributor harmless for any liability 182 | incurred by, or claims asserted against, such Contributor by reason 183 | of your accepting any such warranty or additional liability. 184 | 185 | END OF TERMS AND CONDITIONS 186 | 187 | APPENDIX: How to apply the Apache License to your work. 188 | 189 | To apply the Apache License to your work, attach the following 190 | boilerplate notice, with the fields enclosed by brackets "[]" 191 | replaced with your own identifying information. (Don't include 192 | the brackets!) The text should be enclosed in the appropriate 193 | comment syntax for the file format. We also recommend that a 194 | file or class name and description of purpose be included on the 195 | same "printed page" as the copyright notice for easier 196 | identification within third-party archives. 197 | 198 | Copyright [yyyy] [name of copyright owner] 199 | 200 | Licensed under the Apache License, Version 2.0 (the "License"); 201 | you may not use this file except in compliance with the License. 202 | You may obtain a copy of the License at 203 | 204 | http://www.apache.org/licenses/LICENSE-2.0 205 | 206 | Unless required by applicable law or agreed to in writing, software 207 | distributed under the License is distributed on an "AS IS" BASIS, 208 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 | See the License for the specific language governing permissions and 210 | limitations under the License. 211 | 212 | Type 213 | PSGroupSpecifier 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/holiday_jp-swift.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | (The MIT license) 10 | 11 | Copyright (c) 2016 holiday-jp 12 | Copyright (c) 2018 Pine Mizune 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining 15 | a copy of this software and associated documentation files (the 16 | 'Software'), to deal in the Software without restriction, including 17 | without limitation the rights to use, copy, modify, merge, publish, 18 | distribute, sublicense, and/or sell copies of the Software, and to 19 | permit persons to whom the Software is furnished to do so, subject to 20 | the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be 23 | included in all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 26 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 28 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 29 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 30 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 31 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | 33 | Type 34 | PSGroupSpecifier 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/leveldb.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | Copyright (c) 2011 The LevelDB Authors. All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions are 13 | met: 14 | 15 | * Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | * Redistributions in binary form must reproduce the above 18 | copyright notice, this list of conditions and the following disclaimer 19 | in the documentation and/or other materials provided with the 20 | distribution. 21 | * Neither the name of Google Inc. nor the names of its 22 | contributors may be used to endorse or promote products derived from 23 | this software without specific prior written permission. 24 | 25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | 37 | Type 38 | PSGroupSpecifier 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/nanopb.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | Copyright (c) 2011 Petteri Aimonen <jpa at nanopb.mail.kapsi.fi> 10 | 11 | This software is provided 'as-is', without any express or 12 | implied warranty. In no event will the authors be held liable 13 | for any damages arising from the use of this software. 14 | 15 | Permission is granted to anyone to use this software for any 16 | purpose, including commercial applications, and to alter it and 17 | redistribute it freely, subject to the following restrictions: 18 | 19 | 1. The origin of this software must not be misrepresented; you 20 | must not claim that you wrote the original software. If you use 21 | this software in a product, an acknowledgment in the product 22 | documentation would be appreciated but is not required. 23 | 24 | 2. Altered source versions must be plainly marked as such, and 25 | must not be misrepresented as being the original software. 26 | 27 | 3. This notice may not be removed or altered from any source 28 | distribution. 29 | 30 | Type 31 | PSGroupSpecifier 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/com.funzin.longweekend/promises.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | 10 | Apache License 11 | Version 2.0, January 2004 12 | http://www.apache.org/licenses/ 13 | 14 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 15 | 16 | 1. Definitions. 17 | 18 | "License" shall mean the terms and conditions for use, reproduction, 19 | and distribution as defined by Sections 1 through 9 of this document. 20 | 21 | "Licensor" shall mean the copyright owner or entity authorized by 22 | the copyright owner that is granting the License. 23 | 24 | "Legal Entity" shall mean the union of the acting entity and all 25 | other entities that control, are controlled by, or are under common 26 | control with that entity. For the purposes of this definition, 27 | "control" means (i) the power, direct or indirect, to cause the 28 | direction or management of such entity, whether by contract or 29 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 30 | outstanding shares, or (iii) beneficial ownership of such entity. 31 | 32 | "You" (or "Your") shall mean an individual or Legal Entity 33 | exercising permissions granted by this License. 34 | 35 | "Source" form shall mean the preferred form for making modifications, 36 | including but not limited to software source code, documentation 37 | source, and configuration files. 38 | 39 | "Object" form shall mean any form resulting from mechanical 40 | transformation or translation of a Source form, including but 41 | not limited to compiled object code, generated documentation, 42 | and conversions to other media types. 43 | 44 | "Work" shall mean the work of authorship, whether in Source or 45 | Object form, made available under the License, as indicated by a 46 | copyright notice that is included in or attached to the work 47 | (an example is provided in the Appendix below). 48 | 49 | "Derivative Works" shall mean any work, whether in Source or Object 50 | form, that is based on (or derived from) the Work and for which the 51 | editorial revisions, annotations, elaborations, or other modifications 52 | represent, as a whole, an original work of authorship. For the purposes 53 | of this License, Derivative Works shall not include works that remain 54 | separable from, or merely link (or bind by name) to the interfaces of, 55 | the Work and Derivative Works thereof. 56 | 57 | "Contribution" shall mean any work of authorship, including 58 | the original version of the Work and any modifications or additions 59 | to that Work or Derivative Works thereof, that is intentionally 60 | submitted to Licensor for inclusion in the Work by the copyright owner 61 | or by an individual or Legal Entity authorized to submit on behalf of 62 | the copyright owner. For the purposes of this definition, "submitted" 63 | means any form of electronic, verbal, or written communication sent 64 | to the Licensor or its representatives, including but not limited to 65 | communication on electronic mailing lists, source code control systems, 66 | and issue tracking systems that are managed by, or on behalf of, the 67 | Licensor for the purpose of discussing and improving the Work, but 68 | excluding communication that is conspicuously marked or otherwise 69 | designated in writing by the copyright owner as "Not a Contribution." 70 | 71 | "Contributor" shall mean Licensor and any individual or Legal Entity 72 | on behalf of whom a Contribution has been received by Licensor and 73 | subsequently incorporated within the Work. 74 | 75 | 2. Grant of Copyright License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | copyright license to reproduce, prepare Derivative Works of, 79 | publicly display, publicly perform, sublicense, and distribute the 80 | Work and such Derivative Works in Source or Object form. 81 | 82 | 3. Grant of Patent License. Subject to the terms and conditions of 83 | this License, each Contributor hereby grants to You a perpetual, 84 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 85 | (except as stated in this section) patent license to make, have made, 86 | use, offer to sell, sell, import, and otherwise transfer the Work, 87 | where such license applies only to those patent claims licensable 88 | by such Contributor that are necessarily infringed by their 89 | Contribution(s) alone or by combination of their Contribution(s) 90 | with the Work to which such Contribution(s) was submitted. If You 91 | institute patent litigation against any entity (including a 92 | cross-claim or counterclaim in a lawsuit) alleging that the Work 93 | or a Contribution incorporated within the Work constitutes direct 94 | or contributory patent infringement, then any patent licenses 95 | granted to You under this License for that Work shall terminate 96 | as of the date such litigation is filed. 97 | 98 | 4. Redistribution. You may reproduce and distribute copies of the 99 | Work or Derivative Works thereof in any medium, with or without 100 | modifications, and in Source or Object form, provided that You 101 | meet the following conditions: 102 | 103 | (a) You must give any other recipients of the Work or 104 | Derivative Works a copy of this License; and 105 | 106 | (b) You must cause any modified files to carry prominent notices 107 | stating that You changed the files; and 108 | 109 | (c) You must retain, in the Source form of any Derivative Works 110 | that You distribute, all copyright, patent, trademark, and 111 | attribution notices from the Source form of the Work, 112 | excluding those notices that do not pertain to any part of 113 | the Derivative Works; and 114 | 115 | (d) If the Work includes a "NOTICE" text file as part of its 116 | distribution, then any Derivative Works that You distribute must 117 | include a readable copy of the attribution notices contained 118 | within such NOTICE file, excluding those notices that do not 119 | pertain to any part of the Derivative Works, in at least one 120 | of the following places: within a NOTICE text file distributed 121 | as part of the Derivative Works; within the Source form or 122 | documentation, if provided along with the Derivative Works; or, 123 | within a display generated by the Derivative Works, if and 124 | wherever such third-party notices normally appear. The contents 125 | of the NOTICE file are for informational purposes only and 126 | do not modify the License. You may add Your own attribution 127 | notices within Derivative Works that You distribute, alongside 128 | or as an addendum to the NOTICE text from the Work, provided 129 | that such additional attribution notices cannot be construed 130 | as modifying the License. 131 | 132 | You may add Your own copyright statement to Your modifications and 133 | may provide additional or different license terms and conditions 134 | for use, reproduction, or distribution of Your modifications, or 135 | for any such Derivative Works as a whole, provided Your use, 136 | reproduction, and distribution of the Work otherwise complies with 137 | the conditions stated in this License. 138 | 139 | 5. Submission of Contributions. Unless You explicitly state otherwise, 140 | any Contribution intentionally submitted for inclusion in the Work 141 | by You to the Licensor shall be under the terms and conditions of 142 | this License, without any additional terms or conditions. 143 | Notwithstanding the above, nothing herein shall supersede or modify 144 | the terms of any separate license agreement you may have executed 145 | with Licensor regarding such Contributions. 146 | 147 | 6. Trademarks. This License does not grant permission to use the trade 148 | names, trademarks, service marks, or product names of the Licensor, 149 | except as required for reasonable and customary use in describing the 150 | origin of the Work and reproducing the content of the NOTICE file. 151 | 152 | 7. Disclaimer of Warranty. Unless required by applicable law or 153 | agreed to in writing, Licensor provides the Work (and each 154 | Contributor provides its Contributions) on an "AS IS" BASIS, 155 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 156 | implied, including, without limitation, any warranties or conditions 157 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 158 | PARTICULAR PURPOSE. You are solely responsible for determining the 159 | appropriateness of using or redistributing the Work and assume any 160 | risks associated with Your exercise of permissions under this License. 161 | 162 | 8. Limitation of Liability. In no event and under no legal theory, 163 | whether in tort (including negligence), contract, or otherwise, 164 | unless required by applicable law (such as deliberate and grossly 165 | negligent acts) or agreed to in writing, shall any Contributor be 166 | liable to You for damages, including any direct, indirect, special, 167 | incidental, or consequential damages of any character arising as a 168 | result of this License or out of the use or inability to use the 169 | Work (including but not limited to damages for loss of goodwill, 170 | work stoppage, computer failure or malfunction, or any and all 171 | other commercial damages or losses), even if such Contributor 172 | has been advised of the possibility of such damages. 173 | 174 | 9. Accepting Warranty or Additional Liability. While redistributing 175 | the Work or Derivative Works thereof, You may choose to offer, 176 | and charge a fee for, acceptance of support, warranty, indemnity, 177 | or other liability obligations and/or rights consistent with this 178 | License. However, in accepting such obligations, You may act only 179 | on Your own behalf and on Your sole responsibility, not on behalf 180 | of any other Contributor, and only if You agree to indemnify, 181 | defend, and hold each Contributor harmless for any liability 182 | incurred by, or claims asserted against, such Contributor by reason 183 | of your accepting any such warranty or additional liability. 184 | 185 | END OF TERMS AND CONDITIONS 186 | 187 | APPENDIX: How to apply the Apache License to your work. 188 | 189 | To apply the Apache License to your work, attach the following 190 | boilerplate notice, with the fields enclosed by brackets "[]" 191 | replaced with your own identifying information. (Don't include 192 | the brackets!) The text should be enclosed in the appropriate 193 | comment syntax for the file format. We also recommend that a 194 | file or class name and description of purpose be included on the 195 | same "printed page" as the copyright notice for easier 196 | identification within third-party archives. 197 | 198 | Copyright [yyyy] [name of copyright owner] 199 | 200 | Licensed under the Apache License, Version 2.0 (the "License"); 201 | you may not use this file except in compliance with the License. 202 | You may obtain a copy of the License at 203 | 204 | http://www.apache.org/licenses/LICENSE-2.0 205 | 206 | Unless required by applicable law or agreed to in writing, software 207 | distributed under the License is distributed on an "AS IS" BASIS, 208 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 | See the License for the specific language governing permissions and 210 | limitations under the License. 211 | 212 | Type 213 | PSGroupSpecifier 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- 1 | /* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */ 2 | 3 | "Version" = "Version"; 4 | "Licenses" = "Licenses"; 5 | "Copyright" = "YOUR_COPYRIGHT"; -------------------------------------------------------------------------------- /LongWeekend/Resource/Settings.bundle/ja.lproj/Root.strings: -------------------------------------------------------------------------------- 1 | /* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */ 2 | 3 | "Version" = "アプリバージョン"; 4 | "Licenses" = "ライセンス情報"; 5 | "Copyright" = "YOUR_COPYRIGHT"; -------------------------------------------------------------------------------- /LongWeekend/Source/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/14. 6 | // Copyright © 2019 funzin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | #if Release 12 | import Firebase 13 | #endif 14 | import GoogleMobileAds 15 | 16 | @UIApplicationMain 17 | class AppDelegate: UIResponder, UIApplicationDelegate { 18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 19 | #if Release 20 | FirebaseApp.configure() 21 | #endif 22 | 23 | UITableView.appearance().tableFooterView = UIView() 24 | UITableView.appearance().separatorStyle = .none 25 | 26 | GADMobileAds.sharedInstance().start(completionHandler: nil) 27 | return true 28 | } 29 | 30 | // MARK: UISceneSession Lifecycle 31 | 32 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 33 | // Called when a new scene session is being created. 34 | // Use this method to select a configuration to create the new scene with. 35 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 36 | } 37 | 38 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 39 | // Called when the user discards a scene session. 40 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 41 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /LongWeekend/Source/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LongWeekend/Source/Common/DateManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateManager.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/21. 6 | // 7 | 8 | import Foundation 9 | import HolidayJp 10 | 11 | struct DateManager { 12 | static let shared = DateManager() 13 | private let calendar: Calendar 14 | private let formatter: DateFormatter 15 | 16 | init(calendar: Calendar = Calendar.current, 17 | formatter: DateFormatter = Formatter.defaultFormatter) { 18 | self.calendar = calendar 19 | self.formatter = formatter 20 | } 21 | } 22 | 23 | extension DateManager { 24 | enum Formatter { 25 | static let defaultFormatter: DateFormatter = { 26 | let formatter = DateFormatter() 27 | formatter.setLocalizedDateFormatFromTemplate("yMMMdE") 28 | return formatter 29 | }() 30 | 31 | static let holidayJpformatter: DateFormatter = { 32 | let formatter = DateFormatter() 33 | formatter.locale = Locale(identifier: "en_US_POSIX") 34 | formatter.dateFormat = "yyyy-MM-dd" 35 | return formatter 36 | }() 37 | } 38 | } 39 | 40 | extension DateManager { 41 | /// make date array from fromDate to toDate 42 | func makeAllDays(from: Date, to: Date) -> [Date] { 43 | let components = calendar.dateComponents([.day], from: from, to: to) 44 | guard let dayCount = components.day, 45 | dayCount >= 0 else { return [] } 46 | 47 | let allDays = (0 ... dayCount).compactMap { 48 | calendar.date(byAdding: .day, value: $0, to: from) 49 | } 50 | return allDays 51 | } 52 | 53 | /// extract only Saturdays and Sundays from allDays 54 | func extractWeekends(from allDays: [Date]) -> [Date] { 55 | return allDays.filter { 56 | let component = calendar.component(.weekday, from: $0) 57 | return component == 1 || component == 7 58 | } 59 | } 60 | 61 | /// make nationalHolidays from fromDate to toDate using HolidayJP 62 | func makeNationalHolidays(from: Date, to: Date) -> [Date] { 63 | let holidays = HolidayJp.between(from, and: to, calendar: calendar) 64 | return holidays.compactMap { Formatter.holidayJpformatter.date(from: $0.ymd) } 65 | } 66 | 67 | /// create two dimension array of holidays 68 | /// 69 | /// ``` 70 | /// // e.g. 71 | /// holidaysArray = [[2018/01/01], [2018/01/06, 2018/01/07, 2018/01/08], [2018/01/13, 2018/01/14]...] 72 | /// ``` 73 | func createHolidaysArray(holidays: [Date]) -> [[Date]] { 74 | var holidaysArray = [[Date]]() 75 | for day in holidays.sorted() { 76 | let yesterday = calendar.date(byAdding: .day, value: -1, to: day) 77 | 78 | if let lastArray = holidaysArray.last, 79 | let lastIndex = holidaysArray.indices.last, 80 | yesterday == lastArray.last { 81 | holidaysArray[lastIndex].append(day) 82 | } else { 83 | holidaysArray.append([day]) 84 | } 85 | } 86 | return holidaysArray 87 | } 88 | } 89 | 90 | extension DateManager { 91 | func date(from dateString: String) -> Date { 92 | guard let date = formatter.date(from: dateString) else { 93 | fatalError("should not reach here") 94 | } 95 | return date 96 | } 97 | 98 | func string(from date: Date) -> String { 99 | return formatter.string(from: date) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /LongWeekend/Source/Common/LongWeekendCalculator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LongWeekendCalculator.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/14. 6 | // 7 | 8 | import Foundation 9 | import HolidayJp 10 | 11 | struct LongWeekendCalcurator { 12 | static let shared = LongWeekendCalcurator() 13 | private let calendar: Calendar 14 | private let dateManager: DateManager 15 | 16 | init(calendar: Calendar = Calendar.current, 17 | dateManager: DateManager = .shared) { 18 | self.dateManager = dateManager 19 | self.calendar = calendar 20 | } 21 | } 22 | 23 | extension LongWeekendCalcurator { 24 | /// create longweekends 25 | func createLongWeekends(paidDaysCount: Int, 26 | from: Date, 27 | to: Date) -> [LongWeekendModel] { 28 | let allDays = dateManager.makeAllDays(from: from, to: to) 29 | let weekends = dateManager.extractWeekends(from: allDays) 30 | let nationalHolidays = dateManager.makeNationalHolidays(from: from, to: to) 31 | guard let allHolidays = NSOrderedSet(array: weekends + nationalHolidays).array as? [Date] else { return [] } 32 | let weekdays = Set(allDays).subtracting(Set(allHolidays)).sorted() 33 | let holidaysArray = dateManager.createHolidaysArray(holidays: allHolidays) 34 | 35 | var longWeekends = [LongWeekendModel]() 36 | for (i, holidays) in holidaysArray.enumerated() { 37 | // extract weekdays before and after holidays 38 | let prevWeekdays = weekdays.filter { weekday in 39 | guard let holidaysFirst = holidays.first else { return false } 40 | return weekday < holidaysFirst 41 | } 42 | .suffix(paidDaysCount) 43 | 44 | let nextWeekdays = weekdays.filter { weekday in 45 | guard let holidaysLast = holidays.last else { return false } 46 | return weekday > holidaysLast 47 | } 48 | .prefix(paidDaysCount) 49 | 50 | let prevAndNextWeekdays = Array(prevWeekdays + nextWeekdays) 51 | guard !prevAndNextWeekdays.isEmpty else { continue } 52 | 53 | let lastIndex = prevAndNextWeekdays.endIndex - paidDaysCount < 0 ? 0 : prevAndNextWeekdays.endIndex - paidDaysCount 54 | 55 | for day in prevAndNextWeekdays[0 ... lastIndex] { 56 | // determine the paid days 57 | let paidDays = Array(prevAndNextWeekdays.filter { day <= $0 }.prefix(paidDaysCount)) 58 | guard let firstPaidDay = paidDays.first, 59 | let lastPaidDay = paidDays.last else { continue } 60 | 61 | let firstDate: Date 62 | if prevWeekdays.contains(firstPaidDay) { 63 | // connect if the previous day is holiday 64 | if let previousDay = calendar.date(byAdding: .day, value: -1, to: firstPaidDay), 65 | allHolidays.contains(previousDay), i != 0, 66 | let prevHolidaysFirst = holidaysArray[i - 1].first { 67 | firstDate = prevHolidaysFirst 68 | } else { 69 | firstDate = firstPaidDay 70 | } 71 | } else { 72 | guard let holidayFirst = holidays.first else { fatalError("should not reach here") } 73 | firstDate = holidayFirst 74 | } 75 | 76 | let lastDate: Date 77 | if nextWeekdays.contains(lastPaidDay) { 78 | // connect if the next day is holiday 79 | if let nextDay = calendar.date(byAdding: .day, value: 1, to: lastPaidDay), 80 | allHolidays.contains(nextDay), i != holidays.indices.last, 81 | let nextHolidaysLast = holidaysArray[i + 1].last { 82 | lastDate = nextHolidaysLast 83 | } else { 84 | lastDate = lastPaidDay 85 | } 86 | } else { 87 | guard let holidaysLast = holidays.last else { fatalError("should not reach here") } 88 | lastDate = holidaysLast 89 | } 90 | 91 | guard let _numberOfHolidays = calendar.dateComponents([.day], from: firstDate, to: lastDate).day else { continue } 92 | let numberOfHolidays = _numberOfHolidays + 1 93 | 94 | // whether include nationalHoliday 95 | let containsNationalHoliday = !(0 ..< numberOfHolidays) 96 | .compactMap { calendar.date(byAdding: .day, value: $0, to: firstDate) } 97 | .filter { nationalHolidays.contains($0) }.isEmpty 98 | let longweekend = LongWeekendModel(paidDays: paidDays, 99 | firstDate: firstDate, 100 | lastDate: lastDate, 101 | numberOfHolidays: numberOfHolidays, 102 | containsNationalHoliday: containsNationalHoliday) 103 | 104 | let isEmpty = longWeekends.filter { $0.equalWithoutID(longweekend) }.isEmpty 105 | if isEmpty { 106 | longWeekends.append(longweekend) 107 | } 108 | } 109 | } 110 | return longWeekends 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /LongWeekend/Source/Common/UserDefaultsKey.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserDefaultsKey.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/22. 6 | // 7 | 8 | import Foundation 9 | import SwiftyUserDefaults 10 | 11 | extension DefaultsKeys { 12 | var fromDate: DefaultsKey { .init("fromDate", defaultValue: Date().removeTimestamp()) } 13 | var toDate: DefaultsKey { .init("toDate", defaultValue: Date(timeInterval: 60 * 60 * 24 * 365, since: Date()).removeTimestamp()) } 14 | var nationalHolidaySegment: DefaultsKey { .init("nationalHolidaySegment", defaultValue: .undefined) } 15 | var sortCriteriaSegment: DefaultsKey { .init("sortCriteriaSegment", defaultValue: .numberOfHolidays) } 16 | var paidDaysCount: DefaultsKey { .init("paidDaysCount", defaultValue: 1) } 17 | var minimumNumberOfHolidays: DefaultsKey { .init("minimumNumberOfHolidays", defaultValue: 3) } 18 | } 19 | -------------------------------------------------------------------------------- /LongWeekend/Source/Enum/NationalHolidaySegment.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NationalHolidaySegment.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/22. 6 | // 7 | 8 | import Foundation 9 | import SwiftyUserDefaults 10 | 11 | enum NationalHolidaySegment: Int, Equatable, DefaultsSerializable, Hashable { 12 | case undefined 13 | case containsNationalHoliday 14 | case notContainNationalHoliday 15 | } 16 | -------------------------------------------------------------------------------- /LongWeekend/Source/Enum/SortCriteriaSegment.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SortCriteriaSegment.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/22. 6 | // 7 | 8 | import Foundation 9 | import SwiftyUserDefaults 10 | 11 | enum SortCriteriaSegment: Int, Equatable, DefaultsSerializable, Hashable { 12 | case date 13 | case numberOfHolidays 14 | } 15 | -------------------------------------------------------------------------------- /LongWeekend/Source/Extension/DateExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateExtension.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/27. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Date { 11 | /// remove timestamp from date 12 | /// 13 | /// e.g 2018/01/01 10:00 → 2018/01/01 00:00 14 | func removeTimestamp() -> Date { 15 | let calendar = Calendar.current 16 | guard let date = calendar.date(from: calendar.dateComponents([.year, .month, .day], from: self)) else { 17 | fatalError("should not reach here") 18 | } 19 | return date 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /LongWeekend/Source/Generated/Strings.swift: -------------------------------------------------------------------------------- 1 | // swiftlint:disable all 2 | // Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen 3 | 4 | import Foundation 5 | 6 | // swiftlint:disable superfluous_disable_command file_length implicit_return 7 | 8 | // MARK: - Strings 9 | 10 | // swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length 11 | // swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces 12 | internal enum L10n { 13 | /// Close 14 | internal static let close = L10n.tr("Localizable", "close") 15 | /// Contains nationalholiday 16 | internal static let containsNationalHoliday = L10n.tr("Localizable", "containsNationalHoliday") 17 | /// Date 18 | internal static let date = L10n.tr("Localizable", "date") 19 | /// Days 20 | internal static let days = L10n.tr("Localizable", "days") 21 | /// from 22 | internal static let fromDate = L10n.tr("Localizable", "fromDate") 23 | /// Holiday period 24 | internal static let holidayPeriod = L10n.tr("Localizable", "holidayPeriod") 25 | /// LongWeekend 26 | internal static let longWeekend = L10n.tr("Localizable", "longWeekend") 27 | /// Minimum number of holidays 28 | internal static let minimumNumberOfHolidays = L10n.tr("Localizable", "minimumNumberOfHolidays") 29 | /// National holiday 30 | internal static let nationalHoliday = L10n.tr("Localizable", "nationalHoliday") 31 | /// Not contain nationalholiday 32 | internal static let notContainNationalHoliday = L10n.tr("Localizable", "notContainNationalHoliday") 33 | /// Number of holidays 34 | internal static let numberOfHolidays = L10n.tr("Localizable", "numberOfHolidays") 35 | /// Number of paid days 36 | internal static let numberOfPaidDays = L10n.tr("Localizable", "numberOfPaidDays") 37 | /// Paid days 38 | internal static let paidDays = L10n.tr("Localizable", "paidDays") 39 | /// Save 40 | internal static let save = L10n.tr("Localizable", "save") 41 | /// Saved! 42 | internal static let savedSetting = L10n.tr("Localizable", "savedSetting") 43 | /// Setting 44 | internal static let setting = L10n.tr("Localizable", "setting") 45 | /// Sort criteria 46 | internal static let sortCriteria = L10n.tr("Localizable", "sortCriteria") 47 | /// to 48 | internal static let toDate = L10n.tr("Localizable", "toDate") 49 | /// Unspecified 50 | internal static let unspecified = L10n.tr("Localizable", "unspecified") 51 | } 52 | 53 | // swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length 54 | // swiftlint:enable nesting type_body_length type_name vertical_whitespace_opening_braces 55 | 56 | // MARK: - Implementation Details 57 | 58 | extension L10n { 59 | private static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String { 60 | let format = BundleToken.bundle.localizedString(forKey: key, value: nil, table: table) 61 | return String(format: format, locale: Locale.current, arguments: args) 62 | } 63 | } 64 | 65 | // swiftlint:disable convenience_type 66 | private final class BundleToken { 67 | static let bundle: Bundle = { 68 | #if SWIFT_PACKAGE 69 | return Bundle.module 70 | #else 71 | return Bundle(for: BundleToken.self) 72 | #endif 73 | }() 74 | } 75 | 76 | // swiftlint:enable convenience_type 77 | -------------------------------------------------------------------------------- /LongWeekend/Source/Model/LongWeekendModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LongWeekendModel.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/14. 6 | // 7 | 8 | import Foundation 9 | 10 | struct LongWeekendModel: Equatable, Identifiable { 11 | let id: String = UUID().uuidString 12 | let paidDays: [Date] 13 | let firstDate: Date 14 | let lastDate: Date 15 | let numberOfHolidays: Int 16 | let containsNationalHoliday: Bool 17 | } 18 | 19 | extension LongWeekendModel { 20 | func equalWithoutID(_ longWeekend: LongWeekendModel) -> Bool { 21 | return paidDays == longWeekend.paidDays 22 | && firstDate == longWeekend.firstDate 23 | && lastDate == longWeekend.lastDate 24 | && numberOfHolidays == longWeekend.numberOfHolidays 25 | && containsNationalHoliday == longWeekend.containsNationalHoliday 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /LongWeekend/Source/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/14. 6 | // Copyright © 2019 funzin. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import UIKit 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | var window: UIWindow? 14 | 15 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 16 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 17 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 18 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 19 | 20 | // Create the SwiftUI view that provides the window contents. 21 | let contentView = LongWeekendList(viewModel: LongWeekendListViewModel()) 22 | 23 | // Use a UIHostingController as window root view controller. 24 | if let windowScene = scene as? UIWindowScene { 25 | let window = UIWindow(windowScene: windowScene) 26 | window.rootViewController = UIHostingController(rootView: contentView) 27 | self.window = window 28 | window.makeKeyAndVisible() 29 | } 30 | } 31 | 32 | func sceneDidDisconnect(_ scene: UIScene) { 33 | // Called as the scene is being released by the system. 34 | // This occurs shortly after the scene enters the background, or when its session is discarded. 35 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 36 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 37 | } 38 | 39 | func sceneDidBecomeActive(_ scene: UIScene) { 40 | // Called when the scene has moved from an inactive state to an active state. 41 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 42 | } 43 | 44 | func sceneWillResignActive(_ scene: UIScene) { 45 | // Called when the scene will move from an active state to an inactive state. 46 | // This may occur due to temporary interruptions (ex. an incoming phone call). 47 | } 48 | 49 | func sceneWillEnterForeground(_ scene: UIScene) { 50 | // Called as the scene transitions from the background to the foreground. 51 | // Use this method to undo the changes made on entering the background. 52 | } 53 | 54 | func sceneDidEnterBackground(_ scene: UIScene) { 55 | // Called as the scene transitions from the foreground to the background. 56 | // Use this method to save data, release shared resources, and store enough scene-specific state information 57 | // to restore the scene back to its current state. 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /LongWeekend/Source/View/AdBannerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AdBannerView.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/22. 6 | // 7 | 8 | import Foundation 9 | import GoogleMobileAds 10 | import Keys 11 | import SwiftUI 12 | 13 | struct AdBannerViewController: UIViewControllerRepresentable { 14 | func makeUIViewController(context: Context) -> UIViewController { 15 | let adBannerView = GADBannerView(adSize: kGADAdSizeBanner) 16 | let viewController = UIViewController() 17 | adBannerView.adUnitID = LongWeekendKeys().adUnitID 18 | adBannerView.rootViewController = viewController 19 | adBannerView.load(GADRequest()) 20 | adBannerView.frame.size = AdBannerViewController.bannerSize 21 | viewController.view.addSubview(adBannerView) 22 | viewController.view.frame = CGRect(origin: .zero, size: AdBannerViewController.bannerSize) 23 | return viewController 24 | } 25 | 26 | func updateUIViewController(_ uiViewController: UIViewController, context: UIViewControllerRepresentableContext) {} 27 | } 28 | 29 | extension AdBannerViewController { 30 | static var bannerSize: CGSize { 31 | switch UIDevice.current.userInterfaceIdiom { 32 | case .phone: 33 | return CGSize(width: kGADAdSizeBanner.size.width, 34 | height: kGADAdSizeBanner.size.height) 35 | case .pad: 36 | return CGSize(width: kGADAdSizeLargeBanner.size.width, 37 | height: kGADAdSizeLargeBanner.size.height) 38 | case .unspecified, .tv, .carPlay, .mac: 39 | return .zero 40 | @unknown default: 41 | return .zero 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /LongWeekend/Source/View/LongWeekend/LongWeekendList.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LongWeekendList.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/21. 6 | // 7 | 8 | import AppTrackingTransparency 9 | import GoogleMobileAds 10 | import SwiftUI 11 | 12 | struct LongWeekendList: View { 13 | @ObservedObject var viewModel: LongWeekendListViewModel 14 | @State var isPresented: Bool = false 15 | 16 | var body: some View { 17 | NavigationView { 18 | VStack { 19 | List(viewModel.longWeekends) { longWeekend in 20 | LongWeekendRow(longWeekend: longWeekend) 21 | } 22 | AdBannerViewController() 23 | .frame(width: AdBannerViewController.bannerSize.width, 24 | height: AdBannerViewController.bannerSize.height) 25 | } 26 | .navigationBarTitle(L10n.longWeekend) 27 | .navigationBarItems(trailing: 28 | HStack { 29 | Button(action: { self.isPresented.toggle() }) { 30 | Image(systemName: "slider.horizontal.3") 31 | } 32 | .sheet(isPresented: $isPresented, 33 | content: { 34 | SettingView() 35 | .onDisappear(perform: { 36 | self.viewModel.loadLongWeekend() 37 | }) 38 | }) 39 | } 40 | ) 41 | } 42 | .navigationViewStyle(StackNavigationViewStyle()) 43 | .onAppear(perform: { 44 | if #available(iOS 14, *) { 45 | switch ATTrackingManager.trackingAuthorizationStatus { 46 | case .authorized, 47 | .denied, 48 | .restricted: 49 | break 50 | case .notDetermined: 51 | ATTrackingManager.requestTrackingAuthorization(completionHandler: { _ in }) 52 | @unknown default: 53 | break 54 | } 55 | } 56 | 57 | self.viewModel.loadLongWeekend() 58 | }) 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /LongWeekend/Source/View/LongWeekend/LongWeekendListViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LongWeekendViewModel.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/21. 6 | // 7 | 8 | import Combine 9 | import Foundation 10 | import SwiftUI 11 | import SwiftyUserDefaults 12 | 13 | final class LongWeekendListViewModel: ObservableObject { 14 | typealias SaveDataType = (NationalHolidaySegment, SortCriteriaSegment, Int, Int, Date, Date) 15 | 16 | @Published private(set) var longWeekends: [LongWeekendModel] = [] 17 | 18 | private let _loadLongWeekends = PassthroughSubject() 19 | private var cancellables: [AnyCancellable] = [] 20 | private let userDefaults: DefaultsAdapter 21 | 22 | init(userDefaults: DefaultsAdapter = Defaults, 23 | longWeekendCalcurator: LongWeekendCalcurator = LongWeekendCalcurator.shared) { 24 | self.userDefaults = userDefaults 25 | do { 26 | _loadLongWeekends 27 | .flatMap { _ -> Just in 28 | let nationalHolidaySegment = userDefaults.nationalHolidaySegment 29 | let sortCriteriaSegment = userDefaults.sortCriteriaSegment 30 | let paidDaysCount = userDefaults.paidDaysCount 31 | let minimumNumberOfHolidays = userDefaults.minimumNumberOfHolidays 32 | let fromDate = userDefaults.fromDate 33 | let toDate = userDefaults.toDate 34 | return Just((nationalHolidaySegment, sortCriteriaSegment, paidDaysCount, minimumNumberOfHolidays, fromDate, toDate)) 35 | } 36 | .removeDuplicates { prev, current -> Bool in 37 | prev == current 38 | } 39 | .map { nationalHolidaySegment, sortCriteriaSegment, paidDaysCount, minimumNumberOfHolidays, fromDate, toDate -> [LongWeekendModel] in 40 | let longWeekends = longWeekendCalcurator.createLongWeekends(paidDaysCount: paidDaysCount, 41 | from: fromDate, 42 | to: toDate) 43 | .lazy 44 | .filter { $0.numberOfHolidays >= minimumNumberOfHolidays } 45 | .filter { 46 | switch nationalHolidaySegment { 47 | case .undefined: return true 48 | case .containsNationalHoliday: return $0.containsNationalHoliday 49 | case .notContainNationalHoliday: return !$0.containsNationalHoliday 50 | } 51 | } 52 | .sorted { 53 | switch sortCriteriaSegment { 54 | case .date: 55 | return $0.firstDate < $1.firstDate 56 | case .numberOfHolidays: 57 | if $0.numberOfHolidays == $1.numberOfHolidays { 58 | return $0.firstDate < $1.firstDate 59 | } 60 | return $0.numberOfHolidays > $1.numberOfHolidays 61 | } 62 | } 63 | return longWeekends 64 | } 65 | .assign(to: \.longWeekends, on: self) 66 | .store(in: &cancellables) 67 | } 68 | } 69 | 70 | func loadLongWeekend() { 71 | _loadLongWeekends.send() 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /LongWeekend/Source/View/LongWeekend/LongWeekendRow.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LongWeekendRow.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct LongWeekendRow: View { 11 | var longWeekend: LongWeekendModel 12 | 13 | var body: some View { 14 | HStack { 15 | VStack(alignment: HorizontalAlignment.leading, spacing: 8) { 16 | HStack { 17 | Text("\(L10n.numberOfHolidays): ") 18 | Text("\(longWeekend.numberOfHolidays)\(L10n.days)") 19 | .font(Font.bold(.system(size: 16))()) 20 | } 21 | VStack(alignment: .leading, spacing: 5) { 22 | Text("\(L10n.holidayPeriod):") 23 | Text("\(DateManager.shared.string(from: longWeekend.firstDate))~\(DateManager.shared.string(from: longWeekend.lastDate))") 24 | } 25 | VStack(alignment: .leading, spacing: 5) { 26 | Text("\(L10n.paidDays): ") 27 | Text(longWeekend.paidDays.map { "・\(DateManager.shared.string(from: $0))" }.joined(separator: "\n")) 28 | .lineLimit(nil) 29 | } 30 | } 31 | .font(Font.system(size: 16)) 32 | .foregroundColor(Color(UIColor.label)) 33 | Spacer() 34 | } 35 | .padding(15) 36 | .background(Color(UIColor.systemGray6)) 37 | .cornerRadius(13, antialiased: false) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LongWeekend/Source/View/Setting/SettingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // SettingView.swift 4 | // LongWeekend 5 | // 6 | // Created by funzin on 2019/10/21. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct SettingView: View { 12 | @Environment(\.presentationMode) var presentation 13 | @ObservedObject(initialValue: SettingViewModel()) var viewModel: SettingViewModel 14 | @State private var isPresented = false 15 | 16 | var body: some View { 17 | NavigationView { 18 | List { 19 | Section(header: Text(L10n.numberOfPaidDays)) { 20 | Stepper(value: $viewModel.paidDaysCount, in: 1 ... 100, label: { Text("\(viewModel.paidDaysCount)\(L10n.days)") }) 21 | } 22 | .padding(10) 23 | Section(header: Text(L10n.minimumNumberOfHolidays)) { 24 | Stepper(value: $viewModel.minimumNumberOfHolidays, in: 3 ... 100, label: { Text("\(viewModel.minimumNumberOfHolidays)\(L10n.days)") }) 25 | } 26 | .padding(10) 27 | Section(header: Text(L10n.nationalHoliday)) { 28 | Picker(selection: $viewModel.nationalHolidaySegment, label: Text("")) { 29 | Text(L10n.unspecified).tag(NationalHolidaySegment.undefined) 30 | Text(L10n.containsNationalHoliday).tag(NationalHolidaySegment.containsNationalHoliday) 31 | Text(L10n.notContainNationalHoliday).tag(NationalHolidaySegment.notContainNationalHoliday) 32 | }.pickerStyle(SegmentedPickerStyle()) 33 | } 34 | .padding(10) 35 | Section(header: Text(L10n.sortCriteria)) { 36 | Picker(selection: $viewModel.sortCriteriaSegment, label: Text("")) { 37 | Text(L10n.date).tag(SortCriteriaSegment.date) 38 | Text(L10n.numberOfHolidays).tag(SortCriteriaSegment.numberOfHolidays) 39 | }.pickerStyle(SegmentedPickerStyle()) 40 | } 41 | .padding(10) 42 | Section(header: Text(L10n.date)) { 43 | VStack(alignment: .leading) { 44 | Text("\(L10n.fromDate): ") 45 | DatePicker(selection: $viewModel.fromDate, displayedComponents: .date) { 46 | Text("") 47 | } 48 | .labelsHidden() 49 | .padding(10) 50 | Text("\(L10n.toDate): ") 51 | DatePicker(selection: $viewModel.toDate, displayedComponents: .date) { 52 | Text("") 53 | } 54 | .labelsHidden() 55 | .padding(10) 56 | } 57 | } 58 | .padding(10) 59 | } 60 | .navigationBarTitle(L10n.setting) 61 | .navigationBarItems(trailing: 62 | Button(action: { 63 | self.isPresented = true 64 | self.viewModel.save() 65 | }) { 66 | Text(L10n.save) 67 | } 68 | .alert(isPresented: $isPresented, content: { 69 | Alert(title: Text(L10n.savedSetting), 70 | message: nil, 71 | dismissButton: .default(Text(L10n.close), 72 | action: { self.presentation.wrappedValue.dismiss() })) 73 | }) 74 | ) 75 | } 76 | .navigationViewStyle(StackNavigationViewStyle()) 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /LongWeekend/Source/View/Setting/SettingViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingViewModel.swift 3 | // LongWeekend 4 | // 5 | // Created by funzin on 2019/10/22. 6 | // 7 | 8 | import Combine 9 | import Foundation 10 | import SwiftUI 11 | import SwiftyUserDefaults 12 | 13 | final class SettingViewModel: ObservableObject { 14 | @Published var fromDate: Date 15 | @Published var toDate: Date 16 | @Published var nationalHolidaySegment: NationalHolidaySegment 17 | @Published var sortCriteriaSegment: SortCriteriaSegment 18 | @Published var paidDaysCount: Int 19 | @Published var minimumNumberOfHolidays: Int 20 | 21 | private let userDefaults: DefaultsAdapter 22 | init(userDefaults: DefaultsAdapter = Defaults) { 23 | self.fromDate = userDefaults.fromDate 24 | self.toDate = userDefaults.toDate 25 | self.nationalHolidaySegment = userDefaults.nationalHolidaySegment 26 | self.sortCriteriaSegment = userDefaults.sortCriteriaSegment 27 | self.paidDaysCount = userDefaults.paidDaysCount 28 | self.minimumNumberOfHolidays = userDefaults.minimumNumberOfHolidays 29 | 30 | self.userDefaults = userDefaults 31 | } 32 | 33 | func save() { 34 | userDefaults.fromDate = fromDate.removeTimestamp() 35 | userDefaults.toDate = toDate.removeTimestamp() 36 | userDefaults.nationalHolidaySegment = nationalHolidaySegment 37 | userDefaults.sortCriteriaSegment = sortCriteriaSegment 38 | userDefaults.paidDaysCount = paidDaysCount 39 | userDefaults.minimumNumberOfHolidays = minimumNumberOfHolidays 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /LongWeekendTests/Common/TestCase.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestCase.swift 3 | // LongWeekendTests 4 | // 5 | // Created by funzin on 2019/10/21. 6 | // 7 | 8 | import Foundation 9 | 10 | struct TestCase { 11 | let input: Input 12 | let output: Output 13 | let desc: String 14 | 15 | init(input: Input, output: Output, desc: String = "") { 16 | self.input = input 17 | self.output = output 18 | self.desc = desc 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /LongWeekendTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 2 21 | 22 | 23 | -------------------------------------------------------------------------------- /LongWeekendTests/Tests/DateManagerTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateManagerTests.swift 3 | // LongWeekendTests 4 | // 5 | // Created by funzin on 2019/10/21. 6 | // 7 | 8 | import XCTest 9 | 10 | @testable import LongWeekend 11 | class DateManagerTests: XCTestCase { 12 | var dateManager: DateManager! 13 | 14 | override func setUp() { 15 | let calendar = Calendar(identifier: .gregorian) 16 | dateManager = DateManager(calendar: calendar, 17 | formatter: DateManager.Formatter.holidayJpformatter) 18 | } 19 | 20 | override func tearDown() {} 21 | 22 | func test_makeAllDays() { 23 | struct Input { 24 | let from: String 25 | let to: String 26 | } 27 | 28 | struct Output { 29 | let count: Int 30 | let from: Date? 31 | let to: Date? 32 | } 33 | 34 | let testCases: [TestCase] = [ 35 | .init(input: .init(from: "2018-04-23", to: "2018-04-21"), 36 | output: .init(count: 0, 37 | from: nil, 38 | to: nil), 39 | desc: "The date is reversed"), 40 | .init(input: .init(from: "2018-01-01", to: "2018-01-31"), 41 | output: .init(count: 31, 42 | from: dateManager.date(from: "2018-01-01"), 43 | to: dateManager.date(from: "2018-01-31"))) 44 | ] 45 | 46 | for testCase in testCases { 47 | setUp() 48 | let allDays = dateManager.makeAllDays(from: dateManager.date(from: testCase.input.from), 49 | to: dateManager.date(from: testCase.input.to)) 50 | XCTAssertEqual(allDays.count, testCase.output.count) 51 | XCTAssertEqual(allDays.first, testCase.output.from) 52 | XCTAssertEqual(allDays.last, testCase.output.to) 53 | } 54 | } 55 | 56 | func test_extractWeekends() { 57 | let from = dateManager.date(from: "2018-01-01") 58 | let to = dateManager.date(from: "2018-01-08") 59 | 60 | let allDays = dateManager.makeAllDays(from: from, to: to) 61 | let weekends = dateManager.extractWeekends(from: allDays) 62 | 63 | XCTAssertEqual(weekends.count, 2) 64 | XCTAssertEqual(weekends.first, dateManager.date(from: "2018-01-06")) 65 | XCTAssertEqual(weekends.last, dateManager.date(from: "2018-01-07")) 66 | } 67 | 68 | func test_makeNationalHolidays() { 69 | let from = dateManager.date(from: "2018-01-01") 70 | let to = dateManager.date(from: "2018-01-31") 71 | let nationalHolidays = dateManager.makeNationalHolidays(from: from, to: to) 72 | 73 | XCTAssertEqual(nationalHolidays.count, 2) 74 | XCTAssertEqual(nationalHolidays.first, dateManager.date(from: "2018-01-01")) 75 | XCTAssertEqual(nationalHolidays.last, dateManager.date(from: "2018-01-08")) 76 | } 77 | 78 | func test_createHolidaysArray() { 79 | let holidaysArray = dateManager.createHolidaysArray(holidays: ["2018-01-01", 80 | "2018-01-06", "2018-01-07", 81 | "2018-01-08", "2018-01-13", "2018-01-14"] 82 | .map { dateManager.date(from: $0) }) 83 | 84 | XCTAssertEqual(holidaysArray.count, 3) 85 | XCTAssertEqual(holidaysArray[0], ["2018-01-01"].map { dateManager.date(from: $0) }) 86 | XCTAssertEqual(holidaysArray[1], ["2018-01-06", "2018-01-07", "2018-01-08"].map { dateManager.date(from: $0) }) 87 | XCTAssertEqual(holidaysArray[2], ["2018-01-13", "2018-01-14"].map { dateManager.date(from: $0) }) 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /LongWeekendTests/Tests/LongWeekendCalculatorTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LongWeekendCalcuratorTests.swift 3 | // LongWeekendTests 4 | // 5 | // Created by funzin on 2019/10/14. 6 | // Copyright © 2019 funzin. All rights reserved. 7 | // 8 | 9 | @testable import LongWeekend 10 | import XCTest 11 | 12 | class LongWeekendCalcuratorTests: XCTestCase { 13 | var dateManeger: DateManager! 14 | var longWeekendCalcurator: LongWeekendCalcurator! 15 | 16 | override func setUp() { 17 | let calendar = Calendar(identifier: .gregorian) 18 | dateManeger = DateManager(calendar: calendar, formatter: DateManager.Formatter.holidayJpformatter) 19 | longWeekendCalcurator = LongWeekendCalcurator(calendar: calendar, 20 | dateManager: dateManeger) 21 | } 22 | 23 | override func tearDown() {} 24 | 25 | func test_createLongWeekends() { 26 | struct Input { 27 | let from: String 28 | let to: String 29 | let paidDaysCount: Int 30 | } 31 | 32 | let testCases: [TestCase] = [ 33 | .init(input: .init(from: "2018-04-28", to: "2018-05-08", paidDaysCount: 2), 34 | output: [.init(paidDays: ["2018-05-01", "2018-05-02"].map { dateManeger.date(from: $0) }, 35 | firstDate: dateManeger.date(from: "2018-04-28"), 36 | lastDate: dateManeger.date(from: "2018-05-06"), 37 | numberOfHolidays: 9, 38 | containsNationalHoliday: true), 39 | .init(paidDays: ["2018-05-02", "2018-05-07"].map { dateManeger.date(from: $0) }, 40 | firstDate: dateManeger.date(from: "2018-05-02"), 41 | lastDate: dateManeger.date(from: "2018-05-07"), 42 | numberOfHolidays: 6, 43 | containsNationalHoliday: true), 44 | .init(paidDays: ["2018-05-07", "2018-05-08"].map { dateManeger.date(from: $0) }, 45 | firstDate: dateManeger.date(from: "2018-05-03"), 46 | lastDate: dateManeger.date(from: "2018-05-08"), 47 | numberOfHolidays: 6, 48 | containsNationalHoliday: true)], 49 | desc: "when consecutive holidays are connected"), 50 | .init(input: .init(from: "2018-04-26", to: "2018-04-29", paidDaysCount: 2), 51 | output: [.init(paidDays: ["2018-04-26", "2018-04-27"].map { dateManeger.date(from: $0) }, 52 | firstDate: dateManeger.date(from: "2018-04-26"), 53 | lastDate: dateManeger.date(from: "2018-04-29"), 54 | numberOfHolidays: 4, 55 | containsNationalHoliday: true)], 56 | desc: "when toDate is holiday"), 57 | .init(input: .init(from: "2018-04-20", to: "2018-04-23", paidDaysCount: 1), 58 | output: [.init(paidDays: ["2018-04-20"].map { dateManeger.date(from: $0) }, 59 | firstDate: dateManeger.date(from: "2018-04-20"), 60 | lastDate: dateManeger.date(from: "2018-04-22"), 61 | numberOfHolidays: 3, 62 | containsNationalHoliday: false), 63 | .init(paidDays: ["2018-04-23"].map { dateManeger.date(from: $0) }, 64 | firstDate: dateManeger.date(from: "2018-04-21"), 65 | lastDate: dateManeger.date(from: "2018-04-23"), 66 | numberOfHolidays: 3, 67 | containsNationalHoliday: false)], 68 | desc: "when only one holiday"), 69 | .init(input: .init(from: "2018-04-23", to: "2018-04-21", paidDaysCount: 1), 70 | output: [], 71 | desc: "when the date is reversed") 72 | ] 73 | 74 | for testCase in testCases { 75 | setUp() 76 | let from = dateManeger.date(from: testCase.input.from) 77 | let to = dateManeger.date(from: testCase.input.to) 78 | let longWeekends = longWeekendCalcurator.createLongWeekends(paidDaysCount: testCase.input.paidDaysCount, 79 | from: from, 80 | to: to) 81 | 82 | XCTAssertEqual(testCase.output.count, longWeekends.count) 83 | for (output, longWeekend) in zip(testCase.output, longWeekends) { 84 | XCTAssertEqual(output.paidDays, longWeekend.paidDays) 85 | XCTAssertEqual(output.firstDate, longWeekend.firstDate) 86 | XCTAssertEqual(output.lastDate, longWeekend.lastDate) 87 | XCTAssertEqual(output.numberOfHolidays, longWeekend.numberOfHolidays) 88 | } 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /LongWeekendTests/Tests/LongWeekendListViewModelTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LongWeekendListViewModelTests.swift 3 | // LongWeekendTests 4 | // 5 | // Created by funzin on 2019/10/27. 6 | // 7 | 8 | import SwiftyUserDefaults 9 | import XCTest 10 | 11 | @testable import LongWeekend 12 | class LongWeekendListViewModelTests: XCTestCase { 13 | var viewModel: LongWeekendListViewModel! 14 | var mockUserDefaults: DefaultsAdapter! 15 | var dateManager: DateManager! 16 | 17 | override func setUp() { 18 | mockUserDefaults = DefaultsAdapter(defaults: UserDefaults(suiteName: "LongWeekendListViewModelTests")!, keyStore: .init()) 19 | let calendar = Calendar(identifier: .gregorian) 20 | dateManager = DateManager(calendar: calendar, formatter: DateManager.Formatter.holidayJpformatter) 21 | let longWeekendCalcurator = LongWeekendCalcurator(calendar: calendar, dateManager: dateManager) 22 | viewModel = LongWeekendListViewModel(userDefaults: mockUserDefaults, 23 | longWeekendCalcurator: longWeekendCalcurator) 24 | } 25 | 26 | override func tearDown() {} 27 | 28 | func test_loadLongWeekend() { 29 | mockUserDefaults.fromDate = dateManager.date(from: "2018-05-02") 30 | mockUserDefaults.toDate = dateManager.date(from: "2018-05-04") 31 | mockUserDefaults.nationalHolidaySegment = .undefined 32 | mockUserDefaults.sortCriteriaSegment = .date 33 | mockUserDefaults.paidDaysCount = 3 34 | mockUserDefaults.minimumNumberOfHolidays = 3 35 | viewModel.loadLongWeekend() 36 | XCTAssertFalse(viewModel.longWeekends.isEmpty) 37 | } 38 | 39 | func test_loadLongWeekend_minimumNumberOfHolidays() { 40 | struct Input { 41 | let minimumNumberOfHolidays: Int 42 | let nationalHolidaySegment: NationalHolidaySegment 43 | } 44 | 45 | struct Output { 46 | let isEmpty: Bool 47 | } 48 | 49 | let testCases: [TestCase] = [ 50 | .init(input: .init(minimumNumberOfHolidays: 3, 51 | nationalHolidaySegment: .undefined), 52 | output: .init(isEmpty: false), 53 | desc: "when minimumNumberOfHolidays is equal to longWeekend.numberOfHolidays"), 54 | .init(input: .init(minimumNumberOfHolidays: 4, 55 | nationalHolidaySegment: .undefined), 56 | output: .init(isEmpty: true), 57 | desc: "when minimumNumberOfHolidays is more than longWeekend.numberOfHolidays"), 58 | .init(input: .init(minimumNumberOfHolidays: 3, 59 | nationalHolidaySegment: .containsNationalHoliday), 60 | output: .init(isEmpty: false), 61 | desc: "when contains nationalHoliday"), 62 | .init(input: .init(minimumNumberOfHolidays: 3, 63 | nationalHolidaySegment: .notContainNationalHoliday), 64 | output: .init(isEmpty: true), 65 | desc: "when not contain nationalHolida") 66 | ] 67 | 68 | for testCase in testCases { 69 | setUp() 70 | mockUserDefaults.fromDate = dateManager.date(from: "2018-05-02") 71 | mockUserDefaults.toDate = dateManager.date(from: "2018-05-04") 72 | mockUserDefaults.nationalHolidaySegment = testCase.input.nationalHolidaySegment 73 | mockUserDefaults.sortCriteriaSegment = .date 74 | mockUserDefaults.paidDaysCount = 1 75 | mockUserDefaults.minimumNumberOfHolidays = testCase.input.minimumNumberOfHolidays 76 | 77 | viewModel.loadLongWeekend() 78 | 79 | XCTAssertEqual(testCase.output.isEmpty, viewModel.longWeekends.isEmpty) 80 | } 81 | } 82 | 83 | func test_loadLongWeekend_sortCriteriaSegment() { 84 | struct Input { 85 | let from: String 86 | let to: String 87 | let sortCriteriaSegment: SortCriteriaSegment 88 | } 89 | 90 | struct Output { 91 | let longWeekends: [LongWeekendModel] 92 | } 93 | 94 | let testCases: [TestCase] = [ 95 | .init(input: .init(from: "2018-04-29", 96 | to: "2018-05-05", 97 | sortCriteriaSegment: .date), 98 | output: .init(longWeekends: [LongWeekendModel(paidDays: [dateManager.date(from: "2018-05-01")], 99 | firstDate: dateManager.date(from: "2018-04-29"), 100 | lastDate: dateManager.date(from: "2018-05-01"), 101 | numberOfHolidays: 3, 102 | containsNationalHoliday: true), 103 | LongWeekendModel(paidDays: [dateManager.date(from: "2018-05-02")], 104 | firstDate: dateManager.date(from: "2018-05-02"), 105 | lastDate: dateManager.date(from: "2018-05-05"), 106 | numberOfHolidays: 4, 107 | containsNationalHoliday: true)]), 108 | desc: "when sortCriteriaSegment is .date"), 109 | .init(input: .init(from: "2018-04-29", 110 | to: "2018-05-05", 111 | sortCriteriaSegment: .numberOfHolidays), 112 | output: .init(longWeekends: [LongWeekendModel(paidDays: [dateManager.date(from: "2018-05-02")], 113 | firstDate: dateManager.date(from: "2018-05-02"), 114 | lastDate: dateManager.date(from: "2018-05-05"), 115 | numberOfHolidays: 4, 116 | containsNationalHoliday: true), 117 | LongWeekendModel(paidDays: [dateManager.date(from: "2018-05-01")], 118 | firstDate: dateManager.date(from: "2018-04-29"), 119 | lastDate: dateManager.date(from: "2018-05-01"), 120 | numberOfHolidays: 3, 121 | containsNationalHoliday: true)]), 122 | desc: "when sortCriteriaSegment is numberOfHolidays"), 123 | .init(input: .init(from: "2018-04-29", 124 | to: "2018-05-04", 125 | sortCriteriaSegment: .numberOfHolidays), 126 | output: .init(longWeekends: [LongWeekendModel(paidDays: [dateManager.date(from: "2018-05-01")], 127 | firstDate: dateManager.date(from: "2018-04-29"), 128 | lastDate: dateManager.date(from: "2018-05-01"), 129 | numberOfHolidays: 3, 130 | containsNationalHoliday: true), 131 | LongWeekendModel(paidDays: [dateManager.date(from: "2018-05-02")], 132 | firstDate: dateManager.date(from: "2018-05-02"), 133 | lastDate: dateManager.date(from: "2018-05-04"), 134 | numberOfHolidays: 3, 135 | containsNationalHoliday: true)]), 136 | desc: "when sortCriteriaSegment is numberOfHolidays and numberOfHolidays is the same") 137 | ] 138 | 139 | for testCase in testCases { 140 | setUp() 141 | mockUserDefaults.fromDate = dateManager.date(from: testCase.input.from) 142 | mockUserDefaults.toDate = dateManager.date(from: testCase.input.to) 143 | mockUserDefaults.nationalHolidaySegment = .undefined 144 | mockUserDefaults.sortCriteriaSegment = testCase.input.sortCriteriaSegment 145 | mockUserDefaults.paidDaysCount = 1 146 | mockUserDefaults.minimumNumberOfHolidays = 3 147 | viewModel.loadLongWeekend() 148 | 149 | for (output, longWeekend) in zip(testCase.output.longWeekends, viewModel.longWeekends) { 150 | XCTAssertEqual(output.paidDays, longWeekend.paidDays) 151 | XCTAssertEqual(output.firstDate, longWeekend.firstDate) 152 | XCTAssertEqual(output.lastDate, longWeekend.lastDate) 153 | XCTAssertEqual(output.numberOfHolidays, longWeekend.numberOfHolidays) 154 | } 155 | } 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /LongWeekendTests/Tests/SettingViewModelTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingViewModelTests.swift 3 | // LongWeekendTests 4 | // 5 | // Created by funzin on 2019/10/26. 6 | // 7 | 8 | import SwiftyUserDefaults 9 | import XCTest 10 | 11 | @testable import LongWeekend 12 | class SettingViewModelTests: XCTestCase { 13 | var viewModel: SettingViewModel! 14 | var mockUserDefaults: DefaultsAdapter! 15 | var dateManager: DateManager! 16 | 17 | override func setUp() { 18 | mockUserDefaults = DefaultsAdapter(defaults: UserDefaults(suiteName: "SettingViewModelTests")!, keyStore: .init()) 19 | viewModel = SettingViewModel(userDefaults: mockUserDefaults) 20 | dateManager = DateManager(formatter: DateManager.Formatter.holidayJpformatter) 21 | } 22 | 23 | override func tearDown() {} 24 | 25 | func test_init() { 26 | let fromDate = dateManager.date(from: "2018-01-01") 27 | let toDate = dateManager.date(from: "2018-01-10") 28 | let nationalHolidaySegment = NationalHolidaySegment.containsNationalHoliday 29 | let sortCriteriaSegment = SortCriteriaSegment.numberOfHolidays 30 | let paidDaysCount = 4 31 | let minimumNumberOfHolidays = 5 32 | 33 | mockUserDefaults.fromDate = fromDate 34 | mockUserDefaults.toDate = toDate 35 | mockUserDefaults.nationalHolidaySegment = nationalHolidaySegment 36 | mockUserDefaults.sortCriteriaSegment = sortCriteriaSegment 37 | mockUserDefaults.paidDaysCount = paidDaysCount 38 | mockUserDefaults.minimumNumberOfHolidays = minimumNumberOfHolidays 39 | 40 | viewModel = SettingViewModel(userDefaults: mockUserDefaults) 41 | 42 | XCTAssertEqual(viewModel.fromDate, fromDate) 43 | XCTAssertEqual(viewModel.toDate, toDate) 44 | XCTAssertEqual(viewModel.nationalHolidaySegment, nationalHolidaySegment) 45 | XCTAssertEqual(viewModel.sortCriteriaSegment, sortCriteriaSegment) 46 | XCTAssertEqual(viewModel.minimumNumberOfHolidays, minimumNumberOfHolidays) 47 | } 48 | 49 | func test_save() { 50 | let fromDate = dateManager.date(from: "2018-01-01") 51 | let toDate = dateManager.date(from: "2018-01-10") 52 | let nationalHolidaySegment = NationalHolidaySegment.containsNationalHoliday 53 | let sortCriteriaSegment = SortCriteriaSegment.numberOfHolidays 54 | let paidDaysCount = 4 55 | let minimumNumberOfHolidays = 5 56 | 57 | viewModel.fromDate = fromDate 58 | viewModel.toDate = toDate 59 | viewModel.nationalHolidaySegment = nationalHolidaySegment 60 | viewModel.sortCriteriaSegment = sortCriteriaSegment 61 | viewModel.paidDaysCount = paidDaysCount 62 | viewModel.minimumNumberOfHolidays = minimumNumberOfHolidays 63 | 64 | viewModel.save() 65 | 66 | XCTAssertEqual(mockUserDefaults.fromDate, fromDate) 67 | XCTAssertEqual(mockUserDefaults.toDate, toDate) 68 | XCTAssertEqual(mockUserDefaults.nationalHolidaySegment, nationalHolidaySegment) 69 | XCTAssertEqual(mockUserDefaults.sortCriteriaSegment, sortCriteriaSegment) 70 | XCTAssertEqual(mockUserDefaults.minimumNumberOfHolidays, minimumNumberOfHolidays) 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SDKROOT=macosx 2 | envFile="$(shell ls -a | grep .env)" 3 | 4 | ifeq ("$(shell echo ${envFile})" , "$(shell echo .env)") 5 | include .env 6 | export 7 | else 8 | AD_UNIT_ID=ca-app-pub-3940256099942544/2934735716 9 | endif 10 | 11 | 12 | bootstrap: install-gems set-pods-keys xcodegen 13 | execute-xcodegen-and-pod: xcodegen install-pod 14 | 15 | # cocoapods 16 | install-pod: 17 | bundle exec pod install --repo-update 18 | 19 | # gem 20 | install-gems: 21 | rm -rf vendor/ 22 | gem install -N bundler 23 | bundle install 24 | 25 | swiftgen: 26 | swift run --package-path CLI/_swiftgen -c release swiftgen 27 | 28 | swiftlint: 29 | swift run --package-path CLI/_swiftlint -c release swiftlint 30 | 31 | license-plist: 32 | swift run --package-path CLI/_license_plist -c release license-plist --output-path LongWeekend/Resource/Settings.bundle --prefix com.funzin.longweekend 33 | 34 | xcodegen: 35 | swift run --package-path CLI/_xcodegen -c release xcodegen 36 | 37 | swiftformat: 38 | swift run --package-path CLI/_swiftformat -c release swiftformat ./ 39 | 40 | set-pods-keys: 41 | bundle exec pod keys set "AdUnitID" ${AD_UNIT_ID} LongWeekend 42 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '13.0' 3 | 4 | plugin 'cocoapods-keys', { 5 | :project => "LongWeekend", 6 | :keys => [ 7 | 'AdUnitID', 8 | ] 9 | } 10 | target 'LongWeekend' do 11 | # Comment the next line if you don't want to use dynamic frameworks 12 | use_frameworks! 13 | 14 | # Pods for LongWeekend 15 | pod 'Google-Mobile-Ads-SDK', '8.5.0' 16 | 17 | target 'LongWeekendTests' do 18 | inherit! :search_paths 19 | # Pods for testing 20 | end 21 | 22 | end 23 | 24 | post_install do |installer| 25 | installer.pods_project.build_configurations.each do |config| 26 | config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" 27 | end 28 | end 29 | 30 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Google-Mobile-Ads-SDK (8.5.0): 3 | - GoogleAppMeasurement (< 9.0, >= 7.0) 4 | - GoogleUserMessagingPlatform (>= 1.1) 5 | - GoogleAppMeasurement (8.1.0): 6 | - GoogleAppMeasurement/AdIdSupport (= 8.1.0) 7 | - GoogleUtilities/AppDelegateSwizzler (~> 7.4) 8 | - GoogleUtilities/MethodSwizzler (~> 7.4) 9 | - GoogleUtilities/Network (~> 7.4) 10 | - "GoogleUtilities/NSData+zlib (~> 7.4)" 11 | - nanopb (~> 2.30908.0) 12 | - GoogleAppMeasurement/AdIdSupport (8.1.0): 13 | - GoogleUtilities/AppDelegateSwizzler (~> 7.4) 14 | - GoogleUtilities/MethodSwizzler (~> 7.4) 15 | - GoogleUtilities/Network (~> 7.4) 16 | - "GoogleUtilities/NSData+zlib (~> 7.4)" 17 | - nanopb (~> 2.30908.0) 18 | - GoogleUserMessagingPlatform (2.0.0) 19 | - GoogleUtilities/AppDelegateSwizzler (7.4.1): 20 | - GoogleUtilities/Environment 21 | - GoogleUtilities/Logger 22 | - GoogleUtilities/Network 23 | - GoogleUtilities/Environment (7.4.1): 24 | - PromisesObjC (~> 1.2) 25 | - GoogleUtilities/Logger (7.4.1): 26 | - GoogleUtilities/Environment 27 | - GoogleUtilities/MethodSwizzler (7.4.1): 28 | - GoogleUtilities/Logger 29 | - GoogleUtilities/Network (7.4.1): 30 | - GoogleUtilities/Logger 31 | - "GoogleUtilities/NSData+zlib" 32 | - GoogleUtilities/Reachability 33 | - "GoogleUtilities/NSData+zlib (7.4.1)" 34 | - GoogleUtilities/Reachability (7.4.1): 35 | - GoogleUtilities/Logger 36 | - Keys (1.0.1) 37 | - nanopb (2.30908.0): 38 | - nanopb/decode (= 2.30908.0) 39 | - nanopb/encode (= 2.30908.0) 40 | - nanopb/decode (2.30908.0) 41 | - nanopb/encode (2.30908.0) 42 | - PromisesObjC (1.2.12) 43 | 44 | DEPENDENCIES: 45 | - Google-Mobile-Ads-SDK (= 8.5.0) 46 | - Keys (from `Pods/CocoaPodsKeys`) 47 | 48 | SPEC REPOS: 49 | trunk: 50 | - Google-Mobile-Ads-SDK 51 | - GoogleAppMeasurement 52 | - GoogleUserMessagingPlatform 53 | - GoogleUtilities 54 | - nanopb 55 | - PromisesObjC 56 | 57 | EXTERNAL SOURCES: 58 | Keys: 59 | :path: Pods/CocoaPodsKeys 60 | 61 | SPEC CHECKSUMS: 62 | Google-Mobile-Ads-SDK: 6f5c41bf73db1656e5b203ba9c31e3d0899a128d 63 | GoogleAppMeasurement: 9ff7b9e23cced93a5a41736c09bdeb5b5b7fb111 64 | GoogleUserMessagingPlatform: ab890ce5f6620f293a21b6bdd82e416a2c73aeca 65 | GoogleUtilities: f8a43108b38a68eebe8b3540e1f4f2d28843ce20 66 | Keys: a576f4c9c1c641ca913a959a9c62ed3f215a8de9 67 | nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 68 | PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 69 | 70 | PODFILE CHECKSUM: 7009013e8164cac21ecb439b4e6cac846f133a56 71 | 72 | COCOAPODS: 1.10.1 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LongWeekend-iOS 2 | 3 |

4 | LongWeekend 5 |

6 | 7 |

8 | 9 | 10 | 11 | 12 | 13 | 14 | Platform 15 | 16 | Language 17 | 18 | 19 | License 20 | 21 | 22 | License 23 | 24 |

25 | 26 | ## Overview 27 | 🏖 LongWeekend is iOS Application that supports checking long weekends when taking a vacation in Japan
28 | Developed using SwiftUI and Combine 29 | 30 | ## Download 31 | 32 | badge 33 | 34 | 35 | ## Requirements 36 | - Swift5 or greater 37 | - Xcode12.5 or greater 38 | - [XcodeGen](https://github.com/yonaskolb/XcodeGen) 2.23.1 or greater 39 | 40 | ## Getting Start 41 | 1. If you haven't installed xcodegen yet, please install [XcodeGen](https://github.com/yonaskolb/XcodeGen) 42 | 2. Run this command 43 | ``` 44 | make bootstrap 45 | ``` 46 | 3. Open `LongWeekend.xcworkspace` 47 | 48 | ## GIF 49 | 50 | 51 | ## Usage 52 | 1. Tap setting button 53 | 2. Set date, segment, etc. 54 | 3. Tap save button 55 | 4. Back list view 56 | 5. 🏖 57 | 58 | 59 | ## Screenshot 60 | ### JP 61 | 62 | Main|Setting 63 | :-:|:-: 64 | | 65 | 66 | ### EN 67 | 68 | Main|Setting 69 | :-:|:-: 70 | | 71 | 72 | ### Appearance 73 | Light|Dark 74 | :-:|:-: 75 | | 76 | 77 | ## Contact 78 | If you discover problem or have opinions, please let me know through Github issues💁‍♂️ 79 | 80 | ## Author 81 | funzin 82 | - mail: nakazawa.fumito@gmail.com 83 | - twitter: [@_funzin](https://twitter.com/_funzin) 84 | 85 | ## License 86 | LongWeekend is available under the MIT license. See the [LICENSE](LICENSE.md) file for more info. 87 | -------------------------------------------------------------------------------- /Resource/Design/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Design/banner.png -------------------------------------------------------------------------------- /Resource/Design/design.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Design/design.sketch -------------------------------------------------------------------------------- /Resource/Design/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Design/icon.png -------------------------------------------------------------------------------- /Resource/GIF/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/GIF/demo.gif -------------------------------------------------------------------------------- /Resource/Image/darkmode/en/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Image/darkmode/en/main.png -------------------------------------------------------------------------------- /Resource/Image/darkmode/en/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Image/darkmode/en/setting.png -------------------------------------------------------------------------------- /Resource/Image/darkmode/jp/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Image/darkmode/jp/main.png -------------------------------------------------------------------------------- /Resource/Image/darkmode/jp/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Image/darkmode/jp/setting.png -------------------------------------------------------------------------------- /Resource/Image/default/en/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Image/default/en/main.png -------------------------------------------------------------------------------- /Resource/Image/default/en/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Image/default/en/setting.png -------------------------------------------------------------------------------- /Resource/Image/default/jp/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Image/default/jp/main.png -------------------------------------------------------------------------------- /Resource/Image/default/jp/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funzin/LongWeekend-iOS/645d3955a82ae234a0449a542be1074672c4c777/Resource/Image/default/jp/setting.png -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | comment: 2 | behavior: new 3 | -------------------------------------------------------------------------------- /fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | default_platform(:ios) 2 | 3 | platform :ios do 4 | desc "Upload appstore after test" 5 | lane :release_after_test do 6 | scan 7 | release 8 | end 9 | 10 | desc "Upload appstore" 11 | lane :release do 12 | increment_build_number 13 | build_app() 14 | upload_to_app_store(force: true) 15 | end 16 | end 17 | 18 | -------------------------------------------------------------------------------- /project.yml: -------------------------------------------------------------------------------- 1 | name: LongWeekend 2 | options: 3 | bundleIdPrefix: com.funzin 4 | minimumXcodeGenVersion: 2.23.1 5 | postGenCommand: make install-pod 6 | deploymentTarget: 7 | iOS: 13.0 8 | packages: 9 | SwiftyUserDefaults: 10 | url: https://github.com/sunshinejr/SwiftyUserDefaults 11 | version: 5.3.0 12 | HolidayJp: 13 | url: https://github.com/funzin/holiday_jp-swift 14 | branch: remove-unused-date 15 | Firebase: 16 | url: https://github.com/firebase/firebase-ios-sdk 17 | version: 8.0.0 18 | targets: 19 | LongWeekend: 20 | type: application 21 | platform: iOS 22 | sources: [LongWeekend] 23 | dependencies: 24 | - sdk: AppTrackingTransparency.framework 25 | weak: true 26 | - package: HolidayJp 27 | - package: SwiftyUserDefaults 28 | - package: Firebase 29 | product: FirebaseAnalytics 30 | settings: 31 | base: 32 | PRODUCT_BUNDLE_IDENTIFIER: com.funzin.longweekend 33 | MARKETING_VERSION: 2.0.0 34 | EXCLUDED_ARCHS[sdk=iphonesimulator*]: arm64 35 | CURRENT_PROJECT_VERSION: 1 36 | VERSIONING_SYSTEM: apple-generic 37 | INFOPLIST_FILE: LongWeekend/Resource/Info.plist 38 | CODE_SIGN_STYLE: Manual 39 | INFOPLIST_PREPROCESS: YES 40 | prebuildScripts: 41 | - name: Run swiftformat 42 | script: make swiftformat 43 | - name: Run LicensPlist 44 | script: | 45 | if [ $CONFIGURATION = "Debug" ]; then 46 | make license-plist 47 | fi 48 | - name: Configure Admob 49 | script: | 50 | plistBuddy="/usr/libexec/PlistBuddy" 51 | Resource="${SRCROOT}/LongWeekend/Resource/" 52 | infoPlistFileDestination="${TEMP_DIR}/Preprocessed-Info.plist" 53 | 54 | envPath="${SRCROOT}/.env" 55 | if [ -e $envPath ]; then 56 | . $envPath 57 | identifier=${GAD_APPLICATION_ID} 58 | echo ${infoPlistFileDestination} 59 | echo ${identifier} 60 | $plistBuddy -c "Set :GADApplicationIdentifier ${identifier}" ${infoPlistFileDestination} 61 | fi 62 | postbuildScripts: 63 | - name: Run SwiftLint 64 | script: make swiftlint 65 | scheme: 66 | gatherCoverageData: true 67 | testTargets: 68 | - LongWeekendTests 69 | LongWeekendTests: 70 | type: bundle.unit-test 71 | platform: iOS 72 | sources: [LongWeekendTests] 73 | dependencies: 74 | - target: LongWeekend 75 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /swiftgen.yml: -------------------------------------------------------------------------------- 1 | strings: 2 | inputs: 3 | - LongWeekend/Resource/Localizable/en.lproj/Localizable.strings 4 | outputs: 5 | - templatePath: ./CLI/_swiftgen/.build/checkouts/SwiftGen/templates/strings/structured-swift5.stencil 6 | output: LongWeekend/Source/Generated/Strings.swift 7 | --------------------------------------------------------------------------------