Open a Safari browser from Telerik AppBuilder - safari

Telerik AppBuilder is using it's own "webview", but Apple store cannot accepts donations through app unless it's done thought Safari browser... Is there any way to open Safari browser inside App?
Thanks

You should be able to use the InAppBrowser plugin, but use the target of "_system". See the docs for more details: https://github.com/apache/cordova-plugin-inappbrowser/blob/master/doc/index.md

Use the second argument "_system" to open the link in the default browser.
Omit it to open with in the app.
window.open("www.google.com", '_system');

Related

Why dynamic links in React Native are opening the browser first?

I'm trying to communicate two React Native apps using Firebase Dynamic Links, only in Android.
When I execute openLink with the URL of the other, I see the browser for a second, and then it opens the other app well.
I don't want to see an intermediate browser before open the other app.
I'm having that issue from app A to B, and viceversa.
So, why is the browser opening first? And how can I configure the apps in order to not open the browser?
it's default behavior of android devices.
usually if any link supported by app and its set default to open link then it will open directly otherwise android system opens browser and based on Link URI scheme navigate to app.
there is one solution,
You can create module (intent activity) which will launch that app directly.
Steps to follow
pass data from js to native module and from that use Intent class, set data and start it.
this was for Android use case.

How to listen to "beforeNavigate" event in safari app extensions

I'm developing a safari app extension. I've to listen to "beforeNavigate" event as in old Safari JS Extensions, we could listen to these events using Safari's Windows & Tabs API.
I went through the How to create Safari App Extension, but unfortunately couldn't find anything related to these events there.
Can anybody please help me with similar APIs for Safari App Extensions as we had in old Safari JS Extensions.
Starting Safari 13, Apple added an API for page navigation notifications.
In your SafariExtensionHandler.swift, you can now override func page(_ page: SFSafariPage, willNavigateTo url: URL?).
Source: https://developer.apple.com/documentation/safari_release_notes/safari_13_release_notes
Unfortunately, there is not equivalent in Safari App Extension.
The only thing you can do is catching a new tab id displayed through validateToolbarItem.
Or try to add a content or network filter in your App...

Getting error using Firebase popup authentication in Word add-in

I was already using Firebase for authentication for other (related) projects and would like to stick with it.
Using Firebase with a Word add-in seems challenging. On Windows you're stuck with IE11 and on Mac (crucial for me) the browser used to load a taskpane is webkit, not the default browser.
I can get authentication on Windows to work just fine if I use signInWithRedirect (Google and Facebook).
But this won't work on Mac. Using signInWithRedirect opens a new tab in the default browser, which doesn't share cookies/data with the webkit browser the add-in actually uses.
When I switch to signInWithPopup, I get:
There is no application set to open the URL about:invalid%23zClosurez.
On Windows I get a popup IE11 window, for a split second, and it contains about:invalid%23zClosurez for a URL.
I have appdomains called out in my add-in XML manifest:
<AppDomains>
<AppDomain>https://writeitwithme-a114a.firebaseapp.com</AppDomain>
<AppDomain>https://www.firebaseapp.com</AppDomain>
<AppDomain>https://www.googleapis.com</AppDomain>
<AppDomain>https://www.facebook.com</AppDomain>
</AppDomains>
Any help appreciated. Worst case I drop to using manual registration, via Firebase, for Mac, but seems unfortunate to have to give up.
Just documenting for anyone finding this later.
I couldn't figure out how to use Firebase social login when creating an add-in for Mac. Every authentication window opened in the default browser, not the webkit engine used by Word on Mac. Sticking with manual login worked.
IE11 is always finicky when using localhost. I test elsewhere, then push files live and then try IE11 and social + manual login (via popup) works just fine.
I found the following resources from Microsoft docs that made this easier for me:
https://learn.microsoft.com/en-us/office/dev/add-ins/develop/dialog-api-in-office-add-ins
Basically you need to make a call to open up a dialogue box:
Office
.context
.UI
.displayDialogAsync(
'https://myDomain/myDialog.html',
{height: 30, width: 20, displayInIframe: true}
);
Then you can make your own page that does a login flow and passes a message (likely a credential of some kind) back to your plugin via the messageParent method:
Office.context.ui.messageParent(googleProfile);
From there you can do the following to sign in with the credential provided in your add-in:
firebase.auth().signInWithCredential(credential)
Also, be very careful with how you construct the URL of the dialogue box. I lost hours not knowing that the _host_Info param from the origin URL would mess stuff up (I was constructing my new URL from the origin URL). Figured it out in this github issue: https://github.com/OfficeDev/office-js/issues/378

How to get page source for mobile NATIVE (without webviews) app using selenium?

How to get page source for mobile NATIVE (without webviews) app using selenium preferably in javascript?
Depends on your chosen javascript client.
For example, with wd, you would use wd.source(); as can be found from the wd api page: https://github.com/admc/wd/blob/master/doc/api.md
For webdriver-io, the command seems to be client.source();, as found from http://webdriver.io/api/protocol/source.html
If you want to use the selenium-webdriver, it seems that the command would be driver.getPageSource(); as per http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebDriver.html#getPageSource

Unable to share a link on whatsapp from Safari

I am trying to share a link from html on whatsapp using
SHARE
This works fine for all browsers except safari.
In safari , When the share link is present on www.example.com(I am trying to share the link of the page I am standing on) page,if I try to share the link, only title text is shared, the link is not shared.
The whats app message generated is
title
despite of title http://www.example.com
Try encoding the text parameter using encodeURIComponent.
In your case that would be:
SHARE
We usually differ link at desktop view and mobile view to offer better support for safari and other browser.
for desktop view we use
https://web.whatsapp.com/send?phone=6200000000&text=Hello%20Moxqitto
for mobile, we follow whatsapp best practice https://faq.whatsapp.com/en/android/26000030/
https://wa.me/6200000000
Tested on
Chrome for mac
safari for mac
android chrome
Ps: not tested when mac have whatsapp desktop app, but it will still work in the safari itself. so it should be ok