# Annotation Type Ios

@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.

- ## Optional Element Summary

  Optional Elements
  Modifier and Type
  Optional Element
  Description
  `String[]`
  `addLibs`
  A semicolon separated list of libraries that should be linked to the app to build it
  `String[]`
  `applicationQueriesSchemes`
  Comma separated list of url schemes that `canExecute` will respect on iOS.
  `String`
  `beforeFinishLaunching`
  Objective-C code that can be injected into the iOS app delegate at the top of the body of the didFinishLaunchingWithOptions callback method
  `String`
  `bundleVersion`
  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
  `IosDependencyManager`
  `dependencyManager`
  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.
  `String`
  `deploymentTarget`
  Minimum iOS version the build targets.
  `String`
  `glAppDelegateHeader`
  Objective-C code that can be injected into the iOS app delegate at the top of the file.
  `Toggle`
  `includePush`
  true/false (defaults to false).
  `String`
  `interfaceOrientation`
  UIInterfaceOrientationPortrait by default.
  `String`
  `minDeploymentTarget`
  The null and empty-string reads of this hint are presence checks; 6.0 is the substantive one.
  `Toggle`
  `newStorageLocation`
  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.
  `Toggle`
  `objC`
  Added the `-ObjC` compile flag to the project files which some native libraries require
  `String`
  `plistInject`
  entries to inject into the iOS plist file during build.
  `String[]`
  `pods`
  A comma separated list of https://cocoapods.org/[Cocoa Pods] that should be linked to the app to build it.
  `String`
  `podsPlatform`
  Sets the Cocoapods 'platform' for the Cocoapods.
  `String[]`
  `podsSources`
  Extra CocoaPods spec repositories to search, in addition to the default trunk.
  `Toggle`
  `prerenderedIcon`
  true/false defaults to false.
  `IosProjectType`
  `projectType`
  one of ios, ipad, iphone (defaults to ios).
  `String[]`
  `spmPackages`
  Swift Package Manager packages to link, one per entry, each written as identity|url|requirement.
  `String`
  `teamId`
  Specifies the team ID associated with the iOS provisioning profile and certificate.
  `ThemeMode`
  `themeMode`
  `auto` (default), `modern`, `ios7`, `legacy`.
  `Toggle`
  `uiscene`
  true/false (defaults to true).
  `String`
  `urlScheme`
  Allows intercepting a URL call using the syntax `<string>urlPrefix<string>`

- ## Element Details

  - ### addLibs

    String[] addLibs
    A semicolon separated list of libraries that should be linked to the app to build it
    Default:
      `{}`

  - ### applicationQueriesSchemes

    String[] applicationQueriesSchemes
    Comma separated list of url schemes that `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,myotherurl`
    Default:
      `{}`

  - ### beforeFinishLaunching

    String beforeFinishLaunching
    Objective-C code that can be injected into the iOS app delegate at the top of the body of the didFinishLaunchingWithOptions callback method
    Default:
      `""`

  - ### bundleVersion

    String bundleVersion
    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
    Default:
      `""`

  - ### dependencyManager

    IosDependencyManager dependencyManager
    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. An unrecognized value fails the build.
    Default:
      `DEFAULT`

  - ### deploymentTarget

    String deploymentTarget
    Minimum iOS version the build targets. Set it to the lowest iOS you actually support; a higher value excludes older devices from the App Store listing.
    Default:
      `""`

  - ### glAppDelegateHeader

    String glAppDelegateHeader
    Objective-C code that can be injected into the iOS app delegate at the top of the file. For example, if you need to include headers or make special imports for other injected code
    Default:
      `""`

  - ### includePush

    Toggle includePush
    true/false (defaults to false). Whether to include the push capabilities in the iOS build. Notice that the IDE plugin has an "Include Push" check box you should use under the iOS section.
    Default:
      `DEFAULT`

  - ### interfaceOrientation

    String interfaceOrientation
    UIInterfaceOrientationPortrait by default. Indicates the orientation, one or more of (separated by colon :): `UIInterfaceOrientationPortrait`, `UIInterfaceOrientationPortraitUpsideDown`, `UIInterfaceOrientationLandscapeLeft`, `UIInterfaceOrientationLandscapeRight`. Notice that the IDE plugin has an "Interface Orientation" combo box you should use under the iOS section.
    Default:
      `""`

  - ### minDeploymentTarget

    String minDeploymentTarget
    The null and empty-string reads of this hint are presence checks; 6.0 is the substantive one.
    Default:
      `""`

  - ### newStorageLocation

    Toggle newStorageLocation
    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. Described in https://github.com/codenameone/CodenameOne/issues/1480[this issue]
    Default:
      `DEFAULT`

  - ### objC

    Toggle objC
    Added the `-ObjC` compile flag to the project files which some native libraries require
    Default:
      `DEFAULT`

  - ### plistInject

    String plistInject
    entries to inject into the iOS plist file during build.
    Default:
      `""`

  - ### pods

    String[] pods
    A comma separated list of https://cocoapods.org/[Cocoa Pods] that should be linked to the app to build it. For example, `AFNetworking ~> 2.6, ORStackView ~> 3.0, SwiftyJSON ~> 2.3`
    Default:
      `{}`

  - ### podsPlatform

    String podsPlatform
    Sets the Cocoapods 'platform' for the Cocoapods. Some Cocoapods require a minimum platform level. For example, `ios.pods.platform=7.0`.
    Default:
      `""`

  - ### podsSources

    String[] podsSources
    Extra CocoaPods spec repositories to search, in addition to the default trunk.
    Default:
      `{}`

  - ### prerenderedIcon

    Toggle prerenderedIcon
    true/false defaults to false. The iOS build process adapts the submitted icon for iOS conventions (adding an overlay) that might not be appropriate on some icons. Setting this to true leaves the icon unchanged (only scaled).
    Default:
      `DEFAULT`

  - ### projectType

    IosProjectType projectType
    one of ios, ipad, iphone (defaults to ios). Indicates whether the resulting binary is targeted to the iphone only or ipad only. Notice that the IDE plugin has a "Project Type" combo box you should use under the iOS section.
    Default:
      `DEFAULT`

  - ### spmPackages

    String[] spmPackages
    Swift Package Manager packages to link, one per entry, each written as identity|url|requirement.
    Default:
      `{}`

  - ### teamId

    String teamId
    Specifies the team ID associated with the iOS provisioning profile and certificate. Use `ios.debug.teamId` and `ios.release.teamId` to specify different team IDs for debug and release builds respectively.
    Default:
      `""`

  - ### themeMode

    ThemeMode themeMode

    `auto` (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` / `iphone` loads the pre-iOS 7 iPhone theme. The `auto` -> modern flip is planned for a future release.
    Default:
      `DEFAULT`

  - ### uiscene

    Toggle uiscene
    true/false (defaults to true). Enables iOS UIScene lifecycle support. UIScene lets iOS manage one or more app UI sessions independently, improving lifecycle handling in modern iOS versions. Apple has indicated UIScene will be required starting with iOS 27, so this is now on by default; set the flag to `false` only if you need to temporarily fall back to the legacy `UIApplicationDelegate` lifecycle.
    Default:
      `DEFAULT`

  - ### urlScheme

    String urlScheme
    Allows intercepting a URL call using the syntax `<string>urlPrefix<string>`
    Default:
      `""`