Skip to content

Commit 1740c0c

Browse files
authored
Merge pull request mendix#8801 from jdiehl/moo/bitrise-integration-guide
Moo/bitrise integration guide
2 parents 76ee7ab + 0744dff commit 1740c0c

5 files changed

Lines changed: 152 additions & 3 deletions

File tree

content/en/docs/refguide/mobile/distributing-mobile-apps/building-native-apps/_index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ Many of these guides use the Mendix Native Mobile Builder UI tool included in Me
1717

1818
* [Build a Mendix Native App Locally](/refguide/mobile/distributing-mobile-apps/building-native-apps/native-build-locally/) – Follow this guide to build your apps locally using the Mendix Native Mobile Builder.
1919
* [Build a Mendix Native App Locally Manually](/refguide/mobile/distributing-mobile-apps/building-native-apps/native-build-locally-manually/) – Follow this guide to build your apps locally and without an internet connection.
20+
{{% alert color="warning" %}}
21+
Building mobile apps with App Center is deprecated and will be removed on March 30, 2025. Learn more about the new and improved ways to build mobile apps with Bitrise in [our documentation](/refguide/mobile/distributing-mobile-apps/building-native-apps/bitrise/).
22+
{{% /alert %}}
2023
* [Build a Mendix Native App in the Cloud](/refguide/mobile/distributing-mobile-apps/building-native-apps/deploying-native-app/) – Go from a blank slate to an app running on a device.
2124
* [Create a Custom Developer App](/refguide/mobile/distributing-mobile-apps/building-native-apps/how-to-devapps/) – Create a custom developer app (a substitute for the Make It Native app) which accommodates custom dependencies such as native widgets or fonts.
2225
* [Native Template](/refguide/mobile/distributing-mobile-apps/building-native-apps/native-template/) – The Native Template describes the native dependencies your app needs, and it includes two native apps (one for iOS and one for Android) that can be independently built to create the finished apps.
26+
* [Build a Mendix Native App with Bitrise](/refguide/mobile/distributing-mobile-apps/building-native-apps/bitrise/) – This guide explains how to set up Bitrise to build a Mendix native mobile app.
2327

2428
{{% alert color="info" %}}
25-
The Mendix Native Mobile Builder does not currently support connections behind proxy servers. Please make sure you are not behind a proxy server and that your security rules allow access to the required services.
29+
The Mendix Native Mobile Builder does not currently support connections behind proxy servers. Please make sure you are not behind a proxy server and that your security rules allow access to the required services. For more information, see the [Firewall Settings](/refguide/system-requirements/#firewall-settings) section of System Requirements.
2630
{{% /alert %}}
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
title: "Build a Mendix Native App with Bitrise"
3+
url: /refguide/mobile/distributing-mobile-apps/building-native-apps/bitrise/
4+
weight: 60
5+
description: Describes how to integrate with Bitrise to build a Mendix native app in the cloud.
6+
---
7+
8+
## Introduction
9+
10+
This guide helps you set up [Bitrise](https://bitrise.io) to automate building a Mendix native app in the cloud. Bitrise is a popular continuous integration service optimized for mobile apps.
11+
12+
## Prerequisites {#prerequisites}
13+
14+
Before starting this guide, make sure you have completed the following prerequisites:
15+
16+
* Signed up for a [GitHub account](https://github.com/signup) and created a personal access token
17+
* Signed up for a [Bitrise account](https://app.bitrise.io/users/sign_up)
18+
* Read the [Getting Starting guide from Bitrise](https://devcenter.bitrise.io/en/getting-started.html) and understand the key concepts of Bitrise
19+
* Have access to a Mendix application project with a native mobile profile as a developer
20+
* The Mendix application is deployed
21+
* Have created the native template project for your app by following [Using Mendix Native Mobile Builder to Set Up Your Local App](/refguide/mobile/distributing-mobile-apps/building-native-apps/native-build-locally/#using-mendix-native-mobile-builder-to-set-up-your-local-app). Make sure to set the GitHub token to also create a GitHub repository.
22+
* Fulfilled the prerequisites below for all operating systems you want to target:
23+
24+
### Prerequisites for iOS {#prerecs-ios}
25+
26+
* Signed up as an [Apple developer](https://developer.apple.com/programs/enroll/)
27+
* Joined the [Apple Developer Program](https://developer.apple.com/programs/) or the [Apple Developer Enterprise Program](https://developer.apple.com/programs/enterprise/)
28+
* You have access to an [Apple distribution certificate](https://developer.apple.com/help/account/create-certificates/create-developer-id-certificates)
29+
* You have [created an API Key for App Store Connect](https://developer.apple.com/documentation/appstoreconnectapi/creating-api-keys-for-app-store-connect-api)
30+
31+
### Prerequisites for Android {#prerecs-android}
32+
33+
* Signed up as an [Android developer](https://play.google.com/console/signup)
34+
* Created a Keystore [with Android Studio](https://developer.android.com/studio/publish/app-signing#generate-key) or [with Java](https://docs.oracle.com/cd/E19509-01/820-3503/ggfen/index.html)
35+
36+
## Set Up Your Build Project
37+
38+
To set up your build project, do the following:
39+
40+
1. Create a workspace (if needed) in Bitrise.
41+
1. Create a new project in the workspace.
42+
1. Select the GitHub project generated by **Build Native App** as the repository. It is recommended to use the **GitHub App Integration**:
43+
44+
{{< figure src="/attachments/refguide/mobile/distributing-mobile-apps/building-native-apps/bitrise/select-repository.png" alt="Select repository" width="350" class="no-border" >}}
45+
46+
1. Select the `master` branch and let Bitrise auto-detect the configuration.
47+
1. Confirm that the correct configuration has been detected:
48+
* Project type: `React Native`
49+
* Project directory: `.`
50+
* Root directory of Android project: `android`
51+
* Module: `app`
52+
* Variant: `appstoreRelease`
53+
* Project or Workspace path: `ios/NativeTempalte.xcworkspace`
54+
* Scheme name: `nativeTemplate`
55+
* Distribution method: [Choose the distribution method you want to use](https://developer.apple.com/videos/play/wwdc2019/304/)
56+
* Build stack: Choose the altest Xcode version compatible with your Mendix version
57+
1. Finish creating the project.
58+
1. Abort the build if one starts automatically (you first need to setup code signing and adjust the workflow).
59+
60+
## Setup Code Signing for iOS
61+
62+
Applications distributed to iOS devices must be signed with a certificate and a provisioning profile. To do so, you need to register as a developer with Apple and join one of their development programs (see [Prerequisites](#prerequisites)).
63+
64+
Bitrise supports automatic provisioning via a constant connection with the App Store. To set it up, follow [the guide from Bitrise](https://devcenter.bitrise.io/en/code-signing/ios-code-signing/managing-ios-code-signing-files---automatic-provisioning.html).
65+
66+
If you prefer to manually set up provisioning, follow [this guide from Bitrise](https://devcenter.bitrise.io/en/code-signing/ios-code-signing/managing-ios-code-signing-files---manual-provisioning.html) instead.
67+
68+
## Setup Code Signing for Android
69+
70+
Applications distributed to Android devices must be signed with a keystore. To distribute Android apps via the PlayStore, you must also register as an Android developer (see [Prerequisites](#prerequisites)).
71+
72+
Bitrise lets you store your Android keystore in the build project. Follow [this guide from Bitrise](https://devcenter.bitrise.io/en/code-signing/android-code-signing/uploading-android-keystore-files-to-bitrise.html) to upload and store the keystore.
73+
74+
## Adjust Workflow
75+
76+
The default workflow (**deploy**) needs to be extended to work for Mendix native mobile apps. Open the build project and click on **Workflow** to access the workflow editor. With it, you can customize the commands you run in order to build your application.
77+
78+
Any additional workflows that may have been created can be removed. Select the workflow from the dropdown and click **Properties** > **Delete workflow**.
79+
80+
### Add Missing npm Command
81+
82+
Add a missing npm command by doing the following:
83+
84+
1. Add a new step after the step "Run npm command".
85+
1. Choose **Run npm command** from the list of steps.
86+
1. Set the npm command with arguments to run to `run configure`.
87+
1. Save changes.
88+
89+
### Remove Unneeded Operating System Targets
90+
91+
By default, Bitrise targets both Android and iOS. If you do not need to build for both operating systems (OS), remove all actions related to that OS and skip all steps below related to it as well.
92+
93+
For example, if you only target iOS, you can remove the actions **Install missing Androide SDK components** and **Android Build**. This will significantly speed up your builds and save credits.
94+
95+
### Add Android Code Signing (Android only)
96+
97+
To add Android code signing, do the following:
98+
99+
1. Add a new step after the step **Android Build**.
100+
1. Choose **Android Sign** from the list of steps.
101+
1. Save changes.
102+
103+
Bitrise will use the uploaded keystore to sign the *.apk*.
104+
105+
### Add Cocoapods Install (iOS only)
106+
107+
To add Cocoapods install on iOS, do the following:
108+
109+
1. Add a new step before the step **Xcode Archive**.
110+
1. Choose **Run CocoaPods install** from the list of steps.
111+
1. Set Workdir to `$BITRISE_SOURCE_DIR/ios`
112+
1. Save changes.
113+
114+
This step will install the dependencies required for iOS.
115+
116+
### Add iOS Code Signing (iOS Only)
117+
118+
1. Add a new step before the step **Xcode Archive** (after Run CocoaPods install).
119+
1. Choose **Manage iOS Code Singing** from the list of steps.
120+
1. Save changes.
121+
122+
Bitrise will use the provided iOS Signing information to sign the iOS app.
123+
124+
After these changes, your workflow should look like this (if you target both operating systems):
125+
126+
{{< figure src="/attachments/refguide/mobile/distributing-mobile-apps/building-native-apps/bitrise/select-repository.png" alt="Completed workflow" width="350" class="no-border" >}}
127+
128+
129+
## Build Your App
130+
131+
Builds can be started manually or automatically. To start a build manually, open the build project and click **Start build** and confirm the dialog. A typical build will take approximately 20 minutes, but can take longer for complex applications with many dependencies.
132+
133+
When building, you can follow the build output and watch for progress and potential problems being reported there.
134+
135+
To set up automatic builds after running **Build Native App**, follow these steps:
136+
137+
1. Open the **Workflow Editor** of your build project.
138+
1. Open the **Triggers** page.
139+
1. Click **Add push trigger**.
140+
1. Select **Push branch** for **Condition 1** and change the **Push** branch to `master`.
141+
1. Select the **deploy** workflow and confirm.
142+
143+
Now, every time some runs **Build Native App** to update the application bundle, a new build will be triggered in Bitrise.

content/en/docs/refguide/mobile/distributing-mobile-apps/building-native-apps/deploying-native-app.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ aliases:
1010

1111
## Introduction
1212

13-
{{% alert color="warn" %}}
14-
Microsoft announced that Visual Studio App Center will be retired on March 31, 2025 ([Find the announcement here](https://learn.microsoft.com/en-us/appcenter/retirement)). This guide relies on App Center to build the Mendix native app in the cloud and will no longer work after that date. We are currently working on a generic way to build Mendix native apps in the cloud, which will replace the approach described in this guide. Using the new approach, you will be able to build your Mendix native app in the cloud using a build service of your choice (including the alternatives recommended by Microsoft). Until then, you can safely keep using App Center.
13+
{{% alert color="warning" %}}
14+
Microsoft announced that Visual Studio App Center will be retired on March 31, 2025 ([Find the announcement here](https://learn.microsoft.com/en-us/appcenter/retirement)). This guide relies on App Center to build the Mendix native app in the cloud and will no longer work after that date.
15+
16+
If you are looking for a drop-in replacement of AppCenter, please consult the guide to [Build a Mendix Native App with Bitrise](/refguide/mobile/distributing-mobile-apps/building-native-apps/bitrise/)
1517
{{% /alert %}}
1618

1719
This guide teaches you how to go from a blank slate to an app running on a device.
48 KB
Loading
49.4 KB
Loading

0 commit comments

Comments
 (0)