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 builder's own default applies; the values shown here are that default, for reference.

Generated from com.codename1.build.shared.BuildHints by BuildHintCodeGenerator. Do not edit by hand -- edit the catalog and re-run scripts/gen-build-hint-annotations.sh.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A semicolon separated list of libraries that should be linked to the app to build it Values are joined with ; when the hint is written.
    Comma separated list of url schemes that canExecute will respect on iOS.
    Objective-C code that can be injected into the iOS app delegate at the top of the body of the didFinishLaunchingWithOptions callback method
    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
    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.
    Minimum iOS version the build targets.
    Objective-C code that can be injected into the iOS app delegate at the top of the file.
    boolean
    true/false (defaults to false).
    UIInterfaceOrientationPortrait by default.
    The null and empty-string reads of this hint are presence checks; 6.0 is the substantive default (IPhoneBuilder.java:4671).
    boolean
    true/false defaults to false but defined on new projects as true by default.
    boolean
    Added the -ObjC compile flag to the project files which some native libraries require
    entries to inject into the iOS plist file during build.
    A comma separated list of https://cocoapods.org/[Cocoa Pods] that should be linked to the app to build it.
    Sets the Cocoapods 'platform' for the Cocoapods.
    Extra CocoaPods spec repositories to search, in addition to the default trunk.
    boolean
    true/false defaults to false.
    one of ios, ipad, iphone (defaults to ios).
    Swift Package Manager packages to link, one per entry, each written as identity|url|requirement.
    Specifies the team ID associated with the iOS provisioning profile and certificate.
    auto (default), modern, ios7, legacy.
    boolean
    true/false (defaults to true).
    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 Values are joined with ; when the hint is written.
      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 Values are joined with , when the hint is written.
      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:
      AUTO
    • 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

      boolean 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:
      false
    • 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 default (IPhoneBuilder.java:4671).
      Default:
      "6.0"
    • newStorageLocation

      boolean newStorageLocation
      true/false defaults to false but defined on new projects as true by default. This changes the storage directory on iOS from using caches to using the documents directory which is the recommended location but might break compatibility. This is described in https://github.com/codenameone/CodenameOne/issues/1480[this issue]
      Default:
      true
    • objC

      boolean objC
      Added the -ObjC compile flag to the project files which some native libraries require
      Default:
      false
    • 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 Values are joined with , when the hint is written.
      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. Values are joined with , when the hint is written.
      Default:
      {}
    • prerenderedIcon

      boolean 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:
      false
    • 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:
      IOS
    • spmPackages

      String[] spmPackages
      Swift Package Manager packages to link, one per entry, each written as identity|url|requirement. Values are joined with ; when the hint is written.
      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

      IosThemeMode 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:
      AUTO
    • uiscene

      boolean 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:
      true
    • urlScheme

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