only-bible-app v3.7.2+24

#kotlin#android#ios

git clone https://git.pyrossh.dev/only-bible-app

The only bible app you will ever need. No ads. No in-app purchases. No distractions.


ios/fastlane/Fastfile
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)

# Screenshots are left untouched by default (regenerating/uploading them on
# every release is slow and usually a no-op since the UI rarely changes).
# Opt in with `fastlane release update_screenshots:true` or
# `UPDATE_SCREENSHOTS=true fastlane release`.
def update_screenshots_requested?(options)
  options[:update_screenshots] || %w[1 true].include?(ENV["UPDATE_SCREENSHOTS"])
end

platform :ios do
  desc "Get App Store Connect API key"
  lane :api_key do
    app_store_connect_api_key(
      key_id: "CB6LCVYFTC",
      issuer_id: "abc54778-7886-4294-8e5c-ef9f7bb0827d",
      key_filepath: "../certs/AuthKey_CB6LCVYFTC.p8",
      duration: 1200,
      in_house: false
    )
  end

  desc "Ensure signing certificate and provisioning profile exist"
  lane :certs do
    api_key = api_key()
    cert(platform: "ios", api_key: api_key, output_path: "../certs")
    sigh(platform: "ios", app_identifier: "sh.pyros.only-bible-app", api_key: api_key, output_path: "../certs")
  end

  desc "Regenerate App Store screenshots from the Flutter golden tests"
  lane :screenshots do
    sh("cd ../.. && flutter test test/screenshot_test.dart --update-goldens")
  end

  desc "Push a new release build to the App Store"
  lane :release do |options|
    update_screenshots = update_screenshots_requested?(options)
    screenshots if update_screenshots
    certs
    # `build_app` runs `xcodebuild` directly, which never regenerates
    # ios/Flutter/Generated.xcconfig - only the `flutter` CLI does that. Without
    # this, CFBundleShortVersionString/CFBundleVersion stay pinned to whatever
    # version was baked in by the last `flutter build`/`flutter run`, ignoring
    # bumps to pubspec.yaml. `--config-only` refreshes the config without
    # performing a duplicate build.
    sh("cd ../.. && flutter build ios --release --config-only")
    build_app(
      workspace: "Runner.xcworkspace",
      scheme: "Runner",
      export_options: {
        provisioningProfiles: {
          "sh.pyros.only-bible-app" => lane_context[SharedValues::SIGH_NAME]
        }
      },
      # Matches the path the `upload` lane's `deliver` call below expects -
      # gym's default ("./Runner.ipa") doesn't, which would make `upload`
      # look for an ipa that was never built there.
      output_directory: "../build/ios/ipa",
      output_name: "only-bible-app"
    )
    upload(update_screenshots: update_screenshots)
  end

  desc "Upload a pre-built IPA to the App Store"
  lane :upload do |options|
    update_screenshots = update_screenshots_requested?(options)
    api_key = api_key()
    deliver(
      api_key: api_key,
      ipa: "../build/ios/ipa/only-bible-app.ipa",
      automatic_release: true,
      submit_for_review: true,
      precheck_include_in_app_purchases: false,
      skip_screenshots: !update_screenshots,
      overwrite_screenshots: update_screenshots
    )
  end
end