{"_id":"566b532068eba90d009cac6c","user":"561b45c2ab412a0d004d85d6","version":{"_id":"561ae15463ef571900ca68d6","project":"561ae15363ef571900ca68d3","__v":3,"createdAt":"2015-10-11T22:23:16.492Z","releaseDate":"2015-10-11T22:23:16.492Z","categories":["561ae15563ef571900ca68d7","56255c864dcb400d00ff4427","56326faf45f2cb0d006be3f1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"githubsync":"","project":"561ae15363ef571900ca68d3","__v":24,"category":{"_id":"561ae15563ef571900ca68d7","version":"561ae15463ef571900ca68d6","pages":["561ae15563ef571900ca68d9","561af2911a10ea0d002387f7","561af4a878436c19009e87d8","561c3b3400e13c0d00936286","56327cdb38f8aa0d00d30f6e","566b532068eba90d009cac6c","5672df821e18b60d00b04a32"],"project":"561ae15363ef571900ca68d3","__v":7,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-11T22:23:17.043Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-11T22:50:08.867Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"The AppHub CLI is a simple tool that lets you generate AppHub-ready zip files from your React Native projects. You can then upload these zip files to AppHub to create new releases of your app. \n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Install AppHub from npm\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"npm install --save apphub\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Build your project\"\n}\n[/block]\nRun the following command from the root of your React Native project:\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"The CLI only works for versions of React Native 0.14.0+. For older versions of React Native, build an .ipa file and upload the file using the same methods.\",\n  \"title\": \"React Native 0.14.0+ only\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"React Native Cache\",\n  \"body\": \"The React Native bundler can occasionally cache old files. Running `rm -rf $TMPDIR/react-*` before a build will clear this cache.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"node_modules/.bin/apphub build -o build.zip\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nUse `node_modules/.bin/apphub build --help` for additional build configurations.\n\nThis command uses `Info.plist` to determine the native version of your app. In some cases, you may have to specify the relative path to this `Info.plist` file:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"node_modules/.bin/apphub build -o build.zip --plist-file ./iOS/Info.plist\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"3. Upload the build\"\n}\n[/block]\nEither use the [AppHub Dashboard](doc:using-the-dashboard) or the [REST API](doc:rest-api) to upload the generated zip file.","excerpt":"Creating new AppHub builds with the AppHub CLI.","slug":"apphub-cli","type":"basic","title":"Creating New AppHub Builds"}

Creating New AppHub Builds

Creating new AppHub builds with the AppHub CLI.

The AppHub CLI is a simple tool that lets you generate AppHub-ready zip files from your React Native projects. You can then upload these zip files to AppHub to create new releases of your app. [block:api-header] { "type": "basic", "title": "1. Install AppHub from npm" } [/block] [block:code] { "codes": [ { "code": "npm install --save apphub", "language": "shell" } ] } [/block] [block:api-header] { "type": "basic", "title": "2. Build your project" } [/block] Run the following command from the root of your React Native project: [block:callout] { "type": "warning", "body": "The CLI only works for versions of React Native 0.14.0+. For older versions of React Native, build an .ipa file and upload the file using the same methods.", "title": "React Native 0.14.0+ only" } [/block] [block:callout] { "type": "warning", "title": "React Native Cache", "body": "The React Native bundler can occasionally cache old files. Running `rm -rf $TMPDIR/react-*` before a build will clear this cache." } [/block] [block:code] { "codes": [ { "code": "node_modules/.bin/apphub build -o build.zip", "language": "shell" } ] } [/block] Use `node_modules/.bin/apphub build --help` for additional build configurations. This command uses `Info.plist` to determine the native version of your app. In some cases, you may have to specify the relative path to this `Info.plist` file: [block:code] { "codes": [ { "code": "node_modules/.bin/apphub build -o build.zip --plist-file ./iOS/Info.plist", "language": "shell" } ] } [/block] [block:api-header] { "type": "basic", "title": "3. Upload the build" } [/block] Either use the [AppHub Dashboard](doc:using-the-dashboard) or the [REST API](doc:rest-api) to upload the generated zip file.