Swift Framework в Xamarin iOS - NSUnknownKeyException Причина: [<UIViewController 0x7faff37075f0> setValue: forUndefinedKey:] - PullRequest
1 голос
/ 11 июля 2019

В должны показать UIViewController в Xamarin.iOS приложение от swift .framework

В файле Swift

import UIKit

@objc(ConnectViewController)
open class ConnectViewController: UIViewController {

    @IBOutlet weak var screenTitle: UILabel!

    override open func viewDidLoad() {
        super.viewDidLoad()

        screenTitle.text = "Connect.framework"
        screenTitle.layer.cornerRadius = 10
        screenTitle.layer.masksToBounds = true

    }
}

В Раскадровка Я изменил название раскадровки и идентификатор раскадровки для ViewController

enter image description here

В сообществе Xamarin iOS Binding Library - ApiDifinition.cs

using Foundation;
using UIKit;

namespace CustomLibrary
{
    [BaseType(typeof(UIViewController))]
    interface ConnectViewController
    {

    }
}

В приложении для iOS - ViewController.cs

   NSBundle bundle = NSBundle.FromClass(new Class(typeof(ConnectViewController)));
            UIStoryboard storyBoard = UIStoryboard.FromName("CustomLib", bundle);

           PresentViewController(storyBoard.InstantiateViewController("Connecter"), true, null);

Когда я запускаю проект. Сбой после запуска экрана.

enter image description here

...