iOS Plugin Development
iOS Plugin Development Guide
This section provides details for how to implement native plugin code on the iOS platform. Before reading this, see [Plugin Development Guide][plugin-dev] for an overview of the plugin's structure and its common JavaScript interface. This section continues to demonstrate the sample echo plugin that communicates from the Cordova webview to the native platform and back.
An iOS plugin is implemented as an Objective-C class that extends the CDVPlugin
class. For JavaScript's exec
method's service
parameter to map to an Objective-C class, each plugin class must be registered as a <feature>
tag in the named application directory's config.xml
file.
Plugin Class Mapping
The JavaScript portion of a plugin uses the cordova.exec
method as follows:
e