Skip to content

Latest commit

 

History

History
147 lines (99 loc) · 3.82 KB

README.md

File metadata and controls

147 lines (99 loc) · 3.82 KB

Drive Mobile version

⛵ Compile yourself

🔧 Requirements

  • Node v8 (on macOS: brew install node@8 && brew link node@8)
  • ImageMagick (on macOS: brew install imagemagick)
  • Android SDK >= 25.0.0 to deploy on android
  • Xcode 8.1 >= to deploy on ios
  • Cordova v6 CLI (npm install cordova@6 -g)

📦 Install and run in dev mode

$ git clone https://github.com/cozy/cozy-drive.git
$ cd cozy-drive
$ yarn install

mobile specific:

$ yarn genicon:drive:mobile
$ yarn build:drive:mobile
$ yarn prepare:drive:mobile

or if you develop ➿:

$ yarn watch:drive:mobile

🚁 Deploy

After that, you can deploy with one of these commands:

On Android:

$ cd targets/drive/mobile
$ cordova run android

On iOS: open the mobile/platforms/ios/Cozy Drive.xcworkspace in Xcode, update the Swift syntax if needed, set your signing certificate on the target (if you're testing on a device), then:

$ cd targets/drive/mobile
$ cordova run ios

Standalone mode

  • Open your browser with web-security CORS disabled
  • launch $ yarn watch:mobile:standalone
  • Go to localhost:8084 in your browser and open the console
  • Follow the onboarding and after giving your cozy URL, click on the link logged in the console
  • Log yourself, accept permissions and copy the url you've been redirected to.
  • Return to your previous tab and paste the url in the prompt (be quick, or take your time, whatever, because the prompt may be blocked when it pops if you're still on the permissions tab)
  • Profit!

🔒 Create Release

Android

Create these folders:

$ mkdir targets/drive/mobile/keys
$ mkdir targets/drive/mobile/keys/android
$ mkdir targets/drive/mobile/build
$ mkdir targets/drive/mobile/build/android

You must have this files:

  • keys/android/cozy-drive-release-key.jks (and the password)
  • keys/android/key.json

To generate a signed APK on targets/drive/mobile/build/android/ and publish on Google Play:

$ npm run buildsigned:drive:android
$ npm run publish:drive:android

Or if you want to publish the release on the beta track:

$ npm run buildsigned:drive:android
$ npm run publishbeta:drive:android

iOS

Open XCode and sign in to your Apple account. This account should be part of the Cozy team with the proper access rights so you can download the Cozy Cloud signing certificates. Once you have the certificates, change the projects signing process to use these certificates and run:

$ npm run publish:drive:ios

🌈 Icons & Splashscreen

You can generate all icons with splashicon-generator.

$ yarn genicon:drive:mobile

Icon

Should be a 1024x1024px.

  • mobile/res/model/icon.png. On iOS add 5% margin
  • mobile/res/model/android/icon.png. Override the default icon for the 'android' platform. So you can use an icon with alpha, as apple doens't allow.

Splashscreen

Your splash must be 2732x2732px as it now is the largest resolution (used by iPad Pro 12.9"), and the artwork should fit a center square (1200x1200px). This Photoshop splash screen template provides the recommended size and guidelines of the artwork’s safe zone.

  • mobile/res/model/splash.png

🗞️ Uploading sourcemaps to Sentry

First, you will need to create a .sentryclirc file in ~/ that will contain the following data:

[defaults]
url=https://sentry.cozycloud.cc/
project=cozy-drive-dev
org=sentry
[auth]
token = {token}

Replace {token} with a token that you can generate by going to this page (Profile -> API). The token should have the project:write and project:releases permissions.

Once the file is created, and after you've ran the proper build commands, you can upload the sourcemaps with

$ yarn sentry:drive:mobile