Skip to content

Commit 5d963fe

Browse files
authored
Merge pull request #6115 from MicrosoftDocs/2612854-2
Wrap - feature docs - 2612854 - to publish 4/11 or later - ported from #5925
2 parents 4449944 + 7cc6374 commit 5d963fe

30 files changed

+753
-0
lines changed

powerapps-docs/maker/TOC.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,18 @@
11411141
href: ./canvas-apps/transform-infopath.md
11421142
- name: Analyze app telemetry using Application Insights
11431143
href: ./canvas-apps/application-insights.md
1144+
- name: Create native mobile apps (preview)
1145+
items:
1146+
- name: Wrap (preview) overview
1147+
href: ./common/wrap/overview.md
1148+
- name: Customize and build your mobile app
1149+
href: ./common/wrap/how-to.md
1150+
- name: Code sign for iOS
1151+
href: ./common/wrap/code-sign-ios.md
1152+
- name: Code sign for Android
1153+
href: ./common/wrap/code-sign-android.md
1154+
- name: Frequently asked questions
1155+
href: ./common/wrap/faq.yml
11441156
- name: For developers
11451157
items:
11461158
- name: Canvas apps for enterprise developers, partners, and ISVs
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
title: Code sign for Android (preview)
3+
description: Learn about how to code sign for Android for Power Apps wrap.
4+
author: larryk78
5+
ms.topic: article
6+
ms.custom: canvas
7+
ms.reviewer: tapanm
8+
ms.date: 04/07/2022
9+
ms.subservice: canvas-maker
10+
ms.author: lknibb
11+
search.audienceType:
12+
- maker
13+
search.app:
14+
- PowerApps
15+
contributors:
16+
- tapanm-msft
17+
- larryk78
18+
---
19+
20+
# Code sign for Android (preview)
21+
22+
[This article is pre-release documentation and is subject to change.]
23+
24+
In this article, you'll learn about how to code sign for Android. You'll need to sign your app for Android if you selected Android as one of the [platforms](overview.md#app-platforms) while creating and building your [wrap project](how-to.md#create-a-wrap-project).
25+
26+
> [!TIP]
27+
> For general guidance about signing an app for Android platforms, see [Sign your app](https://developer.android.com/studio/publish/app-signing).
28+
29+
## Prepare your PC
30+
31+
You'll need the following information to get started:
32+
33+
- Install [Java™ Platform, Standard Edition Development Kit (JDK™)](https://www.oracle.com/java/technologies/downloads/)
34+
- Install [Android Studio](https://developer.android.com/studio)
35+
- Install [OpenSSL](https://www.openssl.org/)
36+
37+
## Generate keys
38+
39+
We'll use [keytool](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html) from Java SDK to create a certificate to sign the application package. Keytool is used to manage a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates.
40+
41+
To generate a key, open a command prompt and run the following command:
42+
43+
`keytool -genkey -alias SIGNATURE_ALIAS -keyalg RSA -keystore PATH_TO_KEYSTORE -keysize 2048 -validity 100`
44+
45+
Parameters:
46+
47+
- **genkey** - command to generate a key.
48+
- **alias** - indicates the alias to be used in the future to refer to the keystore entry containing the keys that will be generated.
49+
- **keyalg** - key algorithm name.
50+
- **keystore** - the name of the keystore you're using.
51+
- **keysize** - the size of each key to be generated.
52+
- **validity** - validity of the key in number of days.
53+
54+
More information: [Generate Keys](https://docs.oracle.com/javase/tutorial/security/toolsign/step3.html)
55+
56+
Example:
57+
58+
`keytool -genkey -alias powerappswrap -keyalg RSA -keystore powerappswrap.jks -keysize 2048 -validity 10000`
59+
60+
:::image type="content" source="media/code-sign-android/keytool.png" alt-text="A screenshot with keytool command using the parameters in the above example.":::
61+
62+
## Generate signature hash
63+
64+
After generating the key, we'll use the **exportcert** command in **keytool** to export the keystore certificate.
65+
66+
`keytool -exportcert -alias SIGNATURE_ALIAS -keystore PATH_TO_KEYSTORE | openssl sha1 -binary | openssl base64`
67+
68+
Parameters:
69+
70+
- **exportcert** - reads from the keystore the certificate associated with alias and stores it in the cert_file file. When no file is specified, the certificate is output to stdout.
71+
- **alias** - the alias used while generating keys [earlier](#generate-keys).
72+
- **keystore** - the name of the keystore you're using.
73+
- **openssl** - generates SHA1 key for Android.
74+
75+
## Sign the APK package
76+
77+
The next step is to sign the APK package using **apksigner** tool. The [apksigner tool](https://developer.android.com/studio/command-line/apksigner) allows you to sign APKs and ensure that the APK package signature will be verified successfully on all Android platforms supported by the APKs.
78+
79+
### Find your apksigner
80+
81+
1. Check the Android SDK path in the Android Studio.
82+
1. Select **Tool** > **SDK Manager** > **Android SDK Location**.
83+
84+
If using iOS, check the apksigner file from the **buildTools Version** directory:
85+
86+
Go to **SDK** directory > **build-tools** > **buildToolsVersion** > **lib**, and check the **apksigner.jar** file 
87+
88+
### Use the apksigner file
89+
90+
Run the following command to use the **apksigner** and sign the package:
91+
92+
`apksigner.bat sign --ks PATH_TO_KEYSTORE --ks-key-alias KEY_ALIAS PATH_TO_APK`
93+
94+
Parameters:
95+
96+
- **ks** - path to the keystore.
97+
- **ks-key-alias** - key alias path to APK file.
98+
99+
When prompted, enter the password.
100+
101+
More information: [Android Studio command line tools: **apksigner**](https://developer.android.com/studio/command-line/apksigner)
102+
103+
## Distribute the app
104+
105+
You can now host the package on a distribution service such as [App Center](how-to.md#test-and-distribute-mobile-app-package). To distribute using Microsoft Intune, see [Add an Android line-of-business app to Microsoft Intune](/mem/intune/apps/lob-apps-android).
106+
107+
### See also
108+
109+
- [Wrap overview (preview)](overview.md)
110+
- [Manually Signing the APK - Xamarin](/xamarin/android/deploy-test/signing/manually-signing-the-apk)
111+
- [Code sign on iOS (preview)](code-sign-ios.md)
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
---
2+
title: Code sign for iOS (preview)
3+
description: Learn about how to code sign for iOS for Power Apps wrap.
4+
author: larryk78
5+
ms.topic: article
6+
ms.custom: canvas
7+
ms.reviewer: tapanm
8+
ms.date: 04/07/2022
9+
ms.subservice: canvas-maker
10+
ms.author: lknibb
11+
search.audienceType:
12+
- maker
13+
search.app:
14+
- PowerApps
15+
contributors:
16+
- tapanm-msft
17+
- larryk78
18+
---
19+
20+
# Code sign for iOS (preview)
21+
22+
[This article is pre-release documentation and is subject to change.]
23+
24+
In this article, you'll learn about how to code sign for iOS. You'll need to sign your app for iOS if you selected iOS as one of the [platforms](overview.md#app-platforms) while creating and building your [wrap project](how-to.md#create-a-wrap-project).
25+
26+
## Prerequisites
27+
28+
You'll need the following information to get started:
29+
30+
- App ID
31+
- Device UDIDs (only for testing and development purpose)
32+
33+
You'll also need a macOS device to code sign for iOS.
34+
35+
## Prepare your Mac
36+
37+
Set up your Mac with the following configuration.
38+
39+
1. Install **Xcode**. More information: [Xcode](https://developer.apple.com/support/xcode/)
40+
1. Install PowerShell for macOS. More information: [Installing PowerShell on macOS](/powershell/scripting/install/installing-powershell-on-macos)
41+
1. Enroll in [Apple Developer Program](https://developer.apple.com/programs/)
42+
1. To distribute your apps within the organization, you'll need to sign up for [Apple Enterprise Developer Program](https://developer.apple.com/programs/enterprise/).
43+
44+
## Create App ID
45+
46+
1. Sign in to your developer account by going to <https://developer.apple.com> and selecting the **Account** tab.
47+
48+
:::image type="content" source="media/code-sign-ios/account-tab.png" alt-text="Account tab.":::
49+
50+
1. Go to [**Certificates, IDs & Profiles &gt; Identifiers**](https://developer.apple.com/account/resources/identifiers/list).
51+
52+
1. Select **+** to create a new identifier.
53+
54+
:::image type="content" source="media/code-sign-ios/identifier.png" alt-text="Create new identifier.":::
55+
56+
1. Select **App IDs**, and then select **Continue**.
57+
58+
:::image type="content" source="media/code-sign-ios/register-identifier.png" alt-text="Register a new identifier.":::
59+
60+
1. Select the type as **App**, and then select **Continue**.
61+
62+
1. Register an **App ID**:
63+
64+
:::image type="content" source="media/code-sign-ios/register-appid.png" alt-text="Register an App ID.":::
65+
66+
1. **Description** - Name of your app.
67+
1. **Bundle ID** - select **Explicit Bundle ID**.
68+
1. Enter the bundle ID that you used while [creating the wrap project](how-to.md#bundle-id). More information: [Bundle ID](overview.md#bundle-id)
69+
1. Enable the following capabilities:
70+
- Associated Domains
71+
- iCloud
72+
- NFC Tag Reading
73+
- Push Notifications
74+
1. Select **Continue**.
75+
76+
1. Review, and register the App ID.
77+
78+
## Create a distribution certificate
79+
80+
To create a distribution certificate, create a new certificate signing request first.
81+
82+
### Create Certificate Signing Request (CSR)
83+
84+
1. On your Mac PC, go to the **Applications** folder > **Utilities** > open **Keychain Access**.
85+
86+
1. Select **Keychain Access** > **Certificate Assistant** > **Request a Certificate from a Certificate Authority**.
87+
88+
:::image type="content" source="media/code-sign-ios/cert-req.png" alt-text="Request a certificate from a CA.":::
89+
90+
1. Fill out the **Certificate Information** as explained below, and then select **Continue**.
91+
1. In the **User Email Address** field, enter your Apple ID email address to identify with this certificate.
92+
1. In the **Common Name** field, enter your name.
93+
1. In the **Request** group, select **Saved to disk**.
94+
1. Save the file to your Mac PC.
95+
96+
## Create the distribution certificate
97+
98+
1. Sign in to your developer account at <https://developer.apple.com> by selecting the **Account** tab.
99+
100+
1. Go to [Certificates, IDs & Profiles &gt; Certificates](https://developer.apple.com/account/resources/certificates/list).
101+
102+
1. Select **+** to create a new certificate.
103+
1. Select **App Store and Ad Hoc** > **Continue**.
104+
105+
![Certificates, Identifiers & Profiles](media/code-sign-ios/new-cert.png)
106+
107+
> [!NOTE]
108+
> If you have an Enterprise Developer Account then you'll have the option to create an Enterprise Distribution certificate.
109+
110+
1. Upload the Certificate Signing Request (CSR) file that was generated in the previous steps.
111+
112+
:::image type="content" source="media/code-sign-ios/upload-cert.png" alt-text="Upload the certificate.":::
113+
114+
1. Select **Continue**, and download the certificate to your Mac PC.
115+
116+
1. Double-click the downloaded .cer file to install to Keychain Access.
117+
118+
1. Take a note of the **Name** of the certificate (usually like **iPhone Distribution: Name (Team ID)**). This value is the code signing identity that needs to be provided for signing.
119+
120+
## Add all the devices where the iPA needs to be installed
121+
122+
1. Sign in to your developer account at <https://developer.apple.com> by selecting the **Account** tab.
123+
124+
1. Go to [Certificates, IDs & Profiles &gt; Devices](https://developer.apple.com/account/resources/devices/list).
125+
126+
1. Select **+** to register one or more devices.
127+
128+
1. Enter the **Device Name** and **Device ID (UDID)**.
129+
130+
:::image type="content" source="media/code-sign-ios/register-device.png" alt-text="Register a device.":::
131+
132+
1. Select **Save**.
133+
134+
> [!TIP]
135+
> You can also register multiple devices together by uploading a list of UDID's.
136+
137+
## Create an iOS Provisioning Profile
138+
139+
1. Sign in to your developer account by going to <https://developer.apple.com> and selecting the **Account** tab.
140+
141+
1. Go to [**Certificates, IDs & Profiles &gt; Profiles**](https://developer.apple.com/account/resources/profiles/list).
142+
143+
1. Select **+** to create a new profile.
144+
145+
1. Select **Ad Hoc** > **Continue**.
146+
147+
:::image type="content" source="media/code-sign-ios/ad-hoc.png" alt-text="Ad Hoc.":::
148+
149+
> [!NOTE]
150+
> For production testing and development purpose, use **App Store** distribution method.
151+
152+
1. Select App ID that you created earlier, and then select **Continue**.
153+
154+
:::image type="content" source="media/code-sign-ios/app-id.png" alt-text="App ID.":::
155+
156+
1. Select the certificate that you created earlier, and then select **Continue**.
157+
158+
:::image type="content" source="media/code-sign-ios/select-cert.png" alt-text="Select certificate.":::
159+
160+
1. Select all the test devices where you want to install your app, and then select **Continue**.
161+
162+
:::image type="content" source="media/code-sign-ios/add-devices.png" alt-text="Add devices.":::
163+
164+
1. Review and name the provisioning profile. Note down the name of the provisioning profile.
165+
166+
1. Generate and download the profile to your Mac.
167+
168+
1. Double-click to open the downloaded file (\*.mobileprovision) to register it with Xcode.
169+
170+
## Sign the iOS Archive
171+
172+
1. Download the .zip app package created as a result of the [wrap project](how-to.md#create-a-wrap-project).
173+
174+
1. Unzip the package.
175+
176+
For example, a sample build project **iOS-Archive.zip** file downloaded from the App Center shows a folder structure like below.
177+
178+
:::image type="content" source="media/code-sign-ios/folder-structure.png" alt-text="Folder structure.":::
179+
180+
1. Open terminal, and change directory to the folder. In this example, **com_single_wrap**.
181+
182+
1. Enter `pwsh` to start PowerShell in the terminal.
183+
184+
1. Run `./SignAndGenerateIPA.ps1` with the values for the "CodeSigningIdentity" and "ProvisioningProfilePath" parameters.
185+
186+
:::image type="content" source="media/code-sign-ios/powershell.png" alt-text="Run PowerShell script.":::
187+
188+
1. After the script finishes, you'll see an .ipa file created. In this example, **com_single_wrap.ipa**.
189+
190+
:::image type="content" source="media/code-sign-ios/package.png" alt-text="IPA package.":::
191+
192+
1. Install the .ipa file in the registered devices using the **Finder** app. You can also host it on a distribution service such as [App Center](how-to.md#test-and-distribute-mobile-app-package). To distribute using Microsoft Intune, see [Add an iOS/iPadOS line-of-business app to Microsoft Intune](/mem/intune/apps/lob-apps-ios).
193+
194+
### See also
195+
196+
- [Wrap overview (preview)](overview.md)
197+
- [Code sign on Android (preview)](code-sign-android.md)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
### YamlMime:FAQ
2+
metadata:
3+
title: Frequently asked questions for Wrap (preview)
4+
description: Frequently asked questions for Wrap (preview).
5+
author: larryk78
6+
ms.topic: faq
7+
ms.custom:
8+
ms.date: 04/07/2022
9+
ms.author: lknibb
10+
ms.reviewer: tapanm
11+
contributors:
12+
- larryk78
13+
- tapanm-msft
14+
title: Frequently asked questions for Wrap (preview)
15+
summary: |
16+
Frequently asked questions about the **wrap** feature are listed below. If you don't find an answer to your question, send an email to <[email protected]> with your question.
17+
18+
sections:
19+
- name: General
20+
questions:
21+
- question: |
22+
Can I create mobile apps with Power Apps?
23+
answer: |
24+
Yes. More information: [Creating mobile apps with Power Apps](overview.md)
25+
26+
- question: |
27+
If I create a mobile app with Power Apps, does Microsoft release it for me?
28+
answer: |
29+
No. Microsoft will wrap your Power Apps app in a native mobile app shell for you to digitally sign and distribute.
30+
31+
- question: |
32+
How do I digitally sign my mobile app?
33+
answer: |
34+
Signing instructions are provided for [Android](code-sign-android.md) and [iOS](code-sign-ios.md).
35+
36+
- question: |
37+
How do I distribute my mobile app?
38+
answer: |
39+
It depends on your business scenario. You can use [Microsoft Intune](/mem/intune/fundamentals/what-is-intune), [Managed Google Play](https://support.google.com/googleplay/work/answer/6138458) or [Apple Business Manager](https://developer.apple.com/custom-apps/).
40+
41+
- question: |
42+
What are Primary and Secondary apps in the context of wrap?
43+
answer: |
44+
Primary app provides the main experience of your mobile app. Secondary apps are bundled for performance reasons and must be linked from your primary app. See [wrap multiple canvas apps together](overview.md#wrap-multiple-canvas-apps-together).
45+
46+
- question: |
47+
Can I create B2C mobile apps with Power Apps?
48+
answer: |
49+
No. Power Apps is a platform for creating business applications and uses Azure Active Directory authentication. The wrap feature wraps existing canvas apps for the same set of end users.

0 commit comments

Comments
 (0)