precheck

Alias for the check_app_store_metadata action

precheck

Check your app using a community driven set of App Store review rules to avoid being rejected

Apple rejects builds for many avoidable metadata issues like including swear words ๐Ÿ˜ฎ, other companiesโ€™ trademarks, or even mentioning an iOS bug ๐Ÿ›. fastlane precheck takes a lot of the guess work out by scanning your appโ€™s details in App Store Connect for avoidable problems. fastlane precheck helps you get your app through app review without rejections so you can ship faster ๐Ÿš€


FeaturesUsageExampleHow does it work?


Features

precheck Features
๐Ÿ› ๏ฃฟ product bug mentions
๐Ÿ™… Swear word checker
๐Ÿค– Mentioning other platforms
๐Ÿ˜ต URL reachability checker
๐Ÿ“ Placeholder/test words/mentioning future features
๐Ÿ“… Copyright date checking
๐Ÿ™ˆ Customizable word list checking
๐Ÿ“ข You can decide if you want to warn about potential problems and continue or have fastlane show an error and stop after all scans are done

Usage

Run fastlane precheck to check the app metadata from App Store Connect

fastlane precheck

To get a list of available options run

fastlane action precheck

Example

Since you might want to manually trigger precheck but don't want to specify all the parameters every time, you can store your defaults in a so called Precheckfile.

Run fastlane precheck init to create a new configuration file. Example:

# indicates that your metadata will not be checked by this rule
negative_apple_sentiment(level: :skip)

# when triggered, this rule will warn you of a potential problem
curse_words(level: :warn)

# show error and prevent any further commands from running after fastlane precheck finishes
unreachable_urls(level: :error)

# pass in whatever words you want to check for
custom_text(data: ["chrome", "webos"], 
           level: :warn)

Use with fastlane

precheck is fully integrated with deliver another fastlane tool.

Update your Fastfile to contain the following code:

lane :production do
  # ...

  # by default deliver will call precheck and warn you of any problems
  # if you want precheck to halt submitting to app review, you can pass
  # precheck_default_rule_level: :error
  deliver(precheck_default_rule_level: :error)

  # ...
end

# or if you prefer, you can run precheck alone
lane :check_metadata do
  precheck
end

How does it work?

precheck will access App Store Connect to download your app's metadata. It uses spaceship to communicate with Apple's web services.

Want to improve precheck's rules?

Please submit an issue on GitHub and provide information about your App Store rejection! Make sure you scrub out any personally identifiable information since this will be public.


precheck
Supported platforms ios
Author @taquitos
Returns true if precheck passes, else, false

2 Examples

check_app_store_metadata(
  negative_apple_sentiment: [level: :skip], # Set to skip to not run the `negative_apple_sentiment` rule
  curse_words: [level: :warn] # Set to warn to only warn on curse word check failures
)
precheck   # alias for "check_app_store_metadata"

Parameters

Key Description Default
api_key_path Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)
api_key Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-hash-option)
app_identifier The bundle identifier of your app *
username Your Apple ID Username *
team_id The ID of your App Store Connect team if you're in multiple teams *
team_name The name of your App Store Connect team if you're in multiple teams *
platform The platform to use (optional) ios
default_rule_level The default rule level unless otherwise configured :error
include_in_app_purchases Should check in-app purchases? true
use_live Should force check live app? false
negative_apple_sentiment mentioning ๏ฃฟ in a way that could be considered negative
placeholder_text using placeholder text (e.g.:"lorem ipsum", "text here", etc...)
other_platforms mentioning other platforms, like Android or Blackberry
future_functionality mentioning features or content that is not currently available in your app
test_words using text indicating this release is a test
curse_words including words that might be considered objectionable
free_stuff_in_iap using text indicating that your IAP is free
custom_text mentioning any of the user-specified words passed to custom_text(data: [words])
copyright_date using a copyright date that is any different from this current year, or missing a date
unreachable_urls unreachable URLs in app metadata

* = default value is dependent on the user's system


Documentation

To show the documentation in your terminal, run

fastlane action precheck

CLI

It is recommended to add the above action into your Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal

fastlane run precheck

To pass parameters, make use of the : symbol, for example

fastlane run precheck parameter1:"value1" parameter2:"value2"

It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g. param:"1,2,3"). Hashes are not currently supported.

It is recommended to add all fastlane actions you use to your Fastfile.


Source code

This action, just like the rest of fastlane, is fully open source, view the source code on GitHub


Back to actions