@Retention(CLASS) @Target({TYPE})
public @interface Ios
iOS 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.
Methods
public abstract String[] addLibs() default {} | A semicolon separated list of libraries that should be linked to the app to build it |
public abstract String[] applicationQueriesSchemes() default {} | Comma separated list of url schemes that canExecute will respect on iOS. |
public abstract String beforeFinishLaunching() default "" | Objective-C code that can be injected into the iOS app delegate at the top of the body of the didFinishLaunchingWithOptions callback method |
public abstract String bundleVersion() default "" | Indicates the version number of the bundle, this is useful if you want to create a minor version number change for the beta testing support |
public abstract IosDependencyManager dependencyManager() default IosDependencyManager.DEFAULT | Which native dependency manager to use: auto picks one from whichever of ios.pods and ios.spm.packages is set, and cocoapods, spm or both require the matching hint to be set. |
public abstract String deploymentTarget() default "" | Minimum iOS version the build targets. |
public abstract String glAppDelegateHeader() default "" | Objective-C code that can be injected into the iOS app delegate at the top of the file. |
public abstract Toggle includePush() default Toggle.DEFAULT | true/false (defaults to false). |
public abstract String interfaceOrientation() default "" | UIInterfaceOrientationPortrait by default. |
public abstract String minDeploymentTarget() default "" | The null and empty-string reads of this hint are presence checks; 6.0 is the substantive one. |
public abstract Toggle newStorageLocation() default Toggle.DEFAULT | Stores app files under the documents directory rather than caches, which is the location Apple recommends but which may break compatibility with an app that already shipped. |
public abstract Toggle objC() default Toggle.DEFAULT | Added the -ObjC compile flag to the project files which some native libraries require |
public abstract String plistInject() default "" | entries to inject into the iOS plist file during build. |
public abstract String[] pods() default {} | A comma separated list of https://cocoapods.org/[Cocoa Pods] that should be linked to the app to build it. |
public abstract String podsPlatform() default "" | Sets the Cocoapods ‘platform’ for the Cocoapods. |
public abstract String[] podsSources() default {} | Extra CocoaPods spec repositories to search, in addition to the default trunk. |
public abstract Toggle prerenderedIcon() default Toggle.DEFAULT | true/false defaults to false. |
public abstract IosProjectType projectType() default IosProjectType.DEFAULT | one of ios, ipad, iphone (defaults to ios). |
public abstract String[] spmPackages() default {} | Swift Package Manager packages to link, one per entry, each written as identity|url|requirement. |
public abstract String teamId() default "" | Specifies the team ID associated with the iOS provisioning profile and certificate. |
public abstract ThemeMode themeMode() default ThemeMode.DEFAULT | auto (default), modern, ios7, legacy. |
public abstract Toggle uiscene() default Toggle.DEFAULT | true/false (defaults to true). |
public abstract String urlScheme() default "" | Allows intercepting a URL call using the syntax <string>urlPrefix<string> |
Method details
addLibs
public abstract String[] addLibs() default {}applicationQueriesSchemes
public abstract String[] applicationQueriesSchemes() default {}canExecute will respect on iOS.
If the url scheme isn’t mentioned here canExecute will return false
starting with iOS 9. Notice that this collides with ios.plistInject when
used with the <key>LSApplicationQueriesSchemes</key>... value so you
should use one or the other. For example, to enable canExecute for a url
like myurl://xys you can use: myurl,myotherurlbeforeFinishLaunching
public abstract String beforeFinishLaunching() default ""bundleVersion
public abstract String bundleVersion() default ""dependencyManager
public abstract IosDependencyManager dependencyManager() default IosDependencyManager.DEFAULTdeploymentTarget
public abstract String deploymentTarget() default ""glAppDelegateHeader
public abstract String glAppDelegateHeader() default ""includePush
public abstract Toggle includePush() default Toggle.DEFAULTinterfaceOrientation
public abstract String interfaceOrientation() default ""UIInterfaceOrientationPortrait,
UIInterfaceOrientationPortraitUpsideDown,
UIInterfaceOrientationLandscapeLeft,
UIInterfaceOrientationLandscapeRight. Notice that the IDE plugin has an
“Interface Orientation” combo box you should use under the iOS section.minDeploymentTarget
public abstract String minDeploymentTarget() default ""newStorageLocation
public abstract Toggle newStorageLocation() default Toggle.DEFAULTobjC
public abstract Toggle objC() default Toggle.DEFAULT-ObjC compile flag to the project files which some native
libraries requireplistInject
public abstract String plistInject() default ""pods
public abstract String[] pods() default {}AFNetworking ~> 2.6, ORStackView ~> 3.0, SwiftyJSON ~> 2.3podsPlatform
public abstract String podsPlatform() default ""ios.pods.platform=7.0.podsSources
public abstract String[] podsSources() default {}prerenderedIcon
public abstract Toggle prerenderedIcon() default Toggle.DEFAULTprojectType
public abstract IosProjectType projectType() default IosProjectType.DEFAULTspmPackages
public abstract String[] spmPackages() default {}teamId
public abstract String teamId() default ""ios.debug.teamId and ios.release.teamId to specify
different team IDs for debug and release builds respectively.themeMode
public abstract ThemeMode themeMode() default ThemeMode.DEFAULTauto (default), modern, ios7, legacy. auto (unset) keeps the
existing iOS 7 flat theme so pre-refactor screenshot goldens and apps see
no behavior change. modern / liquid opts in to the CSS-generated iOS
Modern (liquid-glass) theme shipped from
native-themes/ios-modern/theme.css. ios7 / flat is the same as auto
- pre-liquid iOS 7 flat theme;
legacy/iphoneloads the pre-iOS 7 iPhone theme. Theauto-> modern flip is planned for a future release.
uiscene
public abstract Toggle uiscene() default Toggle.DEFAULTfalse only if you need to temporarily fall back
to the legacy UIApplicationDelegate lifecycle.urlScheme
public abstract String urlScheme() default ""<string>urlPrefix<string>