一、前言
Android(APK)、iOS(IPA)在编译打包过程中需要检查release模式还是debug模式。
二、方案
首选需要明确概念,编译存在debug和release两种模式,证书签名也存在debug和release两种,甚至可以对debug编译包以release证书签字。
因而需要既检查签字,又要检查编译模式。
1) Android。
APK目前已基本使用Andriod Studio开发了,编译、打包自然也使用该IDE。实际底层是使用gradle工具编译、打包的。
2)iOS。
IPA解压后便是APP。
IPA目前采用xcode开发、编译、Archive。实际底层是使用xcodebuild命令编译、打包的。
xcode在编译过程中存在以下环境变量记录编译细节。
ENABLE_BITCODE --- 要求值为no