Annotation Type Mac
Native macOS build hints, checked by the compiler.
Place this on your application's main class -- the class named by
codename1.mainName. An attribute you do not set is not written at all, so
the build server's own default applies. The default clause below each
attribute names a constant that says nothing -- see HintUnset -- and this
package deliberately does not record what the server would do instead,
because that is the server's to change.
The platform is stated once on the annotation, not on every attribute. An attribute repeats it only to disagree with it.
These are the macos.* hints, which the native macOS build reads. Every one
of them is also accepted spelled macNative.*, the name the legacy Mac
Catalyst target uses, so a project moving between the two keeps building; the
canonical spelling is the one here.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.macOS builds.
-
Element Details
-
addLibs
String[] addLibsmacOS builds. Frameworks to link in addition to the ones the build detects for itself, separated by a semicolon, a comma or a colon -- for exampleSpeech.framework;CoreMIDI.framework.ios.add_libsis read when this is unset, so a project migrated from the Mac Catalyst build keeps linking what its native sources need.- Default:
{}
-
appCategory
String appCategorymacOS builds.LSApplicationCategoryTypein the generated Info.plist. Defaultpublic.app-category.utilities. See https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype[Apple's category list].- Default:
""
-
arch
String archmacOS builds. The architectures to compile, as anARCHSvalue. Defaultarm64 x86_64, which is what a Mac application is expected to be: a single-architecture build is the kind of thing nobody notices until an Intel user reports it.- Default:
"arm64 x86_64"
-
bundleId
String bundleIdmacOS builds. Used only whenmacos.deriveBundleId=false. Default:<packageName>.mac.- Default:
""
-
bundleVersion
String bundleVersionmacOS builds.CFBundleVersionin the Info.plist.ios.bundleVersionis read when this is unset, and the project's version when neither is set.- Default:
""
-
configuration
String configurationmacOS builds. The Xcode configuration to archive, as passed toxcodebuild -configuration. DefaultRelease.- Default:
"Release"
-
copyright
String copyrightmacOS builds.NSHumanReadableCopyrightin the Info.plist. Defaults toCopyright (c) <year> <vendor>.- Default:
""
-
cryptoGcm
Toggle cryptoGcmmacOS builds. Whether AES-GCM is compiled into the bundled crypto library. On by default wherever the crypto API is on, matching what an iOS build of the same application gets; setfalseto leave it out and keep the symbol set smaller.ios.crypto.gcmis read when this is unset.- Default:
DEFAULT
-
deriveBundleId
Toggle deriveBundleIdmacOS builds.false(default) gives the app its own bundle identifier,<packageName>.mac, because a macOS app and an iOS app are separate products in App Store Connect.truereuses the iOS identifier. On the legacy Mac Catalyst target this maps instead to Xcode'sDERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER, which appends.maccatalyst.- Default:
DEFAULT
-
distribution
String distributionmacOS builds. Everymacos.*hint below is also accepted spelledmacNative.*, which is what the legacy Mac Catalyst target reads, so an existing Catalyst project keeps building unchanged.developerID(default),appStore, orboth. Selects the signing certificate, the entitlements and the default packaging.bothis genuinely two builds: the channels differ in the certificate and in the entitlements the signature carries -- the App Store one has to be sandboxed -- so one binary can't be relabelled into the other channel afterwards. It produces<App>-appstore.appand<App>-developerid.app, each with its own container.- Default:
""
-
entitlementsAllowJit
Toggle entitlementsAllowJitmacOS builds.trueenablescom.apple.security.cs.allow-jitfor hardened runtime. ParparVM is AOT-compiled so this isfalseby default; flip when bundling a JIT-using cn1lib.- Default:
DEFAULT
-
entitlementsAppSandbox
Toggle entitlementsAppSandboxmacOS builds.trueenablescom.apple.security.app-sandbox. Default istruefor theappStorechannel,falsefordeveloperID. The App Store channel is always sandboxed whatever this says -- the Mac App Store requires it, and a package built without the sandbox gets rejected at submission rather than at build time. The refusal is reported in the build log.- Default:
DEFAULT
-
entitlementsExtra
String entitlementsExtramacOS builds. Free-form XML inserted verbatim inside the<dict>...</dict>of the generated entitlements plist. Use for entitlements Codename One doesn't expose individually.- Default:
""
-
entitlementsFilesDownloads
Toggle entitlementsFilesDownloadsmacOS builds.trueaddscom.apple.security.files.downloads.read-write, which is access to the Downloads folder without a panel. Defaultfalse, and separate frommacos.entitlements.files.userSelectedabove because it's a wider grant than picking a file.- Default:
DEFAULT
-
entitlementsFilesUserSelected
FileAccess entitlementsFilesUserSelectedmacOS builds.readwrite(default),readonly, ornone. Sets the matchingcom.apple.security.files.user-selected.*entitlement -- the files the user picks in an open or save panel, and nothing else.- Default:
DEFAULT
-
entitlementsHardenedRuntime
Toggle entitlementsHardenedRuntimemacOS builds.truewritescom.apple.security.cs.allow-jitandcom.apple.security.cs.allow-unsigned-executable-memoryinto the entitlements as explicit denials;falseleaves them out. It doesn't switch the hardened runtime on or off -- that'smacos.hardenedRuntimeabove. Default istruefordeveloperID,falseforappStore.- Default:
DEFAULT
-
entitlementsNetworkClient
Toggle entitlementsNetworkClientmacOS builds. Togglescom.apple.security.network.client. Defaulttrue.- Default:
DEFAULT
-
entitlementsNetworkServer
Toggle entitlementsNetworkServermacOS builds. Togglescom.apple.security.network.server. Defaultfalse.- Default:
DEFAULT
-
fixedWindowSize
String fixedWindowSizemacOS builds. Opt-in. Format<width>x<height>-- for example1024x685. When set, the window's minimum and maximum size are pinned to the requested size so every launch produces a byte-identical window. Default unset, in which case the window is resizable. The CI screenshot pipeline turns this on to keep the strict-pixel golden comparison stable; production apps should leave it off.- Default:
""
-
hardenedRuntime
Toggle hardenedRuntimemacOS builds. Sets Xcode'sENABLE_HARDENED_RUNTIME. Defaulttrue, because notarization requires it. This is the build setting; the entitlement hint below is a different thing despite the similar name.- Default:
DEFAULT
-
loadsExternalCode
Toggle loadsExternalCodemacOS builds.truegrants the hardened-runtime exception for loading unsigned libraries. A Codename One application doesn't load code that way, but a cn1lib shipping a dylib needs this, or the load is refused at runtime with nothing in the application's own logs.- Default:
DEFAULT
-
minDeploymentTarget
String minDeploymentTargetmacOS builds. Minimum macOS version (MACOSX_DEPLOYMENT_TARGET). Default11.0on the native macOS build, which is the floor for a universal Apple silicon binary. The legacy Mac Catalyst target defaults to10.15.- Default:
""
-
packaging
String packagingmacOS builds.app,dmg,pkgorboth. Unset, each channel takes its own default --pkgforappStore, because productbuild's output is what you upload, anddmgfordeveloperID. Set explicitly, the value applies to every channel. A cloud build always ships a file, soappthere means the bundle zipped withdittorather than the raw.appdirectory.- Default:
""
-
themeMode
String themeModemacOS builds. Which native theme the application installs:modern(equivalentlyliquidormaterial) orios7(equivalentlyflat). Defaults tomodern, which is where this target parts company with iOS -- iOS keeps the legacy theme by default so that applications already shipped, and their screenshot baselines, keep rendering as before. There is no such history here, and the legacy theme defines no dark styles at all, so an application on it renders light however it asks for dark. The cross-platformnativeThemehint is honoured when this is unset, withlegacymapping toios7.- Default:
""
-
plistInject
String plistInjectmacOS builds. Raw XML members added to the generatedInfo.plist, the same formios.plistInjecttakes -- for example<key>NSAppTransportSecurity</key><dict/>. A key that the build also generates is replaced by the injected one, and the build log names it.ios.plistInjectis read when this is unset, so a project migrated from the Mac Catalyst build keeps its injections.- Default:
""
-
provisioningProfileAppStore
String provisioningProfileAppStoremacOS builds. Provisioning profile name for App Store distribution -- used only whenmacNative.signing.style=manual.- Default:
""
-
provisioningProfileDeveloperID
String provisioningProfileDeveloperIDmacOS builds. Provisioning profile name for Developer ID distribution -- used only whenmacNative.signing.style=manual.- Default:
""
-
signingStyle
String signingStylemacOS builds.manual(default) signs with the certificate identity hints below, verbatim.automaticlets Xcode resolve the certificate from the team and provisioning profile instead. Manual is the default because a build server has an installed certificate and no Xcode account session, and automatic signing there stops to ask you to sign in; use automatic when building on your own machine.- Default:
""
-
signingIdentityAppStore
String signingIdentityAppStoremacOS builds. Signing certificate identity for the App Store channel. Default
Apple Distribution.Unlike the Developer ID channel, this one rejects
none. An unsigned application still gets packaged into a signed.pkg, so the build reports success and App Store Connect rejects the upload hours later for an application with no signature and none of the sandbox entitlements it has to carry. The build fails immediately instead, naming this hint. Build only thedeveloperIDchannel to get an unsigned application.An empty value reads as unset and takes the default, which is why the Developer ID channel spells the escape hatch
nonerather than "".- Default:
""
-
signingIdentityDeveloperID
String signingIdentityDeveloperIDmacOS builds. Signing certificate identity for the Developer ID channel. DefaultDeveloper ID Application. Set it tononeto build unsigned.- Default:
""
-
signingIdentityInstaller
String signingIdentityInstallermacOS builds. The certificateproductbuildsigns a.pkgwith --3rd Party Mac Developer Installerfor the App Store,Developer ID Installerfor direct distribution. This is a different certificate frommacos.signingIdentity.appStore, which signs the application, so it has a hint of its own rather than being derived from that one. Required whenever a package is produced, which includes the App Store default: the build fails with an explanatory error rather than writing an unsigned package, because App Store Connect refuses one and Gatekeeper won't accept it as Developer ID distribution however well the enclosed application is signed.- Default:
""
-
signingIdentityInstallerAppStore
String signingIdentityInstallerAppStoremacOS builds. The installer certificate for the App Store channel specifically, whenmacos.distribution=bothproduces a package on each side. They're different certificates, so one shared value signs both packages with the same one and leaves one of them unusable. Unset, the sharedmacos.signingIdentity.installerapplies.- Default:
""
-
signingIdentityInstallerDeveloperID
String signingIdentityInstallerDeveloperIDmacOS builds. The installer certificate for the Developer ID channel specifically. Unset, the sharedmacos.signingIdentity.installerapplies.- Default:
""
-
sourceOnly
Toggle sourceOnlymacOS builds.truestops after generating the Xcode project, which is what themac-sourcetarget delivers. Set by that target rather than by hand.- Default:
DEFAULT
-
teamId
String teamIdmacOS builds. Apple Developer Team ID (alphanumeric). Falls back toios.release.teamId->ios.teamId->ios.debug.teamIdsince most apps share a single Apple Developer Team for iOS and Mac.- Default:
""
-
urlSchemes
String urlSchemesmacOS builds. Custom URL schemes to register, comma separated.ios.urlSchemesand thenios.urlSchemeare read when this is unset, so a project migrated from the Mac Catalyst build keeps its deep links.- Default:
""
-