Create a mobile application with ionic and backand.
-
Install latest nodeJs https://nodejs.org/
-
Install Ionic. ionic.
npm install -g cordova ionic
-
clone repo https://github.com/backand/backand-ionic3-starter.git
-
cd
backand-ionic3-starter
-
Configure backand credentials in
app.module.ts
this.backand.init({
appName: 'your app name',
signUpToken: 'your signup token',
anonymousToken: 'your anonymous token',
runSocket: true
mobilePlatform: 'ionic'
});
- Launch application in browser
ionic serve
Please follow below steps to start backand integration in your ongoing projects.
- Install dependencies
npm i -S @backand/angular2-sdk socket.io-client @types/node @types/socket.io-client ionic-native
- Install Cordova Plugins(Optional - you may have already installed)
ionic cordova plugin add cordova-plugin-inappbrowser
- Add plateforms (Android/iOS) - Optional:
ionic cordova platform add <platform>
ionic cordova run <platform>
- Setting up your own Backand application -
- Create a free personal application at backand.com
- Configure backand credentials in
app.module.ts
this.backand.init({ appName: 'your app name', signUpToken: 'your signup token', anonymousToken: 'your anonymous token', runSocket: true mobilePlatform: 'ionic' });
In App social login is intended to use the native social SDK of Faceboook or Google. For Google this is due to recent restrictions in Google that prevent using the Signup with Google through web views.
In the signup
screen we label this functionality as In App Social
Install Ionic Native Google Plus plugin
Install Ionic Native Facebook plugin
When an Ionic web app is shared in Facebook feed, the usual Backand social signup with Facebook will not work.
- Detect this case in your code with:
function isFacebookApp() {
var ua = navigator.userAgent || navigator.vendor || window.opera;
return (ua.indexOf("FBAN") > -1) || (ua.indexOf("FBAV") > -1);
}
- Install ngx-facebook:
npm install ngx-facebook --save
- Use the code labeled
Social Web
in signup screen.