# fastlane-plugin-s3 `fastlane` Plugin [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-s3) ## Getting Started This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with fastlane-plugin-s3, add it to your project by running: ```bash fastlane add_plugin s3 ``` ## About s3 Upload a new build to Amazon S3 to distribute the build to beta testers. Works for both Ad Hoc and Enterprise signed applications. This step will generate the necessary HTML, plist, and version files for you. The `s3` action can upload both iOS apps (IPAs) and Android apps (APKs). It is **highly** suggested that you make a separate bucket for each of the apps. Add the `s3` action after the `gym` step: ```ruby s3 ``` You can also customize a lot of options: ```ruby s3( # All of these are used to make Shenzhen's `ipa distribute:s3` command access_key: ENV['S3_ACCESS_KEY'], # Required from user. secret_access_key: ENV['S3_SECRET_ACCESS_KEY'], # Required from user. bucket: ENV['S3_BUCKET'], # Required from user. region: ENV['S3_REGION'], # Required from user. ipa: 'AppName.ipa', # Required (if not uploading an APK). dsym: 'AppName.app.dSYM.zip', # Optional is you use `ipa` to build. apk: 'AppName.apk' # Required (if not uploading an IPA). path: 'v{CFBundleShortVersionString}_b{CFBundleVersion}/', # This is actually the default. upload_metadata: true, # Upload version.json, plist and HTML. Set to false to skip uploading of these files. version_file_name: 'app_version.json', # Name of the file to upload to S3. Defaults to 'version.json' version_template_path: 'path/to/erb' # Path to an ERB to configure the structure of the version JSON file ) ``` It is recommended to **not** store the AWS access keys in the `Fastfile`. The uploaded `version.json` file provides an easy way for apps to poll if a new update is available. The JSON looks like: ```json { "latestVersion": "<%= full_version %>", "updateUrl": "itms-services://?action=download-manifest&url=<%= url %>" } ``` ## Example Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`. **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary) ## Issues and Feedback For any other issues and feedback about this plugin, please submit it to this repository. ## Troubleshooting For some more detailed help with plugins problems, check out the [Plugins Troubleshooting](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/PluginsTroubleshooting.md) doc in the main `fastlane` repo. ## Using `fastlane` Plugins For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Plugins.md) in the main `fastlane` repo. ## About `fastlane` `fastlane` automates building, testing, and releasing your app for beta and app store distributions. To learn more about `fastlane`, check out [fastlane.tools](https://fastlane.tools).