Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying JavaScript Mobile Application Development
  • Table Of Contents Toc
JavaScript Mobile Application Development

JavaScript Mobile Application Development

By : Saleh
4.8 (4)
close
close
JavaScript Mobile Application Development

JavaScript Mobile Application Development

4.8 (4)
By: Saleh

Overview of this book

If you are a native mobile developer, with some familiarity with the common web technologies of JavaScript, CSS, and HTML, or if you are a web developer, then this learning guide will add great value and impact to your work. Learning how to develop mobile applications using Apache Cordova is of particular importance if you are looking to develop applications on a variety of different platforms efficiently.
Table of Contents (10 chapters)
close
close
9
Index

Developing iOS code


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;
@end

The 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 callbackID property of the NSString type and a declared sendMessage method, which returns void and takes CDVInvokedUrlCommand as a parameter. Now, let's move on to the Sms class implementation. The following code snippet shows...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
JavaScript Mobile Application Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon