MFP CLI 7.1 adapter wont deploy with mfp push command - ibm-mobilefirst

I have my project on github https://github.com/drkhannah/KMF
I pushed this MFP cli 7.1 project to github and had a team member clone it
After an npm install, I tried the 'mfp cordova preview' command, errors said this wasnt an mfp project, then I tried 'cordova platform add ios and android', then 'mfp cordova preview' worked, is this only because the platforms folder was in the .gitignore?
Also I had trouble adding an adapter, since I uploaded to github without adapters, the adapters folder was empty, so git didn't track it, not till I added an adapters folder in my mfp project folder(server) could I get 'mfp adapter add' to work, but now 'mfp push' deploy the adapter, it only deploys the cordova app
Why is this happening?

I fixed this, I had to do mfp deploy from the mfp project folder, mfp push wasn't pushing the adapter, but mfp deploy did

Related

A dummies guide to installing a PhoneGap plugin

I am trying to build a basic QR code scanning app but I am not exactly sure how to add a plugin. I am trying to install - https://www.npmjs.com/package/cordova-plugin-barcodescanner
I have installed NPM, GIT and Cordova, and have deployed a Framework 7 based app from the phonegap software that has the following directory:
C:\Users\user\Documents\Phonegap Apps\Saving Energy\Android
I am unsure how to install the plugin? Do I run
npm i cordova-plugin-barcodescanner
in Windows Command Prompt, and if so do I have to change the directory to my app plugin folder? Do I run it using node.js? Etc.
You can add plugin easily using cordova
you should open command prompt with Saving Energy as directory and run
cordova plugin add [cordova-plugin-name]
For your case it is
cordova plugin add cordova-plugin-barcodescanner
Hope it Helps!

Build Cordova Browser for production

I have an Apache Cordova app which I have deployed for both ios and android. But i want to deploy it for my web server i.e. I want to deploy it on my server live so users can access it using their browsers. How can I go about it?
for android its cordova build android --release but for browser, I don't know which command to use for this operation.
For browser it is simply
cordova build browser --release

Installing cordova plugin in MFPF 7.1

can we install Cordova plugin "cordova-plugin-wkwebview-engine" in MFPF 7.1
If Yes, can someone please advise what steps we need to follow.
Thanks,
You can integrate cordova-plugin-wkwebview-engine plugin in your MFP 7.1 Cordova Application by following this blog if the app is built using Mobilefirst Studio Plugin.
If it is MFP 7.1 pure cordova application, you can add wkwebview plugin by running following command in terminal.
cordova plugin add cordova-plugin-wkwebview-engine
Note : MobileFirst Features like Direct Update, Server Notifications might stop working if you are using wkwebview plugin.
cordova-plugin-wkwebview-engine plugin needs cordova-ios >4.0.0.
where as MobileFirst CLI contains an instance of Cordova CLI v5.0.0, and iOS platform version 3.7.0.
for more details see here : link
So it may not work.Try below command if it works
mfp cordova plugin add cordova-plugin-wkwebview-engine

MobileFirst Android App giving alert "gap_init:2" on previewing

I am trying to upgrade to MF 7.1 from MF 7.0. After upgrade, when I deployed the application on server and preview the Android App, it displays below alert message:
I have following below steps to upgrade the project:
I used new eclipse for project upgrade: eclipse-jee-kepler-SR1-win32-x86_64.
Installed RTC 4.0.2 Client into the eclipse and restarted it.
Change the Workspace Text File Encoding to UTF-8.
Imported the MobileFirst 7.0 project from RTC.
Deleted "wlBuildResources" and "wlPreview" folders from %temp% ditecroty.
Installed MobileFirst Stidio IF : 7.1.0.0-MFPF-StudioP2-IF201509132345.
Restarted the eclipse.
Project upgraded to MF 7.1 successfully.
Installed the ADT To Eclipse using the update site and restarted the eclipse.
Right clicked on project name and Ran on MobileFirst Development Server.
Open the console and previewed the Android application and it displays the following alert: gap_init:2.
I have deleted , regenerated project but everytime I am getting this error. I have create a new project also
but I am getting the same alert message on previewing the Android application.
This happens due to a regression and is taken care of in APAR PI50036 CORDOVA "GAP_INIT:2" ERROR WHEN PREVIEWING ANDROID IN MBS
To receive the fix once it is available you should open an IBM PMR (support ticket) and mention the APAR number above.

IBM Worklight 6.1 - Unable to deploy upgraded project

After I migrated my project Worklight from version 6.0 to 6.1, the following error is occurring when trying to deploy the application:
[2013-12-19 11:37:02] FWLST1040E: android build failed: Cannot
overwrite template file
'C:\workspaces\worklight\CISSMartTax\apps\CISSMartTax\android\native\native.iml'
Unfortunately this currently works for me.
In Worklight 6.0.0.1 I've created a new Worklight project and application with the Android environment, built and deployed it
I then exported the Worklight project as a .zip file
In Worklight 6.1.0 I've imported the above .zipped project, built and deployed it
Ran the generated Android project in the Android emulator
This was with a blank new app; it's possible yours is more intricate than that.
Suggestions:
Delete the native folder and re-build and deploy.
Make sure to back-up any native Java classes and other artifacts you may have previously added to the native folder.
Provide your Worklight project (the original from 6.0.0.x) in a Dropbox download link for analysis...