Last active
January 13, 2019 00:10
-
-
Save mariohercules/c204044ee9234bc620583e5ca622b3e8 to your computer and use it in GitHub Desktop.
nvm-ionic - build and run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Passo 1 - Instalar NVM | |
$ git clone git://github.com/creationix/nvm.git ~/.nvm | |
## Criar arquivo .bash_profile do usuario para inclusão das chamadas NVM | |
* Abrir uma nova tela do Terminal | |
* Digitar "cd ~/" para ir para a pasta principal do usuario | |
* Digitar "touch .bash_profile" para criar um novo arquivo vazio. | |
* Editar .bash_profile com o editor padrão (ou apenas digitar "open -e .bash_profile" para abrir no TextEdit. | |
* Colar o texto abaixo e salvar o arquivo: | |
``` | |
printf "\n\n# NVM\nif [ -s ~/.nvm/nvm.sh ]; then\n\tNVM_DIR=~/.nvm\n\tsource ~/.nvm/nvm.sh\nfi" >> ~/.bashrc | |
NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh | |
``` | |
* Digitar ". .bash_profile" para carregar .bash_profile e atualizar com as funções adicionadas. | |
## Passo 2 - Configurar ambiente compatível com projeto | |
$ nvm install 6.4.0 | |
$ nvm use 6.4.0 | |
$ npm install -g ionic@2.1.2 | |
$ npm install -g cordova@7.1.0 | |
$ gem install sass | |
#### ERRO Instalando 'gem install sass' executar o passo ##### | |
$ xcode-select --install | |
$ npm install -g gulp@3.9.1 | |
## Passo 3 - Clonar repo bitbucket do projeto | |
$ git clone git@bitbucket.org:deway2/idelivery-ionic-indaia.git | |
$ cd idelivery-ionic-indaia/ | |
* Passo 3.1 - Alterar o arquivo config.xml as entradas abaixos: | |
DE: <widget id="br.com.ideliveryapp.indaia" version="1.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | |
PARA: <widget id="br.com.indaia.app" version="1.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | |
DE: | |
<plugin name="cordova-plugin-facebook4" spec="^1.10.1"> | |
<variable name="APP_NAME" value="Indaiá" /> | |
<variable name="APP_ID" value="174161040005862" /> | |
</plugin> | |
PARA: | |
<plugin name="cordova-plugin-facebook4" spec="^1.10.1"> | |
<variable name="APP_NAME" value="Indaiá App" /> | |
<variable name="APP_ID" value="489667448198141" /> | |
</plugin> | |
* Passo 3.1 - Alterar o arquivo www/js/config.js com os valores abaixo: | |
``` | |
ESTABLISHMENT_SLUG: 'br.com.indaia.app' | |
``` | |
* Passo 3.2 - Alterar o arquivo customer-settings/indaia/settings.json com todo o conteudo e os valores abaixo: | |
``` | |
{ | |
"config": "var configIDL = { ESTABLISHMENT_ID: null, \n ESTABLISHMENT_SLUG: 'br.com.indaia.app', \n ESTABLISHMENT_NAME: 'Indaiá', \n SENDER_ID: '741452195343', \n ANALYTICS_ID: 'UA-110409002-1', \n LIST_LAYOUT: 'list', \n MENU_STYLE: 2, \n OPTIONAL_RECEIPT: 1, \n COMMENTS_TEXT: 'Observações', \n SHOW_SCHEDULE: true, \n SERVERS: [\n'http://idlnotifications.deway.com.br/servers.json', \n 'https://ideliveryapp.com.br/servers.json' \n], \n PAY_TYPES: [ \n { \n id: 1, name: 'Espécie', negative_id: -1 \n},\n { \n id: 2, name: 'Cartão', negative_id: -2 \n} \n ] \n };", | |
"id": "br.com.indaia.app", | |
"name": "Indaiá", | |
"senderId": "741452195343", | |
"style": "$positive: #4cb7dc !default; \n$balanced: #000 !default; \n$calm: #4cb7dc !default; \n$stable: #4cb7dc !default; \n$energized: #FFF !default; \n$royal: #4cb7dc !default; \n$assertive: #4cb7dc; \n$bg-color: #F4F4F4 !default; \n$bg-color-optional: #F8F8F8 !default;", | |
"facebookAppId": "489667448198141", | |
"facebookAppName": "Indaiá App" | |
} | |
``` | |
#### Gerar ambiente e configurações | |
$ npm install | |
$ gulp | |
$ mkdir resources | |
$ cp customer-settings/indaia/splash.png resources/ | |
$ cp customer-settings/indaia/icon.png resources/ | |
## Passo 4 - Compilar | |
#### Se ERRO falta de arquivos ##### | |
$ ionic resources --splash | |
$ ionic resources --icon | |
#### Android | |
$ ionic resources android | |
$ ionic resources ios | |
$ cordova platform rm android && cordova platform add android | |
$ cordova build android | |
#### iOS | |
* Ambientes com Xcode <= 9.3.1 | |
$ cordova build ios | |
$ cordova run ios | |
* Ambientes com Xcode >= 10.1 | |
$ cordova build ios --buildFlag="-UseModernBuildSystem=0" | |
$ cordova run ios --buildFlag='-UseModernBuildSystem=0' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment