Bug 57359 - Messaging Center is broken in 3.0 Preview
Summary: Messaging Center is broken in 3.0 Preview
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: Macintosh Mac OS
: Normal critical
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-06-11 14:21 UTC by Filip Ekberg
Modified: 2017-06-28 19:25 UTC (History)
4 users (show)

Tags: ios, messagingcenter, 3.0, embedding
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Filip Ekberg 2017-06-11 14:21:40 UTC
# Steps to reproduce
1. Create a Xamarin Forms Project
2. Create a View Model with a Command that executes something similar to: MessagingCenter.Send(this, "LoginCompleted");
3. Subscribe to this in Xamarin.iOS (Forms Embedding):
										  (obj) =>{});

# Expected behavior
Event raised

# Actual behavior
Event is not being raised

# Supplemental info (logs, images, videos)
I grabbed the code from github for Messaging Center and the problem is this part: "if (subscription.Subscriber.Target != null && subcriptions.Contains(subscription))" 

For some reason the Target is null here.

If I use the Messaging Center code that comes with the example project - it all works fine.

# Test environment (full version information)
Comment 1 David Ortinau [MSFT] 2017-06-28 19:25:46 UTC

I'm following your steps and using your code snippets, but it's working for me. Please provide a solution and project that demonstrates this issue, and reopen the ticket so we can give that a look.

I'm using