All Projects → microsoft → Code Push

microsoft / Code Push

Licence: other
A cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users’ devices.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Code Push

Tus Js Client
A pure JavaScript client for the tus resumable upload protocol
Stars: ✭ 1,151 (-72.12%)
Mutual labels:  cordova, reactnative
Teleport Code Generators
A collection of code generators for modern JavaScript applications
Stars: ✭ 368 (-91.09%)
Mutual labels:  reactnative
Cordova Docs
Apache Cordova Documentation
Stars: ✭ 315 (-92.37%)
Mutual labels:  cordova
Vue2 Hybridapp Haoshiqi
vue2+vue-router+vuex+cordova 实现单页面webapp以及hybridapp
Stars: ✭ 332 (-91.96%)
Mutual labels:  cordova
Alita
A mobile React framework based on umi.
Stars: ✭ 322 (-92.2%)
Mutual labels:  cordova
Cordova Plugin Media
Apache Cordova Plugin media
Stars: ✭ 338 (-91.81%)
Mutual labels:  cordova
Status React
a free (libre) open source, mobile OS for Ethereum
Stars: ✭ 3,307 (-19.89%)
Mutual labels:  reactnative
React Native Clean Project
Automating the clean up of a React Native project
Stars: ✭ 399 (-90.33%)
Mutual labels:  reactnative
Rnlive
RNLive ----> react-native 仿映客直播 支持iOS/Android
Stars: ✭ 370 (-91.04%)
Mutual labels:  reactnative
Code Editor
Acode - powerful text/code editor for android
Stars: ✭ 325 (-92.13%)
Mutual labels:  cordova
Vue Cordova
Vue.js plugin for Cordova
Stars: ✭ 328 (-92.05%)
Mutual labels:  cordova
Melonjs
a fresh & lightweight javascript game engine
Stars: ✭ 3,721 (-9.86%)
Mutual labels:  cordova
Peeqo Robot
The world's first robot to interact through GIFs...'nuf said
Stars: ✭ 365 (-91.16%)
Mutual labels:  cordova
Reactnativecomponents
React Native组件大全,介绍React Native常用组件的使用方法和使用示例
Stars: ✭ 317 (-92.32%)
Mutual labels:  reactnative
Whu Library Seat Mobile
武汉大学图书馆助手 - 移动端
Stars: ✭ 374 (-90.94%)
Mutual labels:  cordova
Cordova Android
Apache Cordova Android
Stars: ✭ 3,285 (-20.42%)
Mutual labels:  cordova
Cordova Plugin Device
Apache Cordova Plugin device
Stars: ✭ 327 (-92.08%)
Mutual labels:  cordova
Cordova Plugin Imagepicker
🔥cordova相册仿微信多选插件
Stars: ✭ 337 (-91.84%)
Mutual labels:  cordova
Cordova Plugin Ionic Webview
Web View plugin for Cordova, specialized for Ionic apps.
Stars: ✭ 419 (-89.85%)
Mutual labels:  cordova
Cordova Plugman
Apache Cordova Plugman
Stars: ✭ 379 (-90.82%)
Mutual labels:  cordova

appcenterbanner

Sign up With App Center to use CodePush

CodePush

CodePush is a cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users' devices. It works by acting as a central repository that developers can publish updates to (JS, HTML, CSS and images), and that apps can query for updates from (using provided client SDK for Cordova and React Native). This allows you to have a more deterministic and direct engagement model with your userbase, when addressing bugs and/or adding small features that don't require you to re-build a binary and re-distribute it through the respective app stores.

To get started using CodePush, refer to our documentation, otherwise, read the following steps if you'd like to build/contribute to the project from source.

NOTE: If you need information about code-push management CLI, you can find it in v3.0.1.

Dev Setup

  • Install Node.js
  • Install Git
  • Clone the Repository: git clone https://github.com/Microsoft/code-push.git

Building

  • Run npm run setup to install the NPM dependencies of management SDK.
  • Run npm run build to build the management SDK for testing.
  • Run npm run build:release to build the release version of management SDK.

Running Tests

  • To run tests, run npm run test from the root of the project.
  • You can use debug mode for tests with .vscode/launch.json file.

Coding Conventions

  • Use double quotes for strings
  • Use four space tabs
  • Use camelCase for local variables and imported modules, PascalCase for types, and dash-case for file names

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

CodePush Management SDK (Node.js)

A JavaScript library for programmatically managing your CodePush account (e.g. creating apps, promoting releases), which allows authoring Node.js-based build and/or deployment scripts, without needing to shell out to the App Center CLI.

Getting Started

  1. Create a token to authenticate with the CodePush server using the following App Center CLI command:

    appcenter tokens create -d "DESCRIPTION_OF_THE_TOKEN"

    Please copy your API Token and keep it secret. You won't be able to see it again.

  2. Install the management SDK by running npm install code-push --save

  3. Import it using one of the following statement: (using ES6 syntax as applicable):

    • On commonjs environments:
    const CodePush = require("code-push");
    • Using ES6 syntax with tsconfig.json:
    import CodePush from "code-push";
  4. Create an instance of the CodePush class, passing it the API Token you created or retrieved in step #1:

    const codePush = new CodePush("YOUR_API_TOKEN");
  5. Begin automating the management of your account! For more details on what you can do with this codePush object, refer to the API reference section below.

