October 2014
Intermediate to advanced
332 pages
6h 56m
English
As specified in our plugin.xml file's platform section for iOS, the implementation of our plugin in iOS is located at the src/ios/Sms.h and src/ios/Sms.m Objective-C files. The following code snippet shows the Sms.h file (the header file):
#import <Cordova/CDV.h>
#import <MessageUI/MFMessageComposeViewController.h>
@interface Sms : CDVPlugin <MFMessageComposeViewControllerDelegate> {
}
@property(strong) NSString* callbackID;
- (void)sendMessage:(CDVInvokedUrlCommand*)command;
@endThe preceding code declares an Sms class that extends CDVPlugin. It is important to note that in order to create a Cordova iOS plugin class, our Objective-C plugin class must extend the CDVPlugin class. In our Sms class declaration, there is a declared ...
Read now
Unlock full access