new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Expo · EAS · all subjects

build-reference/ios-builds

94 notes in this subject, read out of this brain and free to use. This is page 2 of 2.

Remote step: cache restoration

EAS Build restores a previously saved cache identified by the cache.key value in the build profile.

Remote step: pod install execution

EAS Build runs pod install in the ios directory inside the project.

Remote step: eas-build-post-install script execution

EAS Build runs the eas-build-post-install script from package.json if defined, after running pod install.

Remote step: Xcode project Provisioning Profile update

EAS Build updates the Xcode project with the ID of the Provisioning Profile.

Remote step: Gymfile creation

EAS Build creates a Gymfile in the ios directory if it does not already exist.

Remote step: fastlane gym execution

EAS Build runs fastlane gym in the ios directory to perform the actual build.

Remote step: cache storage

EAS Build stores a cache of files and directories defined in the build profile. Podfile.lock is cached by default. Subsequent builds will restore this cache.

Remote step: application archive upload

EAS Build uploads the application archive to a private GCS bucket. The artifact path can be configured in eas.json at builds.ios.PROFILE_NAME.applicationArchivePath and defaults to ios/build/App.ipa. A glob-like pattern can be specified for applicationArchivePath.

Remote step: eas-build-on-success script execution

If the build was successful, EAS Build runs the eas-build-on-success script from package.json if defined.

Remote step: eas-build-on-error script execution

If the build failed, EAS Build runs the eas-build-on-error script from package.json if defined.

Remote step: eas-build-on-complete script execution

EAS Build runs the eas-build-on-complete script from package.json if defined. The EAS_BUILD_STATUS environment variable is set to either finished or errored.

Remote step: build artifacts upload

EAS Build uploads the build artifacts archive to a private GCS bucket if buildArtifactPaths is specified in the build profile.

iOS building uses Fastlane gym

EAS Build uses Fastlane, specifically the fastlane gym command, for building iOS projects. This command allows declaring build configuration in a Gymfile.

Custom Gymfile placement

EAS Build can use a custom Gymfile by placing the file in the ios directory.

Default Gymfile configuration example

If ios/Gymfile does not exist, EAS Build creates a default one with the following configuration: suppress_xcode_output(true), clean(true), scheme("app"), export_options with method "app-store" and provisioning profile mapping, export_xcargs with keychain path, disable_xcpretty(true), output_directory("./build"), and output_name("App").

Inspect Xcode logs in local iOS builds

When using `EAS_LOCAL_BUILD_SKIP_CLEANUP` and `EAS_LOCAL_BUILD_WORKINGDIR` for iOS builds, you can inspect Xcode logs by reading the contents of the `logs` subdirectory in the working directory.

EAS Build default npm cache registry for iOS

By default, EAS Build for iOS uses a self-hosted npm cache configured with the registry URL http://10.254.24.8:4873. This is set in the .npmrc file automatically for all iOS builds.

Install build on simulator during build process

Once the build is completed, the CLI will prompt you to automatically download and install it on the iOS Simulator. Press Y when prompted to directly install it on the simulator.

No Apple Developer account required for simulator builds

Building for an iOS Simulator provides a standalone version of the app running without needing to deploy to TestFlight or having an Apple Developer account.

Start development server after installing development build

When the build's installation is complete on the simulator and it's a development build, open a terminal window and start the development server by running the command 'npx expo start'.

Assign different iOS schemes to build profiles

In eas.json, assign a different scheme to each build profile in the ios section. For example, development profile uses scheme "myapp-dev" and production profile uses scheme "myapp".

Example eas.json with iOS schemes for variants

{ "build": { "development": { "ios": { "buildConfiguration": "Debug", "scheme": "myapp-dev" } }, "production": { "ios": { "buildConfiguration": "Release", "scheme": "myapp" } } } }

Create abstract target in iOS Podfile for shared configuration

Replace individual targets in Podfile with an abstract_target containing common configuration, then define concrete targets for each app variant. For example, abstract_target 'common' contains targets 'myapp' and 'myapp-dev' to share pod dependencies.

Duplicate iOS target in Xcode for app variants

In Xcode, right-click the existing target in the navigation panel and select Duplicate to create a new target for the variant. Rename the duplicated target to match the scheme name, for example 'myapp-dev'.

Create and configure iOS scheme for variant

Go to Product > Scheme > Manage schemes in Xcode. Find the duplicated scheme and rename it to match the variant name, for example 'myapp copy' to 'myapp-dev'. Uncheck then check the Shared checkbox to generate the .xcscheme file in ios/myapp.xcodeproj/xcshareddata/xcschemes.

Use shared Info.plist for iOS variant targets

To simplify the project, delete the separate Info.plist created for the duplicated target. In Build Settings for the new target, find the Packaging section and change the Info.plist value to point to the shared Info.plist file, for example ios/myapp/Info.plist.

Customize iOS app display name per variant

In Info.plist, add the key 'Bundle display name' with value '$(DISPLAY_NAME)'. In Build Settings for each target, add a user-defined key DISPLAY_NAME with the desired display name for that variant.

Customize iOS app icon per variant

Create a new image set in the asset catalog for the variant icon. In Build Settings for the target, find 'Asset Catalog Compiler - Options' section and change 'Primary App Icon Set Name' to the name of the new image set.

eas/configure_ios_credentials function

The eas/configure_ios_credentials function is only available for iOS builds. It configures iOS credentials on the builder. Modifies the configuration of the Xcode project by assigning provisioning profiles to the targets. It has the following properties: name (optional, defaults to 'Configure iOS credentials'), inputs.build_configuration (optional, string, defaults to ${ eas.job.buildConfiguration } or resolved to Debug for development client or Release for other builds), inputs.credentials (optional, json, defaults to ${ eas.job.secrets.buildCredentials }).

eas/configure_ios_version function

The eas/configure_ios_version function is only available for iOS builds. It configures the version of your iOS app. It's used to set a version when using remote app version management. It is not mandatory to use this function; if not used the version from native code generated during the prebuild phase will be used. It has the following properties: name (optional, defaults to 'Configure iOS version'), inputs.build_number (optional, string, defaults to ${ eas.job.version.buildNumber }), inputs.app_version (optional, string, defaults to ${ eas.job.version.appVersion }), inputs.build_configuration (optional, string, defaults to ${ eas.job.buildConfiguration }), inputs.credentials (optional, json, defaults to ${ eas.job.secrets.buildCredentials }).

eas/generate_gymfile_from_template function

The eas/generate_gymfile_from_template function is only available for iOS builds. It generates a Gymfile used to build the iOS app using Fastlane from a template. Two default templates are provided: one for builds with credentials and one for simulator builds. It has properties: name (optional, defaults to 'Generate Gymfile from template'), inputs.template (optional, string, custom Gymfile template), inputs.credentials (optional, json), inputs.build_configuration (optional, string), inputs.scheme (optional, string), inputs.clean (optional, boolean, defaults to true), inputs.extra (optional, json, extra values for template).

eas/run_fastlane function

The eas/run_fastlane function is only available for iOS builds. It runs the fastlane gym command against the Gymfile located in the ios project directory to build the iOS app.

Development build iOS simulator YAML configuration example

Example of simple simulator iOS build YAML config: ```yaml build: name: Simple simulator iOS build steps: - eas/checkout - eas/install_node_modules - eas/prebuild - run: name: Install pods working_directory: ./ios command: pod install - eas/generate_gymfile_from_template - eas/run_fastlane - eas/find_and_upload_build_artifacts ```

Production build iOS App Store YAML configuration example

Example of customized iOS App Store build: ```yaml build: name: Customized iOS App Store build example steps: - eas/checkout - eas/install_node_modules - eas/resolve_apple_team_id_from_credentials: id: resolve_apple_team_id_from_credentials - eas/prebuild: inputs: apple_team_id: ${ steps.resolve_apple_team_id_from_credentials.apple_team_id } - run: name: Install pods working_directory: ./ios command: pod install - eas/configure_ios_credentials - eas/generate_gymfile_from_template: inputs: credentials: ${ eas.job.secrets.buildCredentials } - eas/run_fastlane - eas/find_and_upload_build_artifacts ```

Give your agent this brain