AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar para iOS (iPhone/iPad)
  • Overview
  • Steps to follow
  • Step 1: Distribution certificate
  • Step 2: Application identifier
  • Step 3: Supply profile
  • Step 4: Web server configuration
  • Step 5: Application generation
  • Step 6: Compiling in Xcode
  • Step 7: Installing the application
  • Step 8: Pilot Xcode (optional)
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview
Apple's In-House deployment allows you to overcome most of the constraints of the other two modes (App Store deployment and Ad Hoc deployment) and to widely distribute an application without the need to reference client devices in advance.
Advantages:
  • Large-scale deployment (no limit on the number of clients).
  • Distributed applications not checked by Apple.
Drawbacks:
  • requires an HTTPS server to distribute the application.
  • requires a more expensive Apple Developer Account membership.
Note: In-House deployment was previously called "Enterprise".. The term "Enterprise" can still be found in some documentation.
Steps to follow

Step 1: Distribution certificate

This step must be completed only once.
The signing certificate can be used for all applications of the company.
The signing certificate identifies the organization that distributes an application. It is composed of a public key and a private key:
  • the private key is kept by the developer and is used to sign application installation packages.
  • the public key is distributed with the application and must be signed by Apple.
Remarque: Distribution certificates are valid for three years. An expired certificate cannot be renewed. Upon expiration, a new certificate must be generated.
Signing certificates are created via an Apple Developer Account, at "https://developer.apple.com/".
This operation has two stages:
  1. Creation of the private and public key on the Mac.
  2. Sending the public key to be signed by Apple, as a Certificate Signing Request (CSR).
Note: it is advisable to perform this operation on the Mac used for compilation.. All the generated files will be installed on the computer, and ready to be used by Xcode during compilation operations.
Creating keys on the Mac
To create the private key and the CSR, use "Keychain Access", available in "Applications", "Utilities".
In the main menu of the application, select "Certificate Assistant .. Request a Certificate from a Certificate Authority".
Then follow the steps of the certificate assistant.
Signing the CSR via the site
On the "Apple Developer" site:
  1. Click "Certificates, Identifiers & Profiles" in the sidebar.
  2. Then click "+" to create a new certificate (in the "Software" section, choose "In-House and Ad Hoc").
  3. Once the CSR is generated, it must be sent to Apple.
  4. Click "Choose file" and select the CSR file generated by the assistant.
Apple will then sign the CSR and return a signing certificate which must be:
  • downloaded via the "Download" button,
  • installed on the Mac (double-click the downloaded file).
Please note: In-House deployments are not intended for marketing applications, but only for large-scale internal deployment.

Step 2: Application identifier

This step must be completed only once for each application to distribute, unless the distribution conditions described in the App ID vary.
An application identifier (App ID) is used to uniquely identify an application. Different versions of the same application will all have the same App ID.
An application identifier can also be created from the Apple Developer site:
  1. In the "Certificates, Identifiers & Profiles" section, select the second entry in the left-hand menu: "Identifiers",
  2. Click "+" to create a new App ID,
  3. In "Register a New Identifier", select "App ID" and click "Continue".
  4. Describe the application to create the App ID.
    • Platform: select iOS, tvOS, watchOS for a WINDEV Mobile application.
    • Description: this field is free and allows you to enter a description of the application.
    • Bundle ID: select "Explicit" and enter a bundle identifier. There are no rules for entering this identifier. It must be specified in the WINDEV Mobile generation wizard (see step 5). By convention, this identifier often corresponds to a syntax called "reverse domain name".
      For example, for a "WMShopping" application distributed by the company "precilia.com", the recommended Bundle ID is: "com.precilia.wmshopping"..
      Note: "Bundle IDs" of the "Wildcard" type (i.e. with a star instead of an application name like "com.precilia.*") allow you to have a single App ID for several applications, which can be useful for distributing a large number of applications. However, Push notifications or In-App purchases cannot be used in an application identified by a Wildcard Bundle ID.
  5. In "Capabilities", specify the functionalities used by the application (e.g., push notifications).
  6. Click "Continue".
  7. On the next page, specify how the application will be deployed (so that the generated App ID is compatible with In-House deployment).
  8. Select "Yes. I have details on this app and plans for distribution".
  9. Indicate the approximate number of client devices.
  10. Then select the application deployment method:
    • via a secure website (our case),
    • via an MDM solution (Mobile Device Management, i.e. an infrastructure for managing a fleet of mobile devices).
      WINDEV Mobile allows you to implement this type of solution. For more details, see Deploying via a Private Store.
  11. Next, specify how the access to the application will be secured:
    • via a login/password mechanism,
    • by forcing the user to connect to an Intranet or a specific VPN.
  12. Finally, indicate the intended users of the application:
    • employees of the company,
    • contractors.
  13. Don't forget to check the box confirming that all the information provided is correct (at the bottom of the page).
  14. Click "Continue" to create the App ID.

Step 3: Supply profile

This step must be completed only once for each application to distribute.
A provisioning profile is a description that links an application (represented by its App ID) to a distributor (represented by a Signing Certificate). It is used to compile the package that will be installed on iOS devices.
Provisioning profiles are created in the "Apple Developper" site:
  1. In "Certificates, Identifiers & Profiles", click "Profiles" and "+" to create a new profile,
  2. Select "In-House" in "Distribution" and click "Continue",
  3. In the drop-down list, select the App ID created for the application and click "Continue".
  4. Choose the signing certificate to use. At compilation time, the application must be signed with the private key of this certificate (see step 5). Click "Continue".
    Note: The public key must be accepted by the application's user before they can launch the application on their iPhone/iPad (see step 7).
  5. Enter a name for the provisioning profile and click "Generate".
  6. Click "Download" to download the profile and double-click on it to install it in Xcode

Step 4: Web server configuration

To allow the installation of In-House applications, a simple solution is to create a web page with a link pointing to the "manifest.plist" file (which will be generated by Xcode, in step 6).
The syntax of this link is as follows:
I only want the answer
Keep the HTML and XML formatting
Here is the sequence:
<a href="itms-services://?action=download-manifest&url=
https://wmshopping.precilia.com/manifest.plist" id="text">Download iOS application</a>
The address of the web server can be adapted according to your configuration, and you are free to define the text in the tag.
MIME type
Web servers don't always know how to handle ".plist" and ".ipa" files. If these extensions are unknown to the server, the download will not work.
To declare these extensions in IIS, use the "Internet Information Services (IIS) Manager":
  1. Select the server and click "MIME Types" in the right view ("IIS" section).
  2. If the ".ipa" and ".plist" extensions are not declared on your server, add them by clicking "Add..." (in the menu on the right of the window):
    • the ".ipa" extension is associated with the MIME type "application/octet-stream",
    • the ".plist" extension is associated with the MIME type "application/x-plist".

Step 5: Application generation

In WINDEV Mobile, launch the iOS application generation wizard: in the "Proyecto" pane, in the "Proyecto" group, click on "Generar"..
The main steps are as follows:
  • In the first step of the wizard, enter the Bundle ID of the application.
    Bundle ID
Please note: you must use the same Bundle ID as the one entered when creating the App ID (step 2).
  • In the "Signature" step, specify the different signature settings.
    • If the Apple account used to deploy is configured on the compiling MAC: In this case, the Apple account manager gives all rights to the developer when compiling on the MAC.. WINDEV Mobile can automatically generate the necessary elements to sign the application. To do so, simply enter your team identifier (App ID Prefix or Team ID). This identifier is displayed in the upper-right corner on all pages of the Apple Developer site when you are logged in.
      Alternatively, you can use the "Import" button to select the ".mobileprovision" file: the associated Team ID will be automatically imported and filled in..
    • If the Apple account is not configured on the compiling MAC: In this case, the Apple account manager doesn't want to give full rights to the developer. WINDEV Mobile allow developers to "Manage the signature manually". In this case, you need to import the "Distribution profile" (".mobileprovision" file) and the "Development profile" (you can use the same ".mobileprovision" file, or a different file, depending on your case).
    • Alternatively, you can fill in the signature details directly in XCode, on the Mac used for compilation.
    For more details on iOS app signing, see Signature of iOS applications.
  • Finish the wizard to generate the Xcode project and copy the result to your compilation Mac.

Step 6: Compiling in Xcode

To compile your WINDEV Mobile project in Xcode:
  1. Load the project in Xcode.
  2. Select the "Generic iOS Device" target in the toolbar.
  3. In the "Product" menu, select "Archive".
  4. When the creation of the software archive is complete, click "Distribute App".
  5. For In-House deployment, select the "Enterprise" distribution method and validate by clicking "Next".
    Tip: In the distribution options, you can reduce the package size if all client devices are of the same model.. To do this, choose the model from the "App Thinning" drop-down list.
    Warning: do not select "All compatible device variants".. For an application compatible with all device variants, select "None" (default option)
  6. Be sure to check "Include manifest for over-the-air installation".
  7. Click "Next".
  8. Specify the details in the deployment manifest before validating ("Next"):
    • Name: specify application name
    • App URL: specify the address at which you wish to make the installation package available.. This package is an .ipa extension file, and an HTTPS access is mandatory.
    • Display Image URL: enter the address of a 57x57 pixel image to be used as the installation icon for the application.. The protocol must be HTTPS.
    • Full Size Image URL: enter the address of a 512x512 pixel image to be used as a large icon for the application.. The protocol must be HTTPS.
  9. For In-House distribution, the installation package must be signed again after the generation.
    In this step, you can let Xcode manage the signature automatically (based on the information specified in the provisioning profile).
    If you manage singing manually, an additional step requires you to confirm the signing certificate to use (crated in step 1) and the provisioning profile (created in step 3).
  10. After validating ("Next"), Xcode builds the installation archive of the application, then signs this archive with the private key of the signing certificate.
    Note: this operation can take several minutes.
  11. Once the distribution archive has been created, Xcode proposes to export the result of the generation. Xcode then generates several files in this directory. Two of them are necessary to distribute the application:
    • manifest.plist,
    • the .ipa file (name chosen in the archive creation wizard).
    Warning: if there are several .ipa files in the export, this means that one of the previous options has not been correctly selected: you need to restart archive generation, and in particular check that the "None" option is selected in the "App Thinning" combo.
  12. Copy these two files to the Web server (configured in step 4) at the URL specified during generation.

Step 7: Installing the application

To install the application on an iPhone/iPad:
  1. Open the page on Safari and click the installation link.
  2. Safari will then display a confirmation box indicating that the website wishes to install an application: click on "Install".
The first time the application is launched, an error message may appear indicating that the company that signed this application is not trusted by the user.
To trust a certificate on a device:
  1. Go to "Settings", "General",
  2. Tap "Profiles & Device Management",
  3. Tap the name of the signing certificate in "Enterprise App" (this is the certificate that was created in the first step),
  4. Tap "Trust ..." and validate.
It will then be possible to install and run all In-House applications signed by this developer (i.e. with the same Signing Certificate) on this device.

Step 8: Pilot Xcode (optional)

You can emulate Xcode via command lines to trigger the generation through programming (for example in SSH from an action plan in the Software Factory).
The main useful command lines in this case are:
  • Clean compilation cache:
    xcodebuild clean
  • Archiving:
    xcodebuild -scheme <my_scheme>-sdk iphoneos-archivePath <archive_path> archive

    The parameters are as follows:
    • <mon_scheme>: value of a project scheme (see your application's schemes in Xcode).
    • <chemin_archive>: destination path.
  • IPA build:
    xcodebuild -exportArchive-archivePath <my_scheme>.xarchive
    -exportOptionsPlist exportOptions.plist-exportPath <export_path>

    The parameters are as follows:
    • <mon_scheme>: value of a project scheme.
    • <chemin_export>: destination path.
For more details on using xcode build and command-line operation, please refer to the Apple documentation: "https://developer.apple.com/library/archive/technotes/tn2339/_index.html".
Versión mínima requerida
  • Versión 17
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 04/10/2024

Señalar un error o enviar una sugerencia | Ayuda local