API Reference

The code-push module exports a single class (typically referred to as CodePush), which represents a proxy to the CodePush account management REST API. This class has a single constructor for authenticating with the CodePush service, and a collection of instance methods that correspond to the commands in the App Center CLI, which allow you to programmatically control every aspect of your CodePush account.

Constructors

  • CodePush(accessKey: string) - Creates a new instance of the CodePush management SDK, using the specified access key to authenticated with the server.

Methods

Note: access key here refers to an AppCenter API Token.

  • addAccessKey(description: string): Promise<AccessKey> - Creates a new access key with the specified description (e.g. "VSTS CI").

  • addApp(name: string, os: string, platform: string, manuallyProvisionDeployments: boolean = false): Promise<App> - Creates a new CodePush app with the specified name, os, and platform. If the default deployments of "Staging" and "Production" are not desired, pass a value of true for the manuallyProvisionDeployments parameter.

  • addCollaborator(appName: string, email: string): Promise<void> - Adds the specified CodePush user as a collaborator to the specified CodePush app.

  • addDeployment(appName: string, deploymentName: string): Promise<Deployment> - Creates a new deployment with the specified name, and associated with the specified app.

  • clearDeploymentHistory(appName: string, deploymentName: string): Promise<void> - Clears the release history associated with the specified app deployment.

  • getAccessKey(accessKey: string): Promise<AccessKey> - Retrieves the metadata about the specific access key.

  • getAccessKeys(): Promise<AccessKey[]> - Retrieves the list of access keys associated with your CodePush account.

  • getApp(appName: string): Promise<App> - Retrieves the metadata about the specified app.

  • getApps(): Promise<App[]> - Retrieves the list of apps associated with your CodePush account.

  • getCollaborators(appName: string): Promise<CollaboratorMap> - Retrieves the list of collaborators associated with the specified app.

  • getDeployment(appName: string, deploymentName: string): Promise<Deployment> - Retrieves the metadata for the specified app deployment.

  • getDeploymentHistory(appName: string, deploymentName: string): Promise<Package[]> - Retrieves the list of releases that have been made to the specified app deployment.

  • getDeploymentMetrics(appName: string, deploymentName: string): Promise<DeploymentMetrics> - Retrieves the installation metrics for the specified app deployment.

  • getDeployments(appName: string): Promise<Deployment[]> - Retrieves the list of deployments associated with the specified app.

  • patchRelease(appName: string, deploymentName: string, label: string, updateMetadata: PackageInfo): Promise<void> - Updates the specified release's metadata with the given information.

  • promote(appName: string, sourceDeploymentName: string, destinationDeploymentName: string, updateMetadata: PackageInfo): Promise<Package> - Promotes the latest release from one deployment to another for the specified app and updates the release with the given metadata.

  • release(appName: string, deploymentName: string, updateContentsPath: string, targetBinaryVersion: string, updateMetadata: PackageInfo): Promise<Package> - Releases a new update to the specified deployment with the given metadata.

  • removeAccessKey(accessKey: string): Promise<void> - Removes the specified access key from your CodePush account.

  • removeApp(appName: string): Promise<void> - Deletes the specified CodePush app from your account.

  • removeCollaborator(appName: string, email: string): Promise<void> - Removes the specified account as a collaborator from the specified app.

  • removeDeployment(appName: string, deploymentName: string): Promise<void> - Removes the specified deployment from the specified app.

  • renameApp(oldAppName: string, newAppName: string): Promise<void> - Renames an existing app.

  • renameDeployment(appName: string, oldDeploymentName: string, newDeploymentName: string): Promise<void> - Renames an existing deployment within the specified app.

  • rollback(appName: string, deploymentName: string, targetRelease?: string): Promise<void> - Rolls back the latest release within the specified deployment. Optionally allows you to target a specific release in the deployment's history, as opposed to rolling to the previous release.

  • transferApp(appName: string, email: string): Promise<void> - Transfers the ownership of the specified app to the specified account.

Error Handling

When an error occurs in any of the methods, the promise will be rejected with a CodePushError object with the following properties:

  • message: A user-friendly message that describes the error.
  • statusCode: An HTTP response code that identifies the category of error:
    • CodePush.ERROR_GATEWAY_TIMEOUT: A network error prevented you from connecting to the CodePush server.
    • CodePush.ERROR_INTERNAL_SERVER: An error occurred internally on the CodePush server.
    • CodePush.ERROR_NOT_FOUND: The resource you are attempting to retrieve does not exist.
    • CodePush.ERROR_CONFLICT: The resource you are attempting to create already exists.
    • CodePush.ERROR_UNAUTHORIZED: The access key you configured is invalid or expired.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].