With cordova-plugin-facebook4#4.2.1 "User cancelled." error thrown immediately after invoking the login method - ios

Facebook login was working fine for both Android and iOS like 2 weeks ago, but for some reason lately on iOS it has been crashing, whenever someone from iOS tries to login it sends out the error of:
"User cancelled"
I tried to fix it by updating the plugin, however the error persists.
I do not think there's something wrong with my code since Android still works and iOS used to work, and I've not changed anything from the login code.

Steps:
Remove plugin
Remove BOTH Android and iOS platforms (cordova platform remove android // cordova platform remove ios)
Reinstall plugin
Verify that it's up to date npm outdated (I think that's the command)
Problem went away, the deal was to FORCE the update on the plugin, which won't happen if any of the platforms is still installed by the time you try to re-install it again.

Related

Ionic 6 app getting CORS error accessing develper.google.com on iPad only

I have an ionic 6 app built with angular and cordova. I can build the app just fine for iOS and it runs on an iPhone with no issues.
But for some reason, when running the same build on an iPad I get CORS error accessing developers.google.com (I assume this is from firebase, which is in my app)
Most of the other questions I've found involve Capacitor, which I am NOT using.
Similar, but I'm not making http requests directly. I'm using AngularFire: https://forum.ionicframework.com/t/cors-issue-when-sending-request-from-ionic-to-firebase-cloud-function/185239
I've been able to repeat this scenario. If I remove the app from the iPad simulator and run it again, it works. However, if I refresh using Safari dev tools, or just re-run the app, the issue occurs. (maybe it's a timing issue?)
erorrs.
Some more information around the erorrs
The way I managed to address this was to switch from the Cordova build to the Capacitor build following the instructions here:
https://capacitorjs.com/docs/cordova/migrating-from-cordova-to-capacitor
Essentially, once I started using the newly create ios folder instead of the old platform/ios that was generated by Cordova, the error stopped.
I don't know why, but maybe this will help someone else.

Ionic Capacitor IOS Only Works With Livereload

In my ionic capacitor ios app, the app works just fine on a web browser using ionic serve. When I try running ionic capacitor run ios, that is successful but when I build the app I get this:
While that looks like a lot, you can see that at the end it says Webview failed to load and the request timed out. On my phone, all I see is the splash screen.
Instead, when I run ionic cap run ios -l --external, I get this:
In this console, the same warning messages happen, but it says "onscript loading complete" and then the actual app works.
I have looked through many StackOverflow + github pages offering help for this issue. From this issue, I made sure that my phone and computer were on the same wifi. Anyone experienced this error before/knows what to do? This code has worked in the past.
I figured out the issue! The app was trying to connect to a server that did not exist. I needed to remove the server field in capacitor.config.json. I cut out that json field and then ran ionic cap run ios, and the code worked.
Please comment if you are still experiencing this issue

Unity iOS support, installation failed

I am trying to use Unity to create an iOS app. I used Unity Hub to install Unity. I then opened Unity, went to File-Build Settings. I click on iOS, and it says "No iOS module loaded", so I clicked on the "Open Download page". I downloaded UnitySetup-iOS-Support-for-Editor-2018.4.7f1 and ran it. It looks like everything is going smoothly, and right at the end I get the message in the attached screen shot.
I have tried closing Xcode and Unity. I have tried restarting my computer. I have done several Google searches, but I haven't found anything that helps. Does anyone have any ideas?
I suspect the installation path got messed up.
You have to use the Unity Hub to install additional packages.
Go to Installs, click the 3 vertical dots and select Add Modules.
I had a similar problem with tvOS support and it seems that if you don’t have Unity installed to /Applications/Unity, installing addons will fail. (I had it in /Applications/Unity-2019.4.7f1.)
I moved my Unity to /Applications/Unity, installed the addon, and then moved Unity back.
The accepted answer did not work for me.
However, what did the job (Unity 2018, Unityhub 3.4.1) was copying the installed /Applications/Unity/PlaybackEngines to the current /Applications/Unity-[2018....]/PlaybackEngines

Flash Builder SDK issues

So I needed to install a new SDK to use the Compass ANE that I purchased. Which I did and the issue that I had with it was that the "TabbedViewNavigatorApplication" was not a supported component. So, after some research, the problem was with the new framework file. I took the framework file from the original 4.6.0 (file location shown below):
C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks
and put that in the new SDK file. This fixed this issue but now I have another issue where the old code I had working has now broken.
GeolocationEvent.UPDATE is no longer being called
Camera.setMode() causes a crash
UIComponent.addChild(Video) causes a crash
I am able to run the program with no errors.
Event is not being triggered for Geolocation in Flex
This person had a similar problem to me and he says he fixed his issue but I can't work out what he did:
I worked out the ultimate cause of this specific problem. It stems from Flash Builder not installing the complete Android SDK or the IOS SDK. Once I manually installed these by copying the SDK folders to their correct paths in Adobe Flash Builder, my GPS events were called successfully.
To sum up, if you get this trouble where the code and everything looks alright but it wont call up your events, then check to make sure that your latest SDKs for Flex are installed correctly for Android and or iOS
I haven't done any work with flex SDKs and if anyone can either recommend a place to download one which supports these features or has any advice on how to fix my issue I would be most grateful.
Solved issue. In case anyone looks for this, my old SDK would allow me to run the app from a device without requesting for permission for geolocation event. The new SDk forces you to use the permission status event.
Makes sense to me now. Just wish I had an error pop up asking for permission rather than just doing nothing.

Can't login with Facebook SDK on cordova iOS after changing permissions

I'm using Cordova latest version with this plugin https://github.com/jeduan/cordova-plugin-facebook4... In the first version, I was getting permission for only:
id,email,birthday
And in the 2nd version, I am getting permission for:
id,email,birthday,gender,first_name,last_name
which causes the following error:
domain=com.facebook.sdk.login code=304
But if I removed the app and re-installed it, it works fine!
So, what should I do now? the app in production, and all users can't login, and it is really hard to ask all users to remove the app and re-install it! any idea to release another version with a patch to fix this issue?
I think there is a solution here: ios facebook sdk 4.0 login error code 304, but I'm not a good Objective C developer to know how to implement it in the plugin!
I followed this link: ios facebook sdk 4.0 login error code 304
And made this patch:
https://github.com/mabdelfattah/cordova-plugin-facebook4/commit/e55b974ee62a6c98293fadda688e0382b5e2d45c#diff-c05c80840d093f0d14fb66a56466e521
The issue is because the cordova facebook plugin call facebookConnectPlugin.getLoginStatus() caches the FB response. It doesn't allow us to force a server trip in that call (whereas in the FB Javascript SDK it does).
I resolve the issue by calling facebookConnectPlugin.login() when I get 304. That forces a server trip to reload the FB permission upon a fresh login.

Resources