Navigate to another Page Ionic on IOS - firebase

I have a Ionic Button, which register the User via Google Authentication and Firebase.
<ion-buttons end>
<a href="#" (click)="GoogleAuth()" target="_blank">
<img src="../../assets/signInButton.png">
</a>
</ion-buttons>
The Function is this:
async GoogleAuth() {
try {
const provider = new GoogleAuthProvider();
await this.afAuth.signInWithRedirect(provider);
} catch (error) {
console.log(error);
}
On Web everything works fine.
When I build the App for IOS it canĀ“t be open.
Therefore I installed the Package '<universal-links>'. When installed it the Error Message was at first :
<universal-links> tag is not set in the config.xml. Universal Links plugin is not going to work.
So I edited my config File in my xcode Project:
<widget id="de.markb.drinktogether" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>DrinkTogether</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi#ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<universal-links>
<host name="https://drink-together-3d735.firebaseapp.com">
<path url="/__/auth/handler/*" />
</host>
</universal-links>
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="ScrollEnabled" value="false" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
After editing it and buidling the App again I get this Error:
IOS project Code Sign Entitlements now set to: DrinkTogether/Resources/DrinkTogether.entitlements
Entitlements file is not in references section, adding it
Error: ENOENT: no such file or directory, open '/Users/markbaumann/Desktop/drink-together/ul_web_hooks/ios/https:/drink-together-3d735.firebaseapp.com#apple-app-site-association'
at Object.openSync (node:fs:600:3)
at Object.writeFileSync (node:fs:2221:35)
at saveContentToFile (/Users/markbaumann/Desktop/drink-together/plugins/cordova-universal-links-plugin/hooks/lib/ios/appleAppSiteAssociationFile.js:118:8)
at /Users/markbaumann/Desktop/drink-together/plugins/cordova-universal-links-plugin/hooks/lib/ios/appleAppSiteAssociationFile.js:72:5
at Array.forEach (<anonymous>)
at createNewAssociationFiles (/Users/markbaumann/Desktop/drink-together/plugins/cordova-universal-links-plugin/hooks/lib/ios/appleAppSiteAssociationFile.js:70:27)
at Object.generate (/Users/markbaumann/Desktop/drink-together/plugins/cordova-universal-links-plugin/hooks/lib/ios/appleAppSiteAssociationFile.js:45:3)
at activateUniversalLinksInIos (/Users/markbaumann/Desktop/drink-together/plugins/cordova-universal-links-plugin/hooks/afterPrepareHook.js:85:29)
at /Users/markbaumann/Desktop/drink-together/plugins/cordova-universal-links-plugin/hooks/afterPrepareHook.js:50:11
at Array.forEach (<anonymous>) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/Users/markbaumann/Desktop/drink-together/ul_web_hooks/ios/https:/drink-together-3d735.firebaseapp.com#apple-app-site-association'
}
How can I open a external Link in IOS, that my users can register in my App via Google?
I expected it would open the default browser

Related

Execution failed for task ':app:processDebugGoogleServices'. when run ionic cordova build android

When I run a command "ionic cordova build android", i have error like this:
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'ammar_5d767'
I have already try this steps however still not working.
here is my config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="ammar-5d767" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Doc.in</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi#ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<access origin="*" />
<platform name="android">
<resource-file src="google-services.json" target="app/google-services.json" />
.
.
.
<allow-intent href="market:*" />
.
.
.
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
.
.
.
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^3.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<plugin name="cordova-plugin-firebase" spec="2.0.5" />
<engine name="android" spec="7.1.4" />
</widget>
i found some solutions but still not working.
Your Googleservice.json file is missing from the project folder which can be found in firebase console.

PhoneGap (Build) & SignalR, works everywhere except when actually installed on device with vague error

I have created a SignalR server, a web client, and a mobile application built with PhoneGap Build. When I launch the PhoneGap application with lite-server, PhoneGap CLI, or the PhoneGap Desktop Application the SignalR works flawlessly between the web client and the PhoneGap application. This includes using the PhoneGap mobile application to connect to the PhoneGap Desktop application. The only time it fails is when I build it with PhoneGap Build and install the APK on the device. I have no explanation for this error.
I have handled CORS through the WEB.CONFIG of the server. It is a plain ASP.NET application that just has an OWIN startup file to configure SignalR and a Hub class.
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="GET, POST, OPTIONS, PUT, DELETE, TOKEN" />
<add name="Access-Control-Allow-Credentials" value="false"/>
</customHeaders>
</httpProtocol>
</system.webServer>
The frustrating part is that the error that is produced when $.connection.hub.start fails is just "Error: Error during negotiation request"
When 'deviceready' event triggers I call initiateSignalR()
var appConfig = {
'serverUrl': "http://wolf-signalrserver.azurewebsites.net"
}
var initiateSignalR = function(){
if ($.signalR) {
}
var username = prompt("username");
var success = `
<div class ="serverMessage">
<span>--- WELCOME, ${username} ---</span>
</div>
`
$('#chatbox').append(success)
$.connection.hub.logging = true
$.connection.hub.qs = { 'username': username }
$.connection.hub.url = appConfig.serverUrl + "/signalr";
var chatHub = $.connection.chatHub
chatHub.client.broadcastMessage = function (name, message) {
console.log("Data Incoming ---- Name: " + name + " Message: " + message);
var message = `
<div class="row">
<span class="col-sm-2">${name}:</span>
<span class="col-sm-9"> ${message}</span>
</div>
`
$('#chatbox').append(message)
}
$('#messageButton').on('click', function () {
chatHub.server.send(username, $('#messageBox').val())
})
$('#messageForm').on('submit', function (e) {
e.preventDefault();
chatHub.server.send(username, $('#messageBox').val())
})
$.connection.hub.start({ withCredentials: false, jsonp: true })
.done(function () {
console.log("Connected successfully to SignalR");
var success = `
<div class ="serverMessage">
<span>--- Successfully connected to the server ---</span>
</div>
`
$('#chatbox').append(success)
})
.fail(function (err) {
console.log("Unable to connect to SignalR")
alert(err);
})
}
I have a git repo of this here: https://github.com/PhilWolf91/SignalR
I realize there are tons of questions here with this, but none of them have a detailed answer to how they fixed it.
Ex: SignalR .Net Client fails with 500 server error on device, on simulator works fine
OK. I'm a giant idiot. When I was cleaning up the Config.Xml I removed the network permission AND the default White List plugin.
<feature name="http://api.phonegap.com/1.0/network" />
<gap:plugin name="cordova-plugin-whitelist" source="npm" />
Full functional config for this project
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.wolf.signalrphonegap" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>SignalRPhoneGap</name>
<description>
Hello World sample application that responds to the deviceready event.
</description>
<author email="phillip.wolf91#gmail.com" href="http://phillipwolf91.wordpress.com">
Wolf Software
</author>
<feature name="http://api.phonegap.com/1.0/network" />
<gap:plugin name="cordova-plugin-whitelist" source="npm" />
<content src="index.html" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="14" />
<platform name="android">
</platform>
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
</widget>
I now have SignalR working between the Server, Web Client, and PhoneGap app installed on the device

to hide custom workflow from another site alfresco share

I need to hide custom workflow list for folders/documents present in " MyFiles " and other sites areas.Doing that from "show-site-workflow-modules.xml " with this configuration(code below), hides workflows from "workflows that I have started" also,which is terribly wrong.
<module>
<id>General_Workflow</id>
<description>Applies config based on site id</description>
<evaluator type="site.module.evaluator">
<params>
<sites>.*</sites>
<sitePresets>.*</sitePresets>
<applyForNonSites>true</applyForNonSites>
</params>
</evaluator>
<configurations>
<config evaluator="string-compare" condition="Workflow" replace="true">
<!-- A list of workflow definitions that are NOT displayed in Share -->
<hidden-workflows>
<!-- Hide all Custom workflows -->
<workflow name="customactiviti$xxxx" />
</hidden-workflows>
<!-- A list of workflow tasks that are NOT displayed in Share -->
<hidden-tasks>
<task type="customwf:*" />
</hidden-tasks>
</config>
</configurations>
</module>
<module>
<id>xxx_Conditional_Workflow</id>
<description>Applies config based on site id</description>
<evaluator type="site.module.evaluator">
<params>
<sites>xxx-xxx-xxx</sites>
<applyForNonSites>false</applyForNonSites>
</params>
</evaluator>
<configurations>
<config evaluator="string-compare" condition="Workflow" replace="true">
<!-- A list of workflow definitions that are NOT displayed in Share -->
<hidden-workflows>
<!-- Hide all WCM related workflows -->
<workflow name="activiti$activitiAdhoc" />
<workflow name="activiti$activitiInvitationModerated" />
<workflow name="activiti$activitiInvitationNominated" />
<workflow name="activiti$activitiInvitationNominatedAddDirect" />
<workflow name="activiti$activitiParallelGroupReview" />
<workflow name="activiti$activitiParallelReview" />
<workflow name="activiti$activitiReview" />
<workflow name="activiti$activitiReviewPooled" />
<workflow name="activiti$publishWebContent" />
</hidden-workflows>
<!-- A list of workflow tasks that are NOT displayed in Share -->
<hidden-tasks>
<!-- Hide all WCM related tasks -->
<task type="wcmwf:*" />
</hidden-tasks>
</config>
</configurations>
</module>

Unity Interception MethodSignatureMatchingRule could not be resolved

Im using Unity (3.0) interception to add some crosscutting concerns to my application. Somehow I can't use the MethodSignatureMatchingRule in my configuration getting this error message:
{"The type name or alias MethodSignatureMatchingRule could not be resolved. Please check your configuration file and verify this type name."}
My configuration:
<?xml version="1.0"?>
<unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
<sectionExtension type="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationExtension, Microsoft.Practices.Unity.Interception.Configuration" />
<alias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity" />
<containers>
<container name="MyContainer">
<extension type="Interception"/>
<interception>
<policy name="EhabAspect">
<matchingRule name="MethodSignatureMatchingRule" type="MethodSignatureMatchingRule">
<constructor>
<param name="methodName" value="Receive" type="string"/>
</constructor>
</matchingRule>
<callHandler ... (omitted)
</policy>
</interception>
<register type="IMyClass" mapTo="MyClass">
<lifetime type="singleton" />
<interceptor type="InterfaceInterceptor"/>
<policyInjection/>
</register>
</container>
</containers>
</unity>
The same configuration with the NamespaceMatchingRule works fine.
My assembly contains a reference to
Microsoft.Practices.EnterpriseLibrary.Common
Microsoft.Practices.Unity
Microsoft.Practices.Unity.Configuration
Any suggestions?
I was facing the same problem here. I solved using the full qualified name of the of the class.
<matchingRule name="AuthorizationMethod" type="Microsoft.Practices.Unity.InterceptionExtension.MethodSignatureMatchingRule, Microsoft.Practices.Unity.Interception">
<constructor>
<param name="methodName" value="Authenticate" type="string"/>
<param name="parameterTypeNames" dependencyName="EmptyArray"/>
</constructor>
</matchingRule>

loading jars during splash screen

I have a main application which is referencing to 4-5 external jar files. So while compiling the project netbeans ide(javafx application) takes long time. Therefore I want to design a splash screen and which will be displayed till all jars gets loaded.
My JNLP file is
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="Black.jnlp">
<information>
<title>Black</title>
<vendor>RATTAN</vendor>
<description>Sample JavaFX 2.0 application.</description>
<offline-allowed/>
</information>
<resources>
<jfx:javafx-runtime version="2.2+" href="http://javadl.sun.com/webapps/download/GetFile/javafx-latest/windows-i586/javafx2.jnlp"/>
</resources>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="Black.jar" size="3393158" download="eager" />
<jar href="lib/commons-io-1.3.2.jar" size="95655" download="eager" />
<jar href="lib/commons-lang-2.0.jar" size="179420" download="eager" />
<jar href="lib/newlink.jar" size="6160" download="eager" />
<jar href="lib/scribe-1.3.0.jar" size="74543" download="eager" />
</resources>
<security>
<all-permissions/>
</security>
<applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="Black" >
<param name="requiredFXVersion" value="2.2+"/>
</applet-desc>
<jfx:javafx-desc width="800" height="600" main-class="test.Test" name="Black" />
<update check="always"/>
</jnlp>
Use preloaders module from JavaFx
here is complete tutorial:
http://docs.oracle.com/javafx/2/deployment/preloaders.htm
Good luck,'.

Resources