A target can build a unique product, or IPA package. Building a product requires not only source code, but also a series of compile-build configurations, such as build Setting. Different configurations will ultimately produce different IPA packages.
When setting build setting, build configration can be selected. The debug information format in build Options in the following figure can be set to different values for different configurations.
Build Setting can be configured with signature, app ID, app name, appicon, preprocessor macro definition. This means that we can build ipA packages with different appids and application names and ICONS by specifying different config.
Project->info->configurations
Here is oneconfigurations
The default menu bar is divided intodebug
andrelease
Debug
And then there are two more levels. The first level isproject
Level. The default value isnone
And the sublevel is zerotarget
Level. The default value isPod-xxx.debug
Release the same.
There is a plus sign, minus sign, which can be used to add or remove config. Here we select the Duplicate debug or Release configuration. For example, our company needs to build dandelion test packages and enterprise packages, assuming we both build Release packages, then we can copy release to create a Configuration.
The Edit Scheme -> right menu bar also has a build Configurations. Is a drop down option, and the default is two, debug and Release. You can see that the configuration here comes from Project ->info-> Configurations.
Pay attention to
- use
fastlane
When you pack, you need to set itconfiguration
Property, otherwise always hit yesrelease
The package.
desc "Description of what the lane does" lane :dis do gym( scheme:'scheme', export_method: 'app-store', configuration: 'Release', export_options:{provisioningProfiles:{"bundle_id" => "PP file name"}}) endCopy the code
After a whole morning’s work, I finally successfully printed the enterprise package and test package, but I don’t know why the release package cannot be installed.
Why? Is there a configuration problem?
I tried to upload the IPA package to dandelion, and it showed that it is only allowed to download through appstore. You can download it by scanning the code, but you cannot install it.
prompt
This App cannot be installed because its integrity cannot be verified.
I tried to install the release package of the appstore that I uploaded before, but it was also not allowed to install. Presumably, because I chose the release certificate, I could only install the appstore.
tips
Build setting
There is a preprocessing instruction in “eg”, where we can add some macros that define eg.With these predefined macro definitions, we can easily do some environment configuration in our code
#ifdef DEBUG
#define kBaseURL @"http://www.debug.com"
#elif ENTERPRISE
#define kBaseURL @"http://www.enterprise.com"
#elif PGYER
#define kBaseURL @"http://www.pgyer.com"
#else
#define kBaseURL @"http://www.release.com"
#endif
Copy the code
Refer to the article
Xcode uses a variety of Build Configuration – simple book