AWS Mobile Analytics throwing Exception in Xamarin PCL Application

I am trying to integrate AWS Mobile Analytics with my Xamarin PCL Application. I am using AWS Mobile Analytics NuGet Package. Below is the code:

APP.CS (Shared Code)

MobileAnalyticsManagerConfig config = new MobileAnalyticsManagerConfig();
config.AllowUseDataNetwork = true;
_manager = MobileAnalyticsManager.GetOrCreateInstance("xxxdfc1f17a549c7881131c4947b75f9", //Amazon Mobile Analytics App ID
new CognitoAWSCredentials("us-east-1:xxxc3455-e75e-4d29-b196-fc7db9ca9641", //Amazon Cognito Identity Pool ID
Amazon.RegionEndpoint.USEast1),
Amazon.RegionEndpoint.USEast1, config);

APPDELEGATE.CS (iOS)

public override void DidEnterBackground(UIApplication application)
{
App._manager.PauseSession();
}
public override void WillEnterForeground(UIApplication application)
{
App._manager.ResumeSession();
}

ERROR:

Thread started: #6
[0:] Error: System.ExecutionEngineException: Attempting to JIT compile method 'Amazon.CognitoIdentity.CognitoAWSCredentials:.ctor (string,string,string,string,Amazon.RegionEndpoint)' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.

at Amazon.CognitoIdentity.CognitoAWSCredentials..ctor (System.String identityPoolId, Amazon.RegionEndpoint region) [0x00000] in <56ec40557fd3452cb9f91746bb31be84>:0
at CrashApp.App..ctor () [0x0002d] in <1472c5c8e4444ffd8975e8a5db9f5eed>:0
[0:] ====== resource debug info =========
[0:] found resource: CrashApp.AppResources.resources
[0:] found resource: CrashApp.Pages.LoginSignUpFlow.SplashPage.xaml
[0:] ====================================
2017-05-17 00:19:05.601 CrashAppiOS[9743:3083729] iOS Language:en-US
2017-05-17 00:19:05.601 CrashAppiOS[9743:3083729] .NET Language/Locale:en-US

Any idea, what can be the reason for this ???? Any help would be appreciated.

Sign In or Register to comment.