I have integrated ezfb in my Ionic app.
If I insert a Like Button (like in the demo) , the button shows up when I debug in the desktop browser, but when I build an iOS app and test in the iOS simulator, the button is not shown.
<div ng-show="data.post.meta.showfbwidgets" class="fb-like padding" onrender="widget.rendered = true" data-href="{{ data.post.link}}" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>
How can I use Facebook widgets in an Ionic app?
Related
I'm creating Ionic Angular app and I have some functionality which should allow user to take picture. Android app works completely fine but iOS crashes while taking picture. So to add photo you have to click button in app, then if it is first time you will se permissions modal to accept camera permissions and then prompt is shown with 2 options: take photo or from gallery. I choose to take photo so I'm taking it but after clicking camera button to take photo it just crashes and kills my app.
I have all needed permissions in Info.plists: NSCameraUsageDescription, NSPhotoLibraryUsageDescription, NSPhotoLibraryAddUsageDescription
This is how code looks like:
handleAddPhoto = async () => {
if (this.canAddPhoto()) {
const image = await Camera.getPhoto({
quality: 30,
allowEditing: false,
saveToGallery: false,
resultType: CameraResultType.Base64,
source: CameraSource.Prompt,
presentationStyle: 'popover',
});
this.addedImages.find(el => el.src === null).src = this.sanitizeSrc(image.base64String);
this.handleSavePhoto(['data:image/jpeg;base64,' + image.base64String]);
}
};
Capacitor doctor:
Latest Dependencies:
#capacitor/cli: 4.6.1
#capacitor/core: 4.6.1
#capacitor/android: 4.6.1
#capacitor/ios: 4.6.1
Installed Dependencies:
#capacitor/cli: 4.6.1
#capacitor/core: 4.6.1
#capacitor/ios: 4.6.1
#capacitor/android: 4.6.1
[success] iOS looking great! đź‘Ś
Capacitor camera version:
"#capacitor/camera": "^4.1.4"
When I have app opened on my phone with Xcode then after taking picture my Xcode shows me this:
I was looking everywhere to find any help with my problem but none of found solutions works for me.
So after some debugging in native code I found it. We use UXCam in our app and it was making mess with camera. As I found some logs it looks like UXCam wanted to record screen during returning from camera view to app view and it was making mess. I didn't find option to repair it because we don't need UXCam that much, so disabling UXCam fixed all issues.
I am using Appery.io app builder and my app is JQM with v5.3 libraires version
I have to js code in click event and run in Android but not in iOS.
I tried this and the same result. Anything argument in window.open run in Andorid but not in IOS (mail, https…).
window.open("tel:+34607507097");
window.location.href = 'tel:+34607507097';
Any suggestions . Thanks
Could I ask you to check if the in-app browser is enabled under App settings > Cordova Plugins and then check out this code:
if (window.cordova) {
cordova.InAppBrowser.open("tel:+34607507097", '_system');
}
I am developing an app in ionic 3 for android and ios platform. For deeplinking, I am using cordova firebase dynamic link plugin.
This is working fine for android platform. But in the ios platform, though it is not throwing any error, it is not working.
My current ionic code.
this.platform.ready()
.then(() => {
return this.firebaseDynamicLinks.onDynamicLink();
}).then((dynamicLink:any) => {
console.log(dynamicLink); // always gives {matchType: "weak", deepLink:""} in ios
}).catch((error: any) => {
console.log(error);
});
The android part working fine. But in ios, the deeplink is always coming as empty.
my manually created dynamic url
https://xxxx.app.goo.gl/?link=<encoded url to mysite>&apn=<android bundle id>&ibi=<ios bundle id>
The provided link is returning HTTP 200 status when opening in the browser.
Testing steps (in ios):
In my iphone (ios9) I have placed this dynamic link in notepad
Then by clicking on the dynamic link the app opens.
In the console, I get
{matchType: "weak", deepLink:""}
Our Ionic 2 mobile app was rejected by apple because of the following reason:
We noticed that the user is taken to Safari to sign in or register for an account, which provides a poor user experience.
Please revise your app to enable users to sign in or register for an account in the app.
The Auth0 Lock provides the user with a sign up button that we configured through the signUpLink option of the Lock. This button opens a registration page in the system browser (Safari) outside of the application, which apparently isn't acceptable for Apple.
Before we upgraded to the latest version of Ionic 2 (Ionic 2 beta 11), the lock would open the link in the InAppBrowser, which is acceptable for Apple. Because of the difference in Ionic 2 version, I imagine this could be an Ionic issue.
I made sure I had the Cordova InAppBrowser plugin installed. It's present in my config.xml as <plugin name="cordova-plugin-inappbrowser" spec="~1.6.1" /> and when I open the .xcproject file in XCode, the plugin is present in the Plugins folder. I have also tested using the InAppBrowser manually using open('https://www.google.com/, '_blank'); which opened the InAppBrowser as it should.
Neither the code regarding the Auth0 Lock, nor the URL to the registration page changed.
Auth0 Lock version: 10.6 (have also tried on 10.11, didn't solve the issue)
Ionic version: 2.1.0
OS: iOS
What could've changed since the Ionic 2 beta 11 that would affect opening the link in the InAppBrowser?
I have come up with a dirty temporary workaround by adding an onclick attribute to the button that opens the link in the window.open function:
this.lock.on('show', () => {
let parent: Element = undefined;
let intervalIndex = 0;
let interval = setInterval(() => {
parent = document.getElementsByClassName('auth0-lock-tabs')[0];
if (parent) {
let item = parent.children.item(1).children.item(0);
item.setAttribute('onclick', `window.open('${AppSettings.registrationUrl}', '_blank'); return false;`);
item.removeAttribute('href');
clearInterval(interval);
}
if (intervalIndex == 20)
clearInterval(interval);
intervalIndex++;
}, 500);
});
With this modification, the sign up link opens in the InAppBrowser and therefore doesn't violate Apple's terms anymore.
Note: this is not a good answer to this problem and is not a guaranteed fix as there is a delay on configuring this onclick attribute on the button.
I have integrated paypal's payment gate way in my app and I have added all the neccessary sdks and libraries. When I enable acceptCreditCards option in paypal configuration, app crashes as soon as user tries to tap on PaywithCard option.
Crash Log:
'Application tried to present a nil modal view controller on target <PayPalPaymentViewController: 0x7fce3029f200
Environment: sandbox
languageOrLocale: en-US
>
I even tried enabling PaywithCard in paypal's sample app and observed the same behaviour.I'm using Xcode 8, swift 3 and
I have added card.io SDK and cleaned the app before running.Now app works as expected.