IBM Worklight - How do I patch Cordova? - mobile

While adding support for the Windows 8 environment, I've hit a Cordova bug. The folders are being reported as files when I get the directory listing: https://issues.apache.org/jira/browse/CB-5774
I want to apply the patch in my project as I understand you cannot upgrade the Cordova version in a Worklight project.
I am using Worklight 6.1.0.

I figured out a way to patch (JavaScript patch).. I am sure this is not a permnant solution - but a adhoc one till the patched Cordova is available with a new version of Worklight.
In my case the bug was in FileProxy.js. I created a directory structure to mirror the location of the problem file and added the patched file there.(www\worklight\plugins\org.apache.cordova.file\src\windows8\FileProxy.js).
At build time the cordova files are copied first and then www contents are copied after... so my patched file overwrote the one with the bug.
I'm sure this is not a supported way by Worklight - but I am no longer blocked.

It is currently not possible to replace or patch the Cordova version that is being used in Worklight. In Worklight v6.1.0, Cordova v3.1 is used.
If you are an IBM customer or business partner you can open a PMR to see if an iFix can be produced that will contain a patched version of Cordova 3.1.

Related

Why does my Windows Application Packaging project think my solution is a net 6 solution?

My solution is a net 5 solution. I've been through all of the nuget packages to make sure they are all 'net5' compatible and checked that all the .csproj target frameworks do indeed say net5.0 yet when I go to package my application (MyProj.Installer - Windows packaging application) it shows me a warning:
Warning NU1702 ProjectReference 'C:\Users\rich-\source\repos\MyProjGit\MyProj\MyProj.csproj' was resolved using '.NETCoreApp,Version=v6.0' instead of the project target framework '.NETFramework,Version=v4.5.1'. This project may not be fully compatible with your project. MyProj.Installer C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1718
I have no idea where it is getting .NETFramework,Version=v4.5.1 from as the oldest version my project has ever been is 4.7.2 but more to the point it thinks it is a net6 application when it is a net5 application.
It goes through and packages the app as an msix file and I can install it after signing of course however the app fails to launch and I believe the reason is down to the warning I describe above. Am I missing any steps for packaging a net 5 application? I've taken the exact steps I have for a net framework application that have worked in the past.
So the app not loading was two fold. The app primarily didn't load as Entity Framework core 5 is referencing the wrong version of SQL Client. See https://github.com/dotnet/SqlClient/issues/652.
The second reason why the app wouldn't load was because the msix was trying to access a file I had open on another networked computer. See the section common problems https://learn.microsoft.com/en-us/windows/msix/packaging-tool/tool-known-issues.
Still no idea why the packaging project think it is net6 howwever.

Which version of Eclipse works with PHP Google App Engine?

I've search in vain for about a month now and I can't get my PHP application pushed to Google App Engine, for the PHP platform. I've got the Java version set up nicely on my computer. I followed the instructions for GAE PHP here: https://developers.google.com/appengine/docs/php/gettingstarted/introduction
..but it's really confusing because it essentially tells me to install Eclipse made for PHP which is Luna, but the only versions of Eclipse that GAE supports is Kepler, Juno and Indigo (https://developers.google.com/eclipse/docs/getting_started), so I'm super confused.
I don't think you can install two different GAE plugins on a standard version of Eclipse (which is what I use for the Java GAE plugin).
I also tried (in vain, but it was worth a shot) to upload my app using my Java plugin/setup and obviously this was a terrible idea because all it does is just print the php script/code to the browser.
Any thoughts, brothas/sistas?
I have figured out how to push php files to GAE. There are essentially 3 ways.
Use appcfg.py. Run following command:
--appcfg.py update helloworld/, where helloworld is replaced by the name of the folder containing your project files. Make sure the path is relative to appcfg.py directory or an absolute path.
--Enter your Google username and password at the prompts.
**2. Use the App Engine Launcher, probably found in C:\Program Files (x86)\Google\google_appengine\launcher. Executable is called GoogleAppEngineLauncher.exe. Simply select the project in Launcher and click Deploy.
**3. Use Git. Create a local repository on your machine. Add a repo to your Github account, and follow these instructions: https://developers.google.com/appengine/docs/push-to-deploy#creating_a_cloud_project
**4. Use PhPStorm. Download PHPStorm for free for 30 days, or buy a student version/whatever version you quality for here: . Then follow these instructions: http://confluence.jetbrains.com/display/PhpStorm/Getting+Started+with+PhpStorm+as+Google+App+Engine+PHP+IDE. The only thing I haven't figured out is #5 - where to find the php-cgi.exe file. I can't provide a path for a file I don't have.
** denotes super easy and I have used successfully.
The Google Plugin for Eclipse is only for Java applications. For PHP applications, you'll want to use the Python/PHP SDK and either the command-line tools or the Launcher UI app for running the development server. You can still use Eclipse for editing your PHP source files.
RE #5 - "I can't provide a path for a file I don't have".
That was also my problem.
They are fond of pointing out that the SDK directory should contain dev_appserver.py and ‘google’ and ‘php’ packages but you don't find those in a simple search cause they are invisible. You have to muck through the installation directory.

Integrate Flurry Analytics into a MonoTouch app

I've installed XCode and MonoTouch and built a basic app.
I'm trying to integrate Flurry Analytics into my application. I signed up and downloaded the SDK but I don't know what to do with it. I think I need a binding library and I found this one on GitHub.
Should I clone that repository or is it already installed somewhere because I have MonoDevelop installed? Is there somewhere standard I should clone it to?
I then add a reference from my application to the FlurryAnalytics.dll. Do I need to do anything with the FlurryAnalytics SDK?
You only have to add a reference to FlurryAnalytics.dll in your project, no need to do anything with the SDK you downloaded.
But have in mind that the dll in that git repository might be somewhat out of date, in which case you should rebuild the dll (and in this case you do need the SDK). Here is what you need to do:
Find libFlurry.a in the SDK and put it in the repository's FlurryAnalytics/binding directory.
Open a terminal and navigate to the repository's FlurryAnalytics/binding directory.
Execute make.
This should build an updated FlurryAnalytics.dll.

Wikitude Phonegap iOS Plugin

I have configured the Wikitude iOS plugin as suggested here -
https://github.com/phonegap/phonegap-plugins/tree/master/iOS/AugmentedReality-Wikitude/Plugin
However, during the compilation it is showing me build error - WTArchitechview.h not found in WTWikitiudePlugin.m file.
I am currently having iOS 6 device and using Cordova 2.0.0. I found one guide in the wikitude documentation -
http://forum.wikitude.com/documentation?p_p_id=2_WAR_knowledgebaseportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_2_WAR_knowledgebaseportlet_mvcPath=%2Fdisplay%2Fview_article.jsp&_2_WAR_knowledgebaseportlet_resourcePrimKey=128189
It says I have to remove the armv7s architecture and have to do some modification files. I was not able to understand that modification part. I mean which file I have to modify.
I think you're having two problems.
The first is, that you have to download the Wikitude SDK from there website and then add the files from the SDK into your phonegap Xcode project (Follow the steps described in your first link). If you did this and still having compile time errors, make sure that either your user header search path from your Xcode project is set correctly or you copied the Wikitude SDK files into the folder which are already setup in the sample project. You can also remove the existing Wikitude SDK folder in your Xcode project and drag the one in, which you have downloaded.
The second link describes what you need to change in order to build your project with the Wikitude SDK in Xcode 4.5. You need to change this in your Xcode project settings. You have to do this because the Wikitude SDK needs some libraries which are not available for the armv7s architecture right now.

Google App Engine .jsp Problem

I just created a .jsp file in my google app engine project. How to resolve the below error.
Description Resource Path Location Type
Your project must be configured to use a JDK in order to use JSPs
proj1.jsp
/Proj1/war Unknown Google App Engine Problem
Kindly let me know.
it is the error. In order to compile jsp you need a jdk installed in your system. If you are running on a JRE you will get this error. Also make sure that your project has been configured with a jdk in it's path.
For sake of improving answers
stack over flow reference
.jsp file not working for Google App Engine guestbook tutorial
the accepted answer was a year ago
updated answer from reference
In the end I seem to have wasted my bounty as I found the solution (with a little help) myself.
The problem arose because I was unfamiliar with Eclipse. When I found the more verbose error message Your project must be configured to use a JDK in order to use JSPs guestbook.jsp.
It was located in a tab called 'Markers' in pane found at the bottom of the Eclipse window.
It seems that Eclipse wasn't aware that I had installed the JDK.
In Eclipse I went to menu Window->Preferences->Java->Installed JREs . Eclipse had only one entry there named jre6 I clicked the Add... button Chose Standard VM and browsed to the base directory of the jdk (in my case C:\Program Files\Java\jdk1.6.0_20)
I rebuilt my project but the same error was there. I had forgotten to check the box that tells Eclipse to use the jdk instead of the jre.
As soon as I did that Eclipse rebuilt my project and the error was gone.
To solve this problem, first please confirm that JDK is already install on your computer. If it not available, go to Oracle JDK hompage to download and install it.
Then follow some steps to config JDK.
When JDK is configured, return eclipse and build project if you still get current error, I decide you are using JRE instead JDK. Choose Prefrences - Java - Install JRE - Un-check JRE and check JDK
Rebuild project
Hope this help!
Set JDK as your Installed JREs in Eclipse.
In Eclipse Window->Preference->Java->Installed JREs
Click on Add Button | Select VM ->Add JRE
Select Folder of jdk as "JRE Home" Directory.
Click OK.
Build your GAE Project
JFTR:
For those who use Ubuntu and OpenJDK, and may come here looking for help on the same issue: EVEN when it is called Open*JDK* (i.e. java-6-openjdk) actually you may have installed only the JRE part since they are on different packages, so you need to install also the JDK. For version 6 this is done via:
$ sudo apt-get install openjdk-6-jdk
Note that you may have yet an openjdk-6-jre in your system.
If your problem persist, you must sure that in your project use JDK library. Go to your project->click right->Build Path->Configure Build Path->Add library->JRE System Library->Select "Workspace default JRE (jdk1...)"->Finish, and in "Order and Export" UP your JDK Library above JRE Library. When you save your proyect it´s ok.

Resources