Skip to content

bitjson/cordova-plugin-hello

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Hello World Plugin

Simple plugin that returns your string prefixed with hello.

Greeting a user with "Hello, world" is something that could be done in JavaScript. This plugin provides a simple example demonstrating how Cordova plugins work.

Install

Checkout this repo and switch to the swift branch then install with

$ cordova plugin add <path>

Afterwards open xcode by

$ open platforms/ios/<Project Name>.xcodeproj

go into settings change deployment target to 7.0 or above and add <Project Name>/Plugins/com.example.hello/Bridging-Header.h to Objective-c Bridging Header under the Swift Compiler - Code Generation options

Finally add the following LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

Test

Add the following to index.js onDeviceReady:

var win = function (result) {
    alert(result);      
},
fail = function (error) {
    alert("ERROR " + error);
};

hello.greet("World", win, fail);

About

Sample Hello World Cordova Plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 27.9%
  • C# 24.7%
  • Swift 18.3%
  • JavaScript 17.5%
  • Objective-C 11.6%