Skip to content

Commit 1628c09

Browse files
authored
Update signing and CSS docs with current guidance (#4049)
1 parent 49f54d2 commit 1628c09

File tree

3 files changed

+49
-12
lines changed

3 files changed

+49
-12
lines changed

docs/developer-guide/About-This-Guide.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ toc::[]
55

66
This developer guide is sourced directly from the `docs` directory of the https://github.com/codenameone/CodenameOne/[Codename One Git repository]. The documentation is written in AsciiDoc, reviewed through pull requests, and published from the main branch to multiple targets.
77

8-
To contribute updates, clone the repository, create a feature branch, and edit the AsciiDoc files in `docs/developer-guide`. Proposed changes are submitted as GitHub pull requests where they undergo automated and human review. Once merged, the content is rendered to the web manual at https://www.codenameone.com/manual/ and to the downloadable PDF at https://www.codenameone.com/files/developer-guide.pdf[https://www.codenameone.com/files/developer-guide.pdf]. Periodically, major revisions are collected for print-on-demand distribution.
8+
=== How to Contribute Updates
9+
10+
To contribute updates, clone the repository, create a feature branch, and edit the AsciiDoc files in `docs/developer-guide`. Follow the steps in the link:../../CONTRIBUTING.md[CONTRIBUTING guidelines] to open a GitHub pull request (PR) instead of using the deprecated community wiki. Each PR is automatically linted and built by continuous integration, then reviewed by a maintainer before it is merged. Once merged, the content is rendered to the web manual at https://www.codenameone.com/manual/ and to the downloadable PDF at https://www.codenameone.com/files/developer-guide.pdf[https://www.codenameone.com/files/developer-guide.pdf]. Periodically, major revisions are collected for print-on-demand distribution.
911

1012
While this guide focuses on tutorial and conceptual material, the complete API reference remains available in the https://www.codenameone.com/javadoc/[Codename One JavaDoc]. The source code for the framework and this manual lives alongside each other in Git, so improvements to documentation and code can evolve together through the same contribution workflow.
1113

docs/developer-guide/css.asciidoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,23 @@ RoundRectLabel {
362362
* `cn1-box-shadow-v` -- Accepts values in real values or integers (not a scalar unit). This maps directly to the border's https://www.codenameone.com/javadoc/com/codename1/ui/plaf/RoundBorder.html#shadowY-float-[shadowY] property.
363363
* `cn1-box-shadow-blur` -- Scalar value. Maps to the border's https://www.codenameone.com/javadoc/com/codename1/ui/plaf/RoundBorder.html#shadowBlur-float-[shadowBlur] property.
364364
* `cn1-box-shadow-color` -- The shadow color
365+
* `cn1-box-shadow-inset` -- Set to `inset` to render an inner shadow instead of the default outer shadow spread.
365366

366367
Currently using the regular CSS `box-shadow` in conjunction with `border-radius` will cause a 9-piece border to be generated rather than mapping to the `RoundRectBorder`. If, however, you use the `cn1-box-*` properties for the shadow instead, it will use the RoundRectBorder -- assuming that no other styles are specified that trigger an image border to be generated.
367368

369+
Codename One also exposes per-corner elliptical radius controls that map to the `RoundBorder`'s X/Y radii. You can set them directly with `cn1-border-top-left-radius-x` / `cn1-border-top-left-radius-y` (and the equivalent `top-right`, `bottom-left`, and `bottom-right` pairs) to fine tune horizontal and vertical curvature independently. The CSS parser automatically populates these properties when you use standard `border-radius` syntax, including the longhand declarations and the `border-radius: <x-radii> / <y-radii>` shorthand.
370+
371+
[source,css]
372+
----
373+
EllipticalBorder {
374+
border-radius: 2mm 4mm 6mm 1mm / 1mm 3mm 5mm 7mm;
375+
cn1-box-shadow-spread: 1.5mm;
376+
cn1-box-shadow-inset: inset;
377+
}
378+
----
379+
380+
In the example above, the four horizontal radii (`2mm 4mm 6mm 1mm`) populate the `cn1-border-*-radius-x` properties clockwise from the top-left corner. The four values after the slash fill the matching `cn1-border-*-radius-y` entries. Setting `cn1-box-shadow-inset: inset;` converts the shadow into an inset glow that follows the same elliptical curvature.
381+
368382

369383

370384
[[background]]

docs/developer-guide/signing.asciidoc

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The UDID is the Universal Device Identifier. It identifies mobile devices unique
3434
You need the iOS device UDID value during development to add the device into the list of allowed devices.
3535

3636
IMPORTANT: Don't use an app to get the UDID! +
37-
Most return the wrong value, the official way to get the UDID is thru itunes. We can also recommend trying http://get.udid.io/ which seems to work rather well
37+
Most return the wrong value. Use the Finder device summary (macOS), Apple Configurator, or a trusted service such as http://get.udid.io/ which seems to work rather well
3838

3939
==== Should I Reuse the Same Certificate for All Apps?
4040

@@ -57,8 +57,7 @@ If you already have valid certificates and profiles, you can just enter their lo
5757

5858
==== Logging into the Wizard
5959

60-
After clicking #Generate# you'll be shown a login form. Log into this form using your *iTunes Connect* user ID and
61-
password. **NOT YOUR CODENAME ONE LOGIN**.
60+
After clicking #Generate# you'll be shown a login form. Log into this form using the *App Store Connect* Apple ID that is registered on your Apple Developer Program team. **NOT YOUR CODENAME ONE LOGIN**.
6261

6362
.Wizard login form
6463
image::img/ios-cert-wizard-2-login.png[Wizard login form,scaledwidth=20%]
@@ -73,7 +72,7 @@ image::img/ios-cert-wizard-3-devices.png[Devices form,scaledwidth=20%]
7372

7473
Select the ones that you want to include in your provisioning profile and click next.
7574

76-
NOTE: Apple supports up to 100 devices for testing purposes so if you want to install the built app on your device you need to add it here
75+
NOTE: Apple currently allows up to 100 devices per device type (iPhone, iPad, Apple Watch, Apple TV, and Apple Vision) for testing purposes in each membership year. Make sure every device you intend to install builds on is registered here before you generate a new provisioning profile.
7776

7877
.After selecting devices
7978
image::img/ios-cert-wizard-4-devices-selected.png[After selecting devices,scaledwidth=20%]
@@ -95,7 +94,9 @@ image::img/ios-cert-wizard-4.1-overwrite-cert.png[Prompt to overwrite existing c
9594
.Prompt to overwrite other certificate
9695
image::img/ios-cert-wizard-4.2-overwrite-cert.png[Prompt to overwrite other certificate,scaledwidth=20%]
9796

98-
The same decision need to be made twice: Once for the development certificate, and once for the Apptore certificate.
97+
The same decision need to be made twice: Once for the development certificate, and once for the App Store distribution certificate.
98+
99+
TIP: Each Apple Developer account can only have three active iOS Development certificates and three active iOS Distribution certificates at a time. Reuse existing certificates whenever possible to avoid hitting this limit.
99100

100101
TIP: You can revoke a certificate when you have an application in the store shipping with said certificate! +
101102
This won't affect the shipping app see http://stackoverflow.com/questions/6320255/if-i-revoke-an-existing-distribution-certificate-will-it-mess-up-anything-with[this].
@@ -106,7 +107,7 @@ A typical iOS app has at least two certificates:
106107
107108
- Development - this is used during development and can't be shipped to 3rd parties. An application signed with this certificate can only be installed on one of the up to 100 devices listed above.
108109
109-
- Distribution - this is used when you are ready to upload your app to itunes whether for final shipping or beta testing. Notice that you can't install a distribution build on your own device. You need to upload it to itunes.
110+
- Distribution - this is used when you are ready to upload your app to App Store Connect whether for final shipping or beta testing. Notice that you can't install a distribution build on your own device. You need to upload it to App Store Connect.
110111
111112
- There are two push certificates, they are separate from the signing certificates. Don't confuse them! +
112113
They are used to authenticate with Apple when sending push messages.
@@ -149,7 +150,7 @@ TIP: You can see the password for the P12 files in the `codenameone_settings.pro
149150
==== Building Your App
150151

151152
After selecting your local install location, and closing the wizard, you should see the fields of the "iOS Signing"
152-
properties panel filled in correctly. You should now be able to send iOS debug or Appstore builds without the usual hassles.
153+
properties panel filled in correctly. You should now be able to send iOS debug or App Store builds without the usual hassles.
153154

154155
.Filled in signing panel after wizard complete
155156
image::img/ios-cert-wizard-9-signing-panel.png[Filled in signing panel after wizard complete,scaledwidth=40%]
@@ -158,14 +159,14 @@ image::img/ios-cert-wizard-9-signing-panel.png[Filled in signing panel after wiz
158159

159160
WARNING: You should use the certificate wizard, especially if you don't have a Mac. This section is here mostly for reference and edge cases that don't work with the certificate wizard
160161

161-
iOS signing has two distinct modes: App Store signing which is only valid for distribution via iTunes (you won't be able to run the resulting application without submitting it to Apple) and development mode signing.
162+
iOS signing has two distinct modes: App Store signing which is only valid for distribution via App Store Connect (you won't be able to run the resulting application without submitting it to Apple) and development mode signing.
162163

163164
You have two major files to keep track of:
164165

165166
1. *Certificate* - your signature
166167
2. *Provisioning Profile* - details about the application and who is allowed to execute it
167168

168-
You need two versions of each file (4 total files) one pair is for development and the other pair is for uploading to the itunes App Store.
169+
You need two versions of each file (4 total files) one pair is for development and the other pair is for uploading to App Store Connect.
169170

170171
IMPORTANT: You need to use a Mac in order to create a certificate file for iOS
171172

@@ -225,7 +226,7 @@ Refresh the screen to see the profile you just created and press the download bu
225226
.Create provisioning profile step 3
226227
image::img/ios-create-prov-profile-3.png[Create provisioning profile step 3,scaledwidth=30%]
227228

228-
Create a distribution provisioning profile; it will be used when uploading to the app store. There is no need to specify devices here.
229+
Create a distribution provisioning profile; it will be used when uploading to the App Store. There is no need to specify devices here.
229230

230231
.Create distribution provisioning profile
231232
image::img/ios-create-dist-prov-profile.png[Create distribution provisioning profile,scaledwidth=30%]
@@ -250,6 +251,26 @@ In the IDE we enter the project settings, configure our provisioning profile, th
250251
.IOS Project Settings
251252
image::img/ios-project-settings.png[IOS Project Settings,scaledwidth=30%]
252253

254+
==== Configuring `codenameone_settings.properties` for Manual Signing
255+
256+
The Codename One build servers read signing assets from `codenameone_settings.properties`. When you bypass the signing wizard, populate the following keys manually so the packaging process can locate your certificates, provisioning profiles, and keystores:
257+
258+
*iOS*
259+
260+
* `codename1.ios.debug.certificate` / `codename1.ios.debug.certificatePassword` / `codename1.ios.debug.provision` – Development P12 and provisioning profile for device/debug builds.
261+
* `codename1.ios.release.certificate` / `codename1.ios.release.certificatePassword` / `codename1.ios.release.provision` – Distribution P12 and provisioning profile for App Store/TestFlight builds.
262+
* `codename1.ios.certificate`, `codename1.ios.certificatePassword`, and `codename1.ios.provision` – Legacy/global defaults. The IDE uses these as fallbacks when the debug/release-specific properties are blank, so keep them aligned with your preferred certificates.
263+
264+
Paths may be absolute or relative to the project directory. The passwords must match the values you used when exporting the P12 files from Keychain Access.
265+
266+
*Android*
267+
268+
* `codename1.android.keystore` – Path to the Android keystore (`.ks` or `.keystore`).
269+
* `codename1.android.keystorePassword` – Password protecting the keystore and key entry.
270+
* `codename1.android.keystoreAlias` – Alias of the keypair used to sign the APK/AAB.
271+
272+
If the keystore fields are empty the Maven and Ant builders will create a default keystore, but production apps should commit the real paths and credentials so reproducible builds use your long-lived signing key.
273+
253274
==== iOS Code Signing Failure Checklist
254275

255276
Below is a list of common issues when singing and a set of suggestions for things to check. Notice that some of these signing failures will sometimes manifest themselves during build and sometimes will manifest during the install of the application.
@@ -285,7 +306,7 @@ image::img/provisioning-profile-with-app-id.png[Provisioning Profile with app id
285306

286307
- Make sure the certificate and provisioning profile are from the same source (if you work with multiple accounts), notice that provisioning profiles and certificates expire so you will need to regenerate provisioning when your certificate expires or is revoked.
287308

288-
- If you declare push in the provisioning profile then `ios.includePush` (in the build arguments) MUST be set to true, otherwise it *MUST* be set to false (see pictures below). Notice that this should be configured via the UI in the iOS section.
309+
- If you declare push in the provisioning profile then `ios.includePush` (in the build arguments) MUST be set to true, otherwise it *MUST* be set to false (see pictures below). Notice that this should be configured via the UI in the iOS section. The build server automatically enables the notification entitlement when your project uses `LocalNotification`, even if `ios.includePush` is false, so do not try to disable the entitlement manually to "fix" warning messages from App Store Connect.
289310
+
290311
.Include push build hint
291312
image::img/include-push-build-hint.png[Include push build hint,scaledwidth=30%]

0 commit comments

Comments
 (0)