diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b37810c9..41292424 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -12,18 +12,16 @@ env: jobs: build: - runs-on: macos-10.15 + runs-on: macos-14 timeout-minutes: 30 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install HomeBrew run: | brew bundle || true cat Brewfile.lock.json || true - - name: Select Xcode - run: sudo xcode-select -s '/Applications/Xcode_12.2.app/Contents/Developer' - run: xcodebuild -version - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ env.CACHE_NUMBER }}-${{ hashFiles('**/Gemfile.lock') }} @@ -34,7 +32,7 @@ jobs: bundle config set deployment 'true' bundle config set clean 'true' bundle install --jobs 4 --retry 3 - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: Carthage key: ${{ runner.os }}-carthage-${{ env.CACHE_NUMBER }}-${{ hashFiles('Cartfile.resolved') }} @@ -48,7 +46,3 @@ jobs: - run: bundle exec fastlane ios build_swiftpm - run: bundle exec fastlane ios build_carthage_swift_example - run: bundle exec fastlane ios build_cocoapods_objc_example - - - - diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 21456d36..d9d2859c 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: macos-10.15 + runs-on: macos-14 timeout-minutes: 30 steps: - uses: actions/checkout@v2 @@ -16,8 +16,6 @@ jobs: run: | brew bundle || true cat Brewfile.lock.json || true - - name: Select Xcode - run: sudo xcode-select -s '/Applications/Xcode_12.1.app/Contents/Developer' - run: xcodebuild -version - uses: actions/cache@v2 with: @@ -33,7 +31,3 @@ jobs: - run: bundle exec fastlane ios create_pr_to_update_docs env: GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - - diff --git a/Gemfile b/Gemfile index fabecfa4..1db45de2 100644 --- a/Gemfile +++ b/Gemfile @@ -6,4 +6,5 @@ gem "danger-swiftlint" gem "jazzy" gem "cocoapods" plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') -eval_gemfile(plugins_path) if File.exist?(plugins_path) +# workaround for https://github.com/dependabot/dependabot-core/issues/1720 +eval_gemfile('fastlane/Pluginfile') if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock index 9b3181bc..7a40f346 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,75 +1,85 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.3) - activesupport (5.2.6) + CFPropertyList (3.0.7) + base64 + nkf + rexml + activesupport (7.1.3.4) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) - artifactory (3.0.15) + artifactory (3.0.17) atomos (0.1.3) - aws-eventstream (1.1.1) - aws-partitions (1.480.0) - aws-sdk-core (3.117.0) - aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) - aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.44.0) - aws-sdk-core (~> 3, >= 3.112.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.96.2) - aws-sdk-core (~> 3, >= 3.112.0) + aws-eventstream (1.3.0) + aws-partitions (1.953.0) + aws-sdk-core (3.201.1) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.8) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.88.0) + aws-sdk-core (~> 3, >= 3.201.0) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.156.0) + aws-sdk-core (~> 3, >= 3.201.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.4) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) - claide (1.0.3) + base64 (0.2.0) + bigdecimal (3.1.8) + claide (1.1.0) claide-plugins (0.9.2) cork nap open4 (~> 1.3) - cocoapods (1.10.1) - addressable (~> 2.6) + cocoapods (1.15.2) + addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.10.1) + cocoapods-core (= 1.15.2) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) fourflusher (>= 2.3.0, < 3.0) gh_inspector (~> 1.0) - molinillo (~> 0.6.6) + molinillo (~> 0.8.0) nap (~> 1.0) - ruby-macho (~> 1.4) - xcodeproj (>= 1.19.0, < 2.0) - cocoapods-core (1.10.1) - activesupport (> 5.0, < 6) - addressable (~> 2.6) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.15.2) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) fuzzy_match (~> 2.0.4) nap (~> 1.0) netrc (~> 0.11) - public_suffix + public_suffix (~> 4.0) typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.4) - cocoapods-downloader (1.4.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (2.1) cocoapods-plugins (1.0.0) nap - cocoapods-search (1.0.0) - cocoapods-trunk (1.5.0) + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) nap (>= 0.8, < 2.0) netrc (~> 0.11) cocoapods-try (1.2.0) @@ -77,46 +87,49 @@ GEM colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) - concurrent-ruby (1.1.9) + concurrent-ruby (1.3.3) + connection_pool (2.4.1) cork (0.3.0) colored2 (~> 3.1) - danger (8.3.1) + danger (9.4.3) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) cork (~> 0.1) - faraday (>= 0.9.0, < 2.0) + faraday (>= 0.9.0, < 3.0) faraday-http-cache (~> 2.0) - git (~> 1.7) + git (~> 1.13) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.0) no_proxy_fix - octokit (~> 4.7) + octokit (>= 4.0) terminal-table (>= 1, < 4) - danger-swiftlint (0.23.0) + danger-swiftlint (0.36.1) danger rake (> 10) - thor (~> 0.19) + thor (~> 1.0.0) declarative (0.0.20) - digest-crc (0.6.4) + digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.6) - emoji_regex (3.2.2) + domain_name (0.6.20240107) + dotenv (2.8.1) + drb (2.2.1) + emoji_regex (3.2.3) escape (0.0.4) - ethon (0.14.0) + ethon (0.16.0) ffi (>= 1.15.0) - excon (0.85.0) - faraday (1.5.1) + excon (0.111.0) + faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) + faraday-net_http_persistent (~> 1.0) faraday-patron (~> 1.0) - multipart-post (>= 1.2, < 3) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) faraday-cookie_jar (0.0.7) faraday (>= 0.8.0) @@ -124,23 +137,27 @@ GEM faraday-em_http (1.0.0) faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) - faraday-http-cache (2.2.0) + faraday-http-cache (2.5.1) faraday (>= 0.8) faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) - faraday_middleware (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.2.4) - fastlane (2.188.0) + fastimage (2.3.1) + fastlane (2.221.1) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) - colored + colored (~> 1.2) commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) @@ -150,37 +167,43 @@ GEM faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) - google-apis-androidpublisher_v3 (~> 0.1) + google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) google-cloud-storage (~> 1.31) highline (~> 2.0) + http-cookie (~> 1.0.5) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) - multipart-post (~> 2.0.0) + multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) + optparse (>= 0.1.1, < 1.0.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) + security (= 0.1.5) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) + terminal-table (~> 3) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) - fastlane-plugin-firebase_app_distribution (0.2.3) - ffi (1.15.3) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-plugin-firebase_app_distribution (0.9.1) + google-apis-firebaseappdistribution_v1 (~> 0.3.0) + google-apis-firebaseappdistribution_v1alpha (~> 0.2.0) + ffi (1.17.0) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - git (1.9.1) + git (1.19.1) + addressable (~> 2.8) rchardet (~> 1.8) - google-apis-androidpublisher_v3 (0.9.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-core (0.4.1) + google-apis-androidpublisher_v3 (0.54.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-core (0.11.3) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -188,129 +211,134 @@ GEM representable (~> 3.0) retriable (>= 2.0, < 4.a) rexml - webrick - google-apis-iamcredentials_v1 (0.6.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-playcustomapp_v1 (0.5.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-storage_v1 (0.6.0) - google-apis-core (>= 0.4, < 2.a) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) + google-apis-firebaseappdistribution_v1 (0.3.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-firebaseappdistribution_v1alpha (0.2.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-iamcredentials_v1 (0.17.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-playcustomapp_v1 (0.13.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-storage_v1 (0.31.0) + google-apis-core (>= 0.11.0, < 2.a) + google-cloud-core (1.7.0) + google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) - google-cloud-env (1.5.0) - faraday (>= 0.17.3, < 2.0) - google-cloud-errors (1.1.0) - google-cloud-storage (1.34.1) - addressable (~> 2.5) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) + google-cloud-errors (1.4.0) + google-cloud-storage (1.47.0) + addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.31.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (0.16.2) - faraday (>= 0.17.3, < 2.0) + googleauth (1.8.1) + faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) - memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (~> 0.14) + signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.4) + http-cookie (1.0.6) domain_name (~> 0.5) httpclient (2.8.3) - i18n (1.8.10) + i18n (1.14.5) concurrent-ruby (~> 1.0) - jazzy (0.13.7) + jazzy (0.15.1) cocoapods (~> 1.5) mustache (~> 1.1) - open4 + open4 (~> 1.3) redcarpet (~> 3.4) - rouge (>= 2.0.6, < 4.0) + rexml (>= 3.2.7, < 4.0) + rouge (>= 2.0.6, < 5.0) sassc (~> 2.1) sqlite3 (~> 1.3) xcinvoke (~> 0.3.0) - jmespath (1.4.0) - json (2.5.1) - jwt (2.2.3) - kramdown (2.3.1) + jmespath (1.6.2) + json (2.7.2) + jwt (2.8.2) + base64 + kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liferaft (0.0.6) - memoist (0.16.2) - mini_magick (4.11.0) - mini_mime (1.1.0) - minitest (5.14.4) - molinillo (0.6.6) + mini_magick (4.13.2) + mini_mime (1.1.5) + mini_portile2 (2.8.7) + minitest (5.24.1) + molinillo (0.8.0) multi_json (1.15.0) - multipart-post (2.0.0) + multipart-post (2.4.1) mustache (1.1.1) + mutex_m (0.2.0) nanaimo (0.3.0) nap (1.1.0) naturally (2.2.1) netrc (0.11.0) + nkf (0.2.0) no_proxy_fix (0.1.2) - octokit (4.21.0) - faraday (>= 0.9) - sawyer (~> 0.8.0, >= 0.5.3) + octokit (9.1.0) + faraday (>= 1, < 3) + sawyer (~> 0.9) open4 (1.3.4) - os (1.1.1) - plist (3.6.0) - public_suffix (4.0.6) - rake (13.0.6) + optparse (0.5.0) + os (1.1.4) + plist (3.7.1) + public_suffix (4.0.7) + rake (13.2.1) rchardet (1.8.0) - redcarpet (3.5.1) - representable (3.1.1) + redcarpet (3.6.0) + representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.5) + rexml (3.2.9) + strscan rouge (2.0.7) - ruby-macho (1.4.0) + ruby-macho (2.5.1) ruby2_keywords (0.0.5) rubyzip (2.3.2) sassc (2.4.0) ffi (~> 1.9) - sawyer (0.8.2) + sawyer (0.9.2) addressable (>= 2.3.5) - faraday (> 0.8, < 2.0) - security (0.1.3) - signet (0.15.0) - addressable (~> 2.3) - faraday (>= 0.17.3, < 2.0) + faraday (>= 0.17.3, < 3) + security (0.1.5) + signet (0.19.0) + addressable (~> 2.8) + faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - simctl (1.6.8) + simctl (1.6.10) CFPropertyList naturally - sqlite3 (1.4.2) + sqlite3 (1.7.3) + mini_portile2 (~> 2.8.0) + strscan (3.1.0) terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - thor (0.20.3) - thread_safe (0.3.6) - trailblazer-option (0.1.1) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.0.1) + trailblazer-option (0.1.2) tty-cursor (0.7.1) - tty-screen (0.8.1) + tty-screen (0.8.2) tty-spinner (0.9.3) tty-cursor (~> 0.7) - typhoeus (1.4.0) + typhoeus (1.4.1) ethon (>= 0.9.0) - tzinfo (1.2.9) - thread_safe (~> 0.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.7) - unicode-display_width (1.7.0) - webrick (1.7.0) + unicode-display_width (2.5.0) word_wrap (1.0.0) xcinvoke (0.3.0) liferaft (~> 0.0.6) - xcodeproj (1.20.0) + xcodeproj (1.24.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -334,4 +362,4 @@ DEPENDENCIES jazzy BUNDLED WITH - 2.1.4 + 2.4.13 diff --git a/PAYJP.xcodeproj/project.pbxproj b/PAYJP.xcodeproj/project.pbxproj index 2ac7c108..351d7477 100644 --- a/PAYJP.xcodeproj/project.pbxproj +++ b/PAYJP.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -1142,6 +1142,7 @@ DEVELOPMENT_TEAM = 8ZAC8P584F; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Tests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1163,6 +1164,7 @@ DEVELOPMENT_TEAM = 8ZAC8P584F; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Tests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/PAYJP.xcodeproj/xcshareddata/xcschemes/PAYJP.xcscheme b/PAYJP.xcodeproj/xcshareddata/xcschemes/PAYJP.xcscheme index b3dd6489..757a5d1d 100644 --- a/PAYJP.xcodeproj/xcshareddata/xcschemes/PAYJP.xcscheme +++ b/PAYJP.xcodeproj/xcshareddata/xcschemes/PAYJP.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -26,7 +26,8 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + language = "en"> + + diff --git a/Sources/Views/BrandImageCell.swift b/Sources/Views/BrandImageCell.swift index bcf4909b..7df6e377 100644 --- a/Sources/Views/BrandImageCell.swift +++ b/Sources/Views/BrandImageCell.swift @@ -12,10 +12,6 @@ class BrandImageCell: UICollectionViewCell { @IBOutlet weak var brandImage: UIImageView! - override func awakeFromNib() { - super.awakeFromNib() - } - func setup(brand: CardBrand) { brandImage.image = brand.logoImage } diff --git a/Sources/Views/CardFormView.swift b/Sources/Views/CardFormView.swift index af2a6da3..310c48cb 100644 --- a/Sources/Views/CardFormView.swift +++ b/Sources/Views/CardFormView.swift @@ -328,7 +328,7 @@ public class CardFormView: UIView { let settingsAction = UIAlertAction( title: "payjp_common_settings".localized, style: .default, - handler: { (_) -> Void in + handler: { (_) in guard let settingsURL = URL(string: UIApplication.openSettingsURLString ) else { return } diff --git a/Tests/Core/PAYJPSDKTests.m b/Tests/Core/PAYJPSDKTests.m index 49daf23e..25ec428e 100644 --- a/Tests/Core/PAYJPSDKTests.m +++ b/Tests/Core/PAYJPSDKTests.m @@ -29,7 +29,7 @@ - (void)testValuesSet { PAYJPSDK.locale = mockLocale; XCTAssertEqual(PAYJPSDK.publicKey, mockPublicKey); - XCTAssertEqual(PAYJPSDK.locale, mockLocale); + XCTAssertEqual(PAYJPSDK.locale.localeIdentifier, mockLocale.localeIdentifier); } @end diff --git a/example-swift/Cartfile b/example-swift/Cartfile index acd510aa..98d311ee 100644 --- a/example-swift/Cartfile +++ b/example-swift/Cartfile @@ -1,2 +1,3 @@ # github "payjp/payjp-ios" -git "../" "HEAD" \ No newline at end of file +git "../" "HEAD" + diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 2afb605d..18582484 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -21,7 +21,7 @@ platform :ios do desc "Run carthage bootstrap" lane :carthage_bootstrap do Dir.chdir('..') do - sh('carthage bootstrap --use-xcframeworks --platform iOS --cache-builds') + sh('scripts/carthage.sh bootstrap --use-xcframeworks --platform iOS --cache-builds') end end @@ -29,7 +29,7 @@ platform :ios do lane :test do scan( scheme: 'PAYJP', - device: 'iPhone 11 Pro', + device: 'iPhone 15 Pro', configuration: 'Debug', skip_slack: true ) @@ -219,7 +219,7 @@ platform :ios do desc "Build with Package.swift" lane :build_swiftpm do - sh('swift build -v -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.0-simulator"') + sh('swift build -v --sdk `xcrun --sdk iphonesimulator --show-sdk-path` -Xswiftc "-target" -Xswiftc "arm64-apple-ios17.5-simulator"') end desc "Build carthage-swift example app" diff --git a/fastlane/README.md b/fastlane/README.md index 58c4dd34..4122c51c 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -1,84 +1,120 @@ fastlane documentation -================ +---- + # Installation Make sure you have the latest version of the Xcode command line tools installed: -``` +```sh xcode-select --install ``` -Install _fastlane_ using -``` -[sudo] gem install fastlane -NV -``` -or alternatively using `brew install fastlane` +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) # Available Actions + ## iOS + ### ios carthage_bootstrap + +```sh +[bundle exec] fastlane ios carthage_bootstrap ``` -fastlane ios carthage_bootstrap -``` + Run carthage bootstrap + ### ios test + +```sh +[bundle exec] fastlane ios test ``` -fastlane ios test -``` + Run test + ### ios lint_podspec + +```sh +[bundle exec] fastlane ios lint_podspec ``` -fastlane ios lint_podspec -``` + Lint podspec + ### ios bump_up_version + +```sh +[bundle exec] fastlane ios bump_up_version ``` -fastlane ios bump_up_version -``` + Bump up next version + ### ios create_pr_to_public + +```sh +[bundle exec] fastlane ios create_pr_to_public ``` -fastlane ios create_pr_to_public -``` + Create GitHub PR to `payjp/payjp-ios` from internal repo. (internal only) + ### ios check_swift_format + +```sh +[bundle exec] fastlane ios check_swift_format ``` -fastlane ios check_swift_format -``` + Check Swift format with swiftLint + ### ios check_objc_format + +```sh +[bundle exec] fastlane ios check_objc_format ``` -fastlane ios check_objc_format -``` + Check Objective-C format with clang-format + ### ios create_pr_to_update_docs + +```sh +[bundle exec] fastlane ios create_pr_to_update_docs ``` -fastlane ios create_pr_to_update_docs -``` + Create PR to update docs + ### ios distribute_sample_app + +```sh +[bundle exec] fastlane ios distribute_sample_app ``` -fastlane ios distribute_sample_app -``` + Distribute sample app with Firebase App Distribution + ### ios build_swiftpm + +```sh +[bundle exec] fastlane ios build_swiftpm ``` -fastlane ios build_swiftpm -``` + Build with Package.swift + ### ios build_carthage_swift_example + +```sh +[bundle exec] fastlane ios build_carthage_swift_example ``` -fastlane ios build_carthage_swift_example -``` + Build carthage-swift example app + ### ios build_cocoapods_objc_example + +```sh +[bundle exec] fastlane ios build_cocoapods_objc_example ``` -fastlane ios build_cocoapods_objc_example -``` + Build cocoapods-objc example app ---- This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. -More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). -The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools). + +More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). + +The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/scripts/carthage.sh b/scripts/carthage.sh new file mode 100755 index 00000000..0c1f7613 --- /dev/null +++ b/scripts/carthage.sh @@ -0,0 +1,12 @@ +# carthage.sh +# Usage example: ./carthage.sh build --platform iOS + +set -euo pipefail + +xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) +trap 'rm -f "$xcconfig"' INT TERM HUP EXIT + +echo "IPHONEOS_DEPLOYMENT_TARGET = 11.0" >> $xcconfig + +export XCODE_XCCONFIG_FILE="$xcconfig" +carthage "$@" \ No newline at end of file