Posts

Showing posts from October, 2017

Navigate from one ViewController to other

How to navigate the ViewController from one page to another using NavigationController?         let  nextView = self .storyboard?.instantiateViewController(withIdentifier: "viewidentifier" ) as ! ViewController          self .navigationController?.pushViewController(nextView, animated: true ) The above code will navigate the data to another viewcontroller with navigation stack

CORDOVA Plugin Firebase

Firebase plugin configuration  $ sudo cordova plugin add cordova-plugin-firebase-realtime-database --save The above command will save the firebase plugin inside your project. After that go ahead to the google firebase console and create an app using your bundle identifier (Note:Bundle identifier must be matches otherwise the firebase notification will not works). $ sudo cordova build ios After that goto your project -> Target ->Info -> Url Types It will show additional url type properties. Then paste inside identifier - "REVERSED_CLIENT_ID" and URL schemes as "com.googleusercontent.apps. appidinthefirebaseportal "

CORDOVA Commands for Phongap

Here below are the commands in phonegap for step by step creation and execution of project. Install phone in the Mac: $ sudo npm install -g phonegap@latest It will show some set of command lines for installation. Create new project in Phonegap: $ sudo phonegap create mynewApp The above command will create myApp as an app name and proceed with that.If you want create an app with bundle identifier also the proceed with the below commands. $ sudo phonegap create mynewApp --id "org.companyname.mynewApp" --name "mynewApp" After that enter into the folder and then add the platforms $ cd mynewApp Add the platform: $  cordova platform add ios $ cordova platform add android The above commands are adding the platform in the cordova project Add the plugin $ sudo cordova plugin add pluginName For plugin name we can use the plugin to install and deploy the project Build the project: $  sudo cordova build ios The above command will build th