0
votes

I am creating a xamarin forms app in which a iOS binding library used on a button click in xamarin forms app a ViewController presented from binding library (i.e. declared and defined inside binding library) and in ViewController there is a navigation bar create programmatically in ios library.On bar button click library dismiss the ViewController in ios and Xamarin iOS also. But when I used this library in Xamarin forms app there is a crash on the same button click. the followings are my Screen Shots of my crash logs:

Exception

and application output is as follows: Applicaion Output logs

Application logs are:

 2016-09-20 13:10:33.270 TestXamarinFormApp.iOS[2923:95916] -[AppDelegate window]: unrecognized selector sent to instance 0x7be3a0e0

    2016-09-20 13:10:33.275 TestXamarinFormApp.iOS[2923:95916] Xamarin.iOS: Received unhandled ObjectiveC exception: NSInvalidArgumentException -[AppDelegate window]: unrecognized selector sent to instance 0x7be3a0e0
    Thread finished: <Thread Pool> #5

Can anybody solve this problem ?

1

1 Answers

0
votes

The issue is due to Xamarin Forms App does not defines UIWindows in AppDelegate file so this issue can be resolved by adding following function in your AppDelegate File.

public override UIWindow Window {
 get { 
return UIApplication.SharedApplication.KeyWindow; 
      }
}