How to Handle Flutter Web View Click in IOS - flutter

I am using webview_flutter plugin for instagram login.Its working fine in Android and return me access token. But in IOS "onPageFinished" is not getting called on "Save Info" or "Not now" click. So i am not able to get access token in case of IOS.I am attaching the code screenshot.Please check it and help me out.

did you try to add this line in Info.plist
<key>io.flutter.embedded_views_preview</key>
<string>YES</string></dict>

Related

Not able to click anywhere on console.actions.google to test

I am trying to test my google assistant app which is there on diagflow. When I open google assistant simulator it says "test enabled " but then it fades out and doesn't allow me to click anywhere.
I also tried to say " talk to my test app" on actual device but it doesn't launch my application.
I have checked weebhook url and everything looks fine. Can you let me know what went wrong. It was working earlier.
Simply log out from your account. clear all the cookies and login again.
Got the resolution, you have to make sure your web and app activity setting via google/myaccount is enabled (true). It will work properly then

Opening facebook page and app store using ionic 3 in iOS

I wanna open my facebook page link using the ionic: It's working in Android using:
window.open('fb://page/620967164688741', '_system')
and through some tutorials I came to know that in order to open Facebook page, use the:
window.open('fb://profile/620967164688741', '_system')
But even after doing that, I'm unable to open.
And same goes with open the store, on Android it's working fine but again issue on iOS. Below is the code:
let promise = this.market.open('com.teach9.teach9');
Can someone correct me where I'm making mistake?
How about you check this plugin out for iOS - "inAppBrowser" at "https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/"?
P.S. In iOS you should be able to open any webpage inside the inAppBrowser, Make sure that the target is set as "_blank" instead of "_system".

How do I open any app from my web browser (Chrome) in Android, automatically?

I am struggling a little bit. I have a common url like www.domain.com/test.html
and i want Android users to get my app open if "test" is included, otherwise if they don't have the app their should be directed to the play store. I got everything implemented and it works with mozilla browser. But using chrome on Android it should be forbidden to automatically open the app if it is available!?. Now if the user enters www.domain.com/test.html and i recognize he is using Android and Chrome i tried the intent stuff in a script in a redirected www.domain.com/android_chrome.html:
<script> window.open("intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;S.browser_fallback_url=http%3A%2F%2Fzxing.org;end","_self")
</script>
But the App won't open automatically. If i use a regular Link:
Take a QR code
it works. But i want to let it open automatically!
Google restricted starting intents from javascript apps, that's why it isn't working. Security reasons I guess. You should just display nice big link to let user switch to your app instead of website - or let him continue if he doesn't want to launch the app.
Forcing users into using app is bad, IMO. Splash screen suggesting to use it is okay, but don't push it.

How to add facebook-ios-sdk in app for login and fetch user data

I want to integrate the facebook login dialog in my app. For that i have checked the facebook developer page to integrate it.
1 - Downloaded facebook sdk package and installed it
2 - added facebook.framework and FBUserSettingsViewResources.bundle in my app
3 - and use its SessionLoginSample
Its running and user can do login using facebook but its open in safary instead of that i want to open it in dialog box.
Answer in here says that do change in facebook.m file but my project does not have it. for that i have downloaded facebook-ios-sdk project from the GITHub and in that project from src folder i have copied all file in my project. Its non arc so added flag fno-objc-arc.
But facebook.m file does not contain that code which answer suggested to change. And also i have implemented graph GraphApiSample but it display error in FBLoginView.
So plz help on this topic any code or tutorial will be highly appreciable.
If you want to open the login page within your app you have to use the FBGraphAPI .
If you want to force the web dialog, you need to specify the login behavior.
If you look in FBSession, there are many methods to open a Session, many of which will take an FBSessionLoginBehavior parameter. If you pass in FBSessionLoginBehaviorForcingWebView for the login behavior, it will force the web view dialog.

Google OAuth not working on iOS

Trying to get my head around OAuth 2.0. I am building a cross platform google drive app using PhoneGap Build and JQM.
I am able to format the request URL correctly and on both iOS and Android. It prompts the user for ID/PW using InAppBrowser (tried child browser too). Next user gets prompt with blue button on web page to "Allow Access" just like on other google web sites/apps. On Android all is well user taps allow access and callback finds the success code and I can grab the token. On iOS I get a "Load Error" message in the status bar of InAppBrowser but I can't trap the error to see what it is. It seems as if the redirect parameter breaks things before the startLoad or endLoad event can be called to trap success/failure in the response from Google.
Playing with oauth2-playground my URL looks correct and like I said it is working fine on Android.
Anyone have any ideas what differences I need to look at with regard to iOS? Been stumped here for a couple of days. Any and all help greatly appreciated.
I have tried redirecting back to http//localhost and http//localhost/afterOauth.html where afterOauth.html is a page in the app to give the redirect something to call the startLoad/endLoad event.
Update: I really think the problem has something to do with the redirect I give the original Google request. If I change "localhost" to urn:ietf:wg:oauth:2.0:oob which shows up in the google documentation both Android and iOS behave the same. They take me to a page saying "Please copy this code, switch to your application and paste it there" With the code=4/MyCode below it.
Also, I added a loaderror callback. It does not fire on Android but does on iOS giving error code -1004 and error message: could not connect to the server. However in the event.url of this loaderror it clearly shows the code=4/myCode. What is the missing link here for iOS and successful OAuth between Google?