Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
The WidgetPerformUpdate method is never called in an iOS 8 today widget. An example of this can be seen in the sample app here:
You're implementing an (optional) method to conform to a protocol (NCWidgetProviding).
Right now the ObjC side is unaware of your method, i.e. it's not registered.
to the `WidgetPerformUpdate` should fix that (i.e. if it's registered it will be called).
note: unlike non-protocol methods this is _not_ an override (so there's no base method with the required [Export]).
It's called - but it seems to crash before reaching managed code
Oct 2 15:26:52 Mars EvolveCountdownWidget <Error>: 4 com.xamarin.ExtensionsDemo.EvolveCountdownWidget 0x001f7610 get_delegate_for_block_parameter + 220
Oct 2 15:26:52 Mars EvolveCountdownWidget <Error>: 5 com.xamarin.ExtensionsDemo.EvolveCountdownWidget 0x0013cda7 native_to_managed_trampoline_6 + 210
Oct 2 15:26:52 Mars EvolveCountdownWidget <Error>: 6 com.xamarin.ExtensionsDemo.EvolveCountdownWidget 0x0013d4fd -[EvolveCountdownViewController widgetPerformUpdateWithCompletionHandler:] + 80
Looks like we're missing some code. Marking that [Export] as [Abstract] (which is not correct) works.
Ok, so the worksaround so far is to write:
What I think is weird is that "ViewDidLoad" is called every time the widget is displayed. Is this correct behavior? That's what makes the Today widget in the sample work while I would have expected ViewDidLoad only being called once on initialization. I haven't had a chance to test the same in XCode yet, will try that on Monday.
The ViewDidLoad issue might be because Apple aggressively kills extensions when they're no longer needed (or it could also be due to this bug, which crashes the extension).
This fix will be included in Xamarin.iOS 8.4 (early November).
Any chance of getting a build with this fix so I can use it while developing? Or is it part of the alpha build in the near future?
linker support added in master / f9866ecd0ecab9d9e1788e148004dcbb9d70fea2
note: XI 8.4 was for iOS 8.1 only, all fixes (in master) will be part of XI 8.6.
Closing wrt comment #13.
Updated in maccore/master 52186b755230172f97c6793da167875d6a7041ff
The linker support was updated (in C7) to mark only what's required (and not include code that is not needed at runtime).
QA: please re-test the mentioned sample on devices, thanks!