Apache Cordova iOS

repository·master·Indexed 25 days ago

https://github.com/apache/cordova-ios

An application library that enables Cordova-based projects built with HTML, CSS, and JavaScript to be compiled and run on the iOS platform. It includes the CordovaLib framework for managing application lifecycles via CDVAppDelegate and CDVViewController, and provides the CDVPlugin class for extending native functionality. Documentation covers requirements for iOS 13+ and Xcode 15, plugin communication using CDVInvokedUrlCommand and CDVPluginResult, and migration guides for version 8.x.

Tokens
11.3K
Snippets
29
Records
99
Agent score
81%

What's inside cordova-ios

  1. Configuration and behavior changes in recent versions

    master

    The following configuration and behavior changes were introduced in version 5.1.0 and later:

    Deployment Target

    • Minimum Deployment Target: The default minDeploymentTarget in the Podfile is bumped to 10.0 (as of version 5.1.0).

    WebView Configuration

    • UIWebView Disabling: An optional compile-time decision has been added to allow disabling UIWebView (introduced in 5.1.0).

    Orientation

    • Orientation Pre-filling: The system no longer pre-fills the orientation setting (introduced in recent versions).
    • Deprecated Methods: Deprecated orientation methods have been removed.

    Bundle Identifier

    • Bundle ID: The bundleid is now only set to the main app target.
  2. Use the new exec() wire format

    master
    In recent updates (around version 2.1.0), the default wire format for the exec handler changed from iframe to xhr. This change was implemented to improve performance and reliability (addressing issues like click/touch events not firing after CSS scrolls). Ensure your plugins are updated to the new signature to support this communication method.
  3. Handle the webView property change in CDVViewController

    master

    In CDVViewController.h, the webView property has been modified to be of type UIView* instead of UIWebView*. This change allows for different types of WebView engines. If your code requires UIWebView specific functionality, you must check the class type before casting.

    if ([self.webView isKindOfClass:[UIWebView class]]) {
        // call a UIWebView specific method here, for example
        [((UIWebView*)self.webView) goBack];
    }
  4. Architecture requirements for arm64

    master
    Starting with version 3.5.0, cordova-ios supports the arm64 architecture. Note that version 3.5.0 also dropped support for iOS 5.0. If you are targeting modern devices, ensure your build scripts and environment are configured for arm64 support.
  5. Migrate config.xml plugin definitions

    master
    For older versions of Cordova iOS, the way plugins are defined in config.xml has changed. The <plugin> element is being deprecated in favor of the <feature> element with associated <param> elements (CB-1108, CB-3166).