If <preference name="scheme" value="app"/> plugin doesn't work - version-control

I found an issue when I have this line in config.xml because of iOS http requests the plugin doesn't load parameters from config.xml.
When I remove it, the plugin works fine. Is there any reason why it breaks the plugin?
Thanks so much.
see ref also in github for the original post from #zeroamps:
https://github.com/sampart/cordova-plugin-app-version/issues/135

Related

Google App Engine suddenly giving 404 for static files

When I tried accessing my GAE app today the server said that it couldn't find the static HTML file I wanted; it had been working fine yesterday, and I hadn't made any changes to appengine-web.xml or web.xml. The GAE logs say No handlers matched this URL. for the static files.
[Irrelevant details removed]
Stupid me, I had changed appengine-web.xml; specifically, I'd removed <include path="**"/> from the static-files section. Putting that back in fixed the problem.

Specifying app_id and app_name for facebookConnect in a multi-device hybrid app in VS2013 & W8.1

I've been banging my head on this one for a while now.
How do I specify the app_id and app_name when trying to use the facebookConnect plugin in a Multi-Device Hybrid app in Visual Studio 2013?
If I create a new solution using the CLI approach; something similar to:
cordova create MyTest <blah> <blah> <blah>
I can probably use the CLI to add the plugin with a command similar to: (Untested and the command might be slightly wrong)
cordova plugin add com.phonegap.plugins.facebookconnect
BUT...
How do I add it when I've created a Mutli-Device Hybrid app directly from within Visual Studio?
I've tried 2 approaches to get this to install:
Method 1:
Create a "plugin" directory
Download the code from
https://github.com/Wizcorp/phonegap-facebook-plugin and extract into
the plugin directory
Compile/build
This seems to "work" but then bombs out with:
Variable(s) missing: APP_ID, APP_NAME
Method 2:
Open the config.xml file
Add in the following "vs:feature" tag:
Compile/build
<vs:features>
<vs:feature>com.phonegap.plugins.facebookconnect</vs:feature>
This method also seems to "work", showing a line in the build Output window:
Calling plugman.fetch on plugin "com.phonegap.plugins.facebookconnect"
But then it too bombs out with the ever annoying:
Variable(s) missing: APP_ID, APP_NAME
Can someone PLEASE tell me where to add these two variables in so that the thing builds???
I have the values available.
I can't seem to use the CLI to install this plugin into my solution because I get an error like:
Current working directory is not a Cordova-based project
Thanks for any help you can offer.
I'd recommend going with method 1 since it provides greater flexibility to configure your plugin. That being said, what you are running into is a common issue with the FacebookConnect plugin when it is added manually instead of using the cordova CLI. To add the app ID and app name, do the following as documented here.
In plugin.xml, find the below lines <preference name="APP_ID">
<preference name="APP_NAME"> and modify them to <param name="APP_ID" value="<id of your app>" />
<param name="APP_NAME" value="<name of your app>" />
This will get you past the error.
However, the plugin is written in Java and the references are not precompiled. So, you will run into issues like com.facebook.blah not found. To get past these additional compilation issues, follow the instructions here, which let you build the plugin dependencies without eclipse.
To use the CLI to install the plugin, you need to run the commands from <projectRoot>\bld\debug\platform\<yourplatform> where the cordova projects are created.
What you probably miss is the renaming of the element from preference to param
in plugin.xml change preference to param for app name and app id an also enter their value.
<preference name="APP_NAME">
to
<param name="APP_NAME" value="<name of your app>" />

wso2is custom authenticationendpoint, redirect page not used

I am developing saml sso using wso2is. I customized the authentication endpoint according the blog post below 1. Basically I just deployed a war on my server and configured application-authenticators.xml to use it:
<Authenticators>
<Authenticator name="BasicAuthenticator" disabled="false" factor="1">
<!-- <Status value="10" loginPage="/authenticationendpoint/login.do" /> -->
<Status value="10" loginPage="https://servlet.example.com/customlogin/login.do" />
</Authenticator>
</Authenticators>
login is working fine, my custom login-page sends a form to "https://servlet.example.com/idp/commonauth" which redirects me to my sp. but I also want to customize the redirect-page after the login. in the custom endpoint there is a file named 'samlsso_redirect.jsp' which looks like it should do the work but its contents are ignored.
strangely 'samlsso_redirect.jsp' the the bundled authentication endpoint is also ignored.
I have also downloaded the sources of wso2is and found org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet hard codes the redirect message in the sendResponse() method.
Does somebody know how it is working and what I am missing here? How can I customize the redirect message?
http://dulanja.blogspot.sk/2014/01/wso2-is-samlsso-customizing-login-page.html
If you are using WSO2IS 5.0.0 version or higher version, You can simplify edit html file which can be found at IS_HOME\repository\resources\security\sso_redirect.html
Following applies to WSO2IS 4.6.0 and older versions
It seems to be that redirect page is can not be customized by using some extension. Please see this jira
However You can do as following if you want to customize it in 4.6.0...
svn checkout https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/identity/org.wso2.carbon.identity.sso.saml/4.2.2
In src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java you have to modify the HTML getting printed in sendResponse() method.
Build the component using maven and place as a patch in wso2is-4.6.0/repository/components/patches. Copy jar file into any patch directory
Restart the server
note : The built jar name appears as: org.wso2.carbon.identity.sso.saml-4.2.2.jar. Make sure to rename it to org.wso2.carbon.identity.sso.saml_4.2.2.jar (notice that the dash is replaced by an underscore) before placing in the patch folder.
If you are using IS 5.0 then you need to modify this page:
IS_HOME\repository\resources\security\sso_redirect.html

Phonegap 3.0 InAppBrowser - Provides no way for user to close

I had inApBrowser working in my app just fine... however, I upgraded some things and now it opens the URL without any way of closing it. You have to kill the app.
I have tried many variations of this: window.open('http://cnn.com','_blank','location=yes,toolbar=yes');
myconfig.xml has:
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>
I get no errors... the page opens... but there is no way to close and return to the app. I have seen a lot of folks putting solutions for URL recognition and making the window close... but I need the childBrowser plugin method... where the user can close the window when he/she is finished viewing the page.
Phonegap 3.0 -
JqueryMobile 1.2 -
IOS 7.0.2 -
xCode 5.0 -
Any help would be greatly appreciated!
Your syntax looks okay, but give these code snippets a try:
Pure JavaScript:
var ref = window.open('http://cnn.com', '_blank', 'location=yes,toolbar=yes');
HTML + JavaScript:
CNN Link
Also, check that you have correctly installed the InAppBrowser plugin (PhoneGap/Cordova 3.0+ need it to be installed separately via the command line). Your config.xml file looks correct, but just make sure that the rest of the plugin is installed properly.
You can use the following commands to list all the installed plugins in your project...
Using Cordova: cordova plugins
Using PhoneGap: phonegap local plugin list
You can also just go to your Desktop, navigate to the 'plugins' folder within your project and check that there is a folder named 'org.apache.cordova.inappbrowser' or 'org.apache.cordova.core.inappbrowser' inside.
To install the InAppBrowser plugin (if necessary)...
Using Cordova: cordova plugin add org.apache.cordova.inappbrowser
Using PhoneGap: phonegap local plugin add org.apache.cordova.inappbrowser
From your description, it sounds like your page is opening within the app's webview, instead of the InAppBrowser window. This is the behaviour you would normally get if you used '_self' instead of '_blank'. Hopefully something here will help fix it.
If you are using PhoneGap Build then you need to use different syntax i.e. (see plugin info):
<gap:plugin name="org.apache.cordova.inappbrowser" />
See also PGB plugin repository. It seem to be up-to-date now. You can see a simple test application for a working version.
Note that this might not be working if you are building yourself (locally on your computer). Use instructions by wicketyjarjar if you are building locally.
The inAppBrowser did not work with Phonegap 3.0.0, and had to change this in config.xml to make it work on both ios and Android :
<plugin name="inAppBrowser">
to
<gap:plugin name="org.apache.cordova.inappbrowser" />
Also if you would want to include emailcomposer use the below line in config.xml
<gap:plugin name="de.appplant.cordova.plugin.email-composer" />
and in the Javascript file add the below lines:
var ops = {
callback: function (result) {
navigator.notification.alert(result);
},
subject: "Look at this photo",
body: "Take a look at <b>this</b>:",
toRecipients: ["example#email.com", "johndoe#email.org"],
ccRecipients: [],
bccRecipients: [],
isHTML: true,
attachments: ["_complete_path/image.png"]
}
function mail(name, url) {
window.plugin.email.open({
to: [],
cc: [],
bcc: [],
subject: name,
body: url,
isHtml: true
});
}
I had the same problem. In my case it was caused by forgetting to include the cordova.js script.
<script type="text/javascript" src="cordova.js"></script>

GWT issue 2079 error message not possible to remove

i am using gwt and mgwt for my project.
When i am running my project on eclipse jetty server i get the following alert error message:
cross-site hosted mode not yet implemented. See issue http:// code.google.com/p/google-web-toolkit/issues/detail?id=2079
and this has to do wih the following linker in the appname.gwt.xml file
<add-linker name="xs" />
but when i remove the linker from the gwt.xml module the error is still there.
I cleaned the project and refreshed it but i get still the error message.
It's not possible to test the app in the browser any more.
How to solve the problem. Please help!
Try deleting the *.nocache.js file.
BTW, xs linker is deprecated, use the xsiframe one (which supports DevMode, as stated in issue 2079)
Replace 'xs' to 'xsiframe' in add-linker tag then after add this tag
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
then rebuild project