Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

203
Visualizações
Building an ionic 2/cordova app on PhoneGap in production mode

CONTEXT

  • I am building a Cordova / Ionic 2 application for iOS.
  • The application is built on PhoneGap build website to generate the ipa.
  • The application is generated successfully and I can launch the application

PROBLEM

I defined some configurations for development and for production using

process.env.IONIC_ENV === 'prod' switch in one of my angular module file. But when i'm running the application, it's clearly running the development configuration.

I also uncompressed and checked the resulting ipa www/build/main.js file and went to look for my environment module.

The snippet that was looking for the environment variable which was originally

useValue: process.env.IONIC_ENV === 'prod' ? ProdEnv : DevEnv

Had been converted to:

useValue: false ? ProdEnv : __WEBPACK_IMPORTED_MODULE_2__environment_dev__

It clearly show me that the preprocessor runned and converted the check into false, which imply that my build is not running with the IONIC_ENV set to 'prod'

QUESTION

How do I make Phonegap build build my iOS application in production mode?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

PhoneGap Build builds each native mobile app using the exact code files you give it - there's no concept of "dev" vs. "prod". Based on the reference to "process.env.IONIC_ENV", I'm guessing you're using Ionic's App Scripts to precompile your app. I'm not familiar with them, but based on the available tasks, you'd run: build --prod before uploading the code to PhoneGap Build.

PhoneGap Build does have an API, so technically you could "make" Build create your app in production mode by using those scripts plus your own to "build --prod" then upload the app via their API.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda