Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

iOS xamarin - Crash on first launch while In app purchase

$
0
0

We have used Azure SDK in our xamarin app. When we are login using google or Facebook using Azure in our app and then go for the subscription using In app purchase, app is crashing in iOS.

As soon as the In app purchase dialog is open, app is getting crashed.

Also, it is crashing while making subscription for the first time after app install. Then everything is working fine.

Please have a look below detailed error log.

2019-02-08 17:19:59.065 EarnieJr.iOS[4133:1596190] [AppCenterCrashes] ERROR: +[MSWrapperLogger MSWrapperLog:tag:level:]/7 Unhandled Exception: UIKit.UIKitThreadAccessException: UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread. at UIKit.UIApplication.EnsureUIThread () [0x00020] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIApplication.cs:89 at UIKit.UIControl.RemoveTarget (Foundation.NSObject target, System.IntPtr sel, UIKit.UIControlEvent events) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIControl.g.cs:235 at UIKit.UIControl.RemoveTarget (System.EventHandler notification, UIKit.UIControlEvent events) [0x00048] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIControl.cs:116 at UIKit.UIControl.remove_TouchUpInside (System.EventHandler value) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIControl.cs:182 at Xamarin.Forms.Platform.iOS.ButtonRenderer.Dispose (System.Boolean disposing) [0x00017] in <55e20ffeeae44e4d8fcf262393127192>:0 at Foundation.NSObject.Finalize () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/Foundation/NSObject2.cs:143 2019-02-08 17:19:59.072 EarnieJr.iOS[4133:1596190] [AppCenterCrashes] WARNING: +[MSWrapperLogger MSWrapperLog:tag:level:]/7 Cannot serialize UIKit.UIKitThreadAccessException exception for client side inspection. If you want to have access to the exception in the callbacks, please add a Serializable attribute and a deserialization constructor to the exception class. 2019-02-08 17:19:59.082 EarnieJr.iOS[4133:1596190] Unhandled managed exception: UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread. (UIKit.UIKitThreadAccessException) at UIKit.UIApplication.EnsureUIThread () [0x00020] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIApplication.cs:89 at UIKit.UIControl.RemoveTarget (Foundation.NSObject target, System.IntPtr sel, UIKit.UIControlEvent events) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIControl.g.cs:235 at UIKit.UIControl.RemoveTarget (System.EventHandler notification, UIKit.UIControlEvent events) [0x00048] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIControl.cs:116 at UIKit.UIControl.remove_TouchUpInside (System.EventHandler value) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIControl.cs:182 at Xamarin.Forms.Platform.iOS.ButtonRenderer.Dispose (System.Boolean disposing) [0x00017] in <55e20ffeeae44e4d8fcf262393127192>:0 at Foundation.NSObject.Finalize () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/Foundation/NSObject2.cs:143

Version details are as below for used packages,

"Microsoft.Azure.Mobile.Client" Version="4.1.1"
"Plugin.InAppBilling" Version="2.0.0"
"Xamarin.Forms" Version="3.5.0.129452"

var billing = CrossInAppBilling.Current;
var purchase = await billing.PurchaseAsync("ProductId here", ItemType.Subscription, "devId");


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>