Pendo SDK与.NET MAUI样本应用程序的集成会导致错误

发布于 2025-02-09 15:32:56 字数 2607 浏览 5 评论 0原文

我们在Xamarin Cross Platform UI移动框架中开发的生产应用程序之一,我们一直成功地使用了Pendo-SDK-IOS和Pendo-SDK-Android Nuget软件包。

https://support.pendo.io/hc/en-us/articles/444042424669419-developer-s-guide-s-guide-to-installing-the-pendo-xamarin-ios-os-ios-sdk

现在我们正在上升Xamarin应用于.NET MAUI。在将Pendo-SDK软件包与.NET MAUI Appliction集成时,我面临问题。

以下是复制此问题的步骤:

已创建了一个新的MAUI .NET应用程序,并且已成功运行。

iOS平台

我添加了Pendo-sdk-ios Nuget软件包版本2.16.0.5665(最新稳定版本)。

我可以在AppDelegate中使用Pendo软件包,以下代码不会引发错误。

   using Pendo; 

我正在尝试在AppDelegate中初始化Pendo SDK,但是我会遇到以下错误。

    string pendo_app_key = "eyJhbGci…<KEY_HERE>";
    PendoManager.SharedManager().Setup(pendo_app_key);
    PendoManager.SharedManager().SetDebugMode(true);

.../CheckingPendo/Platforms/iOS/AppDelegate.cs(22,22): Error CS0012: The type 'NSObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. (CS0012) (CheckingPendo)

添加Xamarin.ios参考后,我也经历了相同的编译时间错误。

​​<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-ios'">
      <PackageReference Include="pendo-sdk-iOS" Version="2.16.0.5665" />
    </ItemGroup>
    <ItemGroup>
      <Reference Include="Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065" />
    </ItemGroup>

Android平台

添加Pendo-SDK-Android Nuget软件包版本2.16.1.4053(最新稳定版本)。 我遇到以下错误。

/Users/[user]/.nuget/packages/xamarin.android.support.annotations/28.0.0.3/build/monoandroid90/Xamarin.Android.Support.Annotations.targets(3,3): Error MSB4062: The "Xamarin.Android.Support.BuildTasks.VerifyVersionsTask" task could not be loaded from the assembly /Users/[user]/.nuget/packages/xamarin.android.support.annotations/28.0.0.3/build/monoandroid90/Xamarin.Android.Support.BuildTasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
 Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. (MSB4062) (CheckingPendo)

感谢您在解决此问题方面的帮助。

One of our production applications which developed in Xamarin cross platform UI mobile framework, we have been using Pendo-sdk-ios and pendo-sdk-android nuget packages successfully.

https://support.pendo.io/hc/en-us/articles/4404246699419-Developer-s-Guide-to-Installing-the-Pendo-Xamarin-iOS-SDK

Now we are upgrading our xamarin application to .NET MAUI. I am facing an issue, while integrating Pendo-sdk packages with .NET MAUI Appliction.

Here are the steps to reproduce this issue:

A new sample MAUI .NET application has been created, and it has successfully run.

iOS Platform

I added pendo-sdk-ios nuget package version 2.16.0.5665(latest stable version).

I can use the Pendo package in the AppDelegate, the following code does not throw an error.

   using Pendo; 

I am trying to initialize the Pendo SDK in the AppDelegate, however I am getting the following error.

    string pendo_app_key = "eyJhbGci…<KEY_HERE>";
    PendoManager.SharedManager().Setup(pendo_app_key);
    PendoManager.SharedManager().SetDebugMode(true);

.../CheckingPendo/Platforms/iOS/AppDelegate.cs(22,22): Error CS0012: The type 'NSObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. (CS0012) (CheckingPendo)

I am experiencing the same compile time error after adding Xamarin.ios reference as well.

​​<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-ios'">
      <PackageReference Include="pendo-sdk-iOS" Version="2.16.0.5665" />
    </ItemGroup>
    <ItemGroup>
      <Reference Include="Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065" />
    </ItemGroup>

Android Platform

After adding the pendo-sdk-android nuget package version 2.16.1.4053(latest stable version).
I am getting the following error.
​​

/Users/[user]/.nuget/packages/xamarin.android.support.annotations/28.0.0.3/build/monoandroid90/Xamarin.Android.Support.Annotations.targets(3,3): Error MSB4062: The "Xamarin.Android.Support.BuildTasks.VerifyVersionsTask" task could not be loaded from the assembly /Users/[user]/.nuget/packages/xamarin.android.support.annotations/28.0.0.3/build/monoandroid90/Xamarin.Android.Support.BuildTasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
 Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. (MSB4062) (CheckingPendo)

I would appreciate your assistance in resolving this issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

枯寂 2025-02-16 15:32:56

Pendo发布了对毛伊岛的支持:
pendo maui plugin

可以找到指令在这里

Pendo has released support for maui:
Pendo Maui Plugin
Instruction could be found here

中性美 2025-02-16 15:32:56

我已经检查了您提供的所有参考和依赖项提供的软件包。它们都不支持.NET 6。因此,您无法在毛伊岛使用它。

I have checked all the packages you provided with it's reference and dependencies. They are all not support .net 6. So you could not use it in Maui.

爱格式化 2025-02-16 15:32:56

Pendo SDK目前不支持MAUI,但很可能会。

Pendo SDK does not currently support MAUI, but they most likely will.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文