Hi everyone,
I'm just throwing this out there to see if anyone has a similar experience.
We have an existing iOS4 app ~ it's been live for a year ~ that crashes on
startup in iOS5 b7
Debugging it shows that all our notificationcenter objects are null when we
try to remove them (whereas in iOS4 they are obviously fine). We are using
the [Obsolete]AddObserver(string,action) method to 'create' the observers
and they work fine in iOS4.
Example code:
NSObject ObserverDownloadableMagsUpdated;
public void ViewWillAppear()
{
ObserverDownloadableMagsUpdated = NSNotificationCenter.DefaultCenter
.AddObserver(Constants.Notification_DownloadableMagsReceived
, notification =>
{ /* does stuff */ }
and
public void ViewWillDisappear()
{
NSNotificationCenter.DefaultCenter.RemoveObserver(
ObserverDownloadableMagsUpdated);
in iOS5, ObserverDownloadableMagsUpdated is null and the RemoveObserver call
causes a crash in ViewWillDisappear.
Thoughts?
cd
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch