示例#1
0
 static Crashes()
 {
     /* Perform custom setup around the native SDK's for setting signal handlers */
     iOSCrashes.DisableMachExceptionHandler();
     MSACWrapperCrashesHelper.SetCrashHandlerSetupDelegate(_crashesInitializationDelegate);
     AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
     iOSCrashes.SetUserConfirmationHandler((reports) =>
     {
         if (ShouldAwaitUserConfirmation != null)
         {
             return(ShouldAwaitUserConfirmation());
         }
         return(false);
     });
     iOSCrashes.SetDelegate(_crashesDelegate);
 }
示例#2
0
        static void PlatformTrackError(Exception exception, IDictionary <string, string> properties, ErrorAttachmentLog[] attachments)
        {
            NSDictionary propertyDictionary = properties != null?StringDictToNSDict(properties) : new NSDictionary();

            NSMutableArray attachmentArray = new NSMutableArray();

            if (attachments != null)
            {
                foreach (var attachment in attachments)
                {
                    if (attachment?.internalAttachment != null)
                    {
                        attachmentArray.Add(attachment.internalAttachment);
                    }
                    else
                    {
                        AppCenterLog.Warn(LogTag, "Skipping null ErrorAttachmentLog in Crashes.TrackError.");
                    }
                }
            }
            MSACWrapperCrashesHelper.TrackModelException(GenerateiOSException(exception, false), propertyDictionary, attachmentArray);
        }