3

我面临一个奇怪的问题。我已将本机框架(Serialio RFID 阅读器)转换为绑定库,并在我的一个示例中使用它。此示例只有一个 ViewController。问题是,应用程序在模拟器中启动,但在真正的 iPad 设备中立即关闭,这取决于我是否写了以下行。

public partial class SViewController : UIViewController
{
    public SViewController (IntPtr handle) : base (handle)
    {
    }

    //If I comment following one line, it launches in the iPad too.
    //If uncomment, app closes immediately after launch.
    //In Simulator this has no issue. It launches.        
    SerialioDeviceManager sdm = SerialioDeviceManager.DefaultManager;

    public override void ViewDidAppear(bool animated)
    {
        base.ViewDidAppear(animated);

        //Even if I comment out above Initialization and write that line here, it doesn't allow app to launch in iPad.
        SerialioDeviceManager sdm = SerialioDeviceManager.DefaultManager;
    }
}

iPad 设备日志: 在此处输入图像描述

更多细节:

  • 甚至在调用/初始化此 ViewController 之前,应用程序就已关闭。
  • 这发生在DEBUG模式RELEASE中。
  • 支持的架构是ARMv7 + ARM64
  • 链接器行为:仅链接框架 SDK
  • 本机 SDK 示例完美运行。
  • 此框架在转换时需要 iPhoneos10.3 SDK。

编辑:

只是为了更新,我在绑定库中使用以下文件。

在此处输入图像描述

我对么?

我感谢您的帮助。谢谢。

4

0 回答 0