Мы следовали всей документации по умолчанию для использования xamarin. ios с branch.io, но получаем эту ошибку всякий раз, когда мы открываем ветку io link из safari, которая открывает приложение IOS
в Newtonsoft. Json .Utilities. Строковое значение, тип System.Type, настройки Newtonsoft. Json .JsonSerializerSettings) [0x00000] в <2073514815234917a5e8f91b0b239405>: 0 в Newtonsoft. Json .JsonConvert.DeserializeObject [T] (значение System.String. Настройки .JsonSerializerSettings) [0x00000] в <2073514815234917a5e8f91b0b239405>: 0 в Newtonsoft. Json .JsonConvert.DeserializeObject [T] (значение System.String) [0x00000] в <20735148152b050D050D050D050D0505505405b5b5405x55054055055052555052555052552552556456464.eb.eb0. Collections.Generi c .Dictionary2 [TKey, TValue] данные) [0x00269] в: 0 в BranchXamarinSDK.BranchUniversalObject..ctor (данные System.Collections.Generi c .Dictionary2 [TKey, TValue]) [0x0000c] в: 0 в BranchXamarinSDK. iOS .BranchBUOSitLativeBirect. BranchUniversalObject buo, IOSNativeBranch.BranchLinkProperties blp, ошибка Foundation.NSError) [0x00018] в: 0 в ObjCRuntime.Trampolines + SDcallbackWithBranchUniversalObject.Invoke (System.IntPtr-блок, System.Intrtg2-аргумент System.GPTIrGPTG.RP) ] в <28041a5070c64583857f1e2a9310dbb c>: 0 at (оболочка встроена в управляемую) ObjCRuntime.Trampolines + SDcallbackWithBranchUniversalObject.Invoke (intptr, intptr, intptr, intptr) в (Upperlication UppIA UIA) для (оболочка управляемая UUIA UIT). int, string [], intptr, intptr) в UIKit.UIApplication.Main (аргументы System.String [], субъект System.IntPtr, делегат System.IntPtr) [0x00005] в /Library/Frameworks/Xamarin.iOS.framework /Versions/13.14.1.39/src/Xamarin.iOS/UIKit/UIApplication.cs:86 в UIKit.UI Application.Main (System.String [] args, System.String PrincipalClassName, System.String DelegateClassName) [0x0000e] в /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.39/src/Xamarin.iOS/ UIKit / UIApplication.cs: 65 в Drapp.Application.Main (System.String [] args) [0x00001] в / Users / my-mac / Desktop / Projects / ...... / ....... ./Main.cs:12
Любая помощь будет оценена. Спасибо
Редактировать: добавлен код
Я использую код, аналогичный SDK интеграции https://help.branch.io/developers-hub/docs/xamarin-ios
using BranchXamarinSDK;
using Foundation;
using GlobalToast;
using GlobalToast.Animation;
using iAd;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
using ObjCRuntime;
using Plugin.Connectivity;
using Plugin.FirebasePushNotification;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reactive.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using UIKit;
using UserNotifications;
namespace MyApp
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
[Register("AppDelegate")]
public class AppDelegate : UIApplicationDelegate, IBranchBUOSessionInterface
{
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
.
.
.
// Debug mode - set to 'false' before releasing to production
BranchIOS.Debug = true;
BranchIOS.Init(Branch_key, launchOptions, this);
return true;
}
// Called when the app is opened via URI scheme
public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
{
return BranchIOS.getInstance().OpenUrl(url);
}
// Called when the app is opened from a Universal Link
public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity,
UIApplicationRestorationHandler completionHandler)
{
return BranchIOS.getInstance().ContinueUserActivity(userActivity);
}
// Called when the app receives a push notification
public override void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
{
BranchIOS.getInstance().HandlePushNotification(userInfo);
}
// Called when the Branch initialization is completed
// Put deep-linking logic in this method
public void InitSessionComplete(BranchUniversalObject buo, BranchLinkProperties blp)
{
NSObject[] keys = {
NSObject.FromObject("+is_first_session")
};
NSObject[] values = { NSObject.FromObject(0) };
if (buo.metadata.Metadata.ContainsKey("+is_first_session"))
{
values[0] = NSObject.FromObject(buo.metadata.Metadata["+is_first_session"]);
}
NSDictionary nsData = NSDictionary.FromObjectsAndKeys(values, keys);
NSNotificationCenter.DefaultCenter.PostNotificationName(Branch_notification, null, nsData);
}
// Called when there is an error initializing Branch
public void SessionRequestError(BranchError error)
{
Console.WriteLine("Branch error: " + error.ErrorCode);
Console.WriteLine(error.ErrorMessage);
//ErrorViewController errorController = (ErrorViewController)storyboard.InstantiateViewController("ErrorScreen");
//Window.RootViewController.PresentViewController(errorController, false, delegate
//{
// errorController.SetError("Branch error: " + error.ErrorCode, error.ErrorMessage);
//});
}
.
.
.
.
}
}