Forum Xamarin.Forms

Using MPRemoteCommandCenter in Xamarin Forms iOS project results in crash!

karliskarlis LVMember
edited August 2015 in Xamarin.Forms

I am currently developing music player in Xamarin Forms. Today i ran in a obvious problem that appears to be a bug!

I have created a class which implements MPRemoteCommandCenter events so that we can handle LockScreen events.... the code works fine on iPod 5th gen running iOS 8.4 but it crashes on iPhone 4 running iOS 7.1.2 when using Xamarin Forms....

I guess now you are asking what am i doing here in Forms section..... So... first i thought i would create a empty Xamarin Forms project and implement my methods... still crash... so i created a Xamarin iOS solution.... the buttons worked fine and there was no crashing!

After a little bit of investigating and commenting out code in the Xamarin Forms test project. I found out that if i didn't call the base.FinishedLaunching (app, options); in iOS Forms projects AppDelegate.cs the buttons in LockScreen started to work and there was no crash and no UI!

So to reproduce this issue i have provided two Xamarin solutions one written in Xamarin iOS and second in Xamarin Forms.... You will also need to run the app on device running iOS 7.1.2



  • ReinisLusisReinisLusis LVMember
    edited August 2015

    I can confirm this bug!

    Listening for lock screen media events using MPRemoteCommandCenter causes application to crash (native exception).

    This does not happen with native iOS apps - only when using Forms (something fails in main loop)!

    Crashed on iPhone 4 (iOS 7.1.2)

    Please fix this!

Sign In or Register to comment.