Bug 22370 - Incorrect template for Action Extension.
Summary: Incorrect template for Action Extension.
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 5.4
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2014-08-26 13:58 UTC by Rustam Zaitov
Modified: 2014-08-27 09:49 UTC (History)
2 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description Rustam Zaitov 2014-08-26 13:58:59 UTC
XS: Version 5.4 (build 150)
Xamarin.iOS: Version: 7.99.4.50 (Enterprise Edition)

When I test Action Extension template app doesn't build
Looks like template is incorrect. It calls UIApplication.InitSyncContext () but there is no InitSyncContext method. But another method with similar name exists:
public new static void Init ()

You can play with https://github.com/xamarin/private-samples/tree/master/ExtensionTest/ActionExtension

Is it incorrect template or missed method in Xamarin.iOS ?
Comment 1 Jeffrey Stedfast 2014-08-26 14:04:01 UTC
It's a missing method in Xamarin.iOS... they replaced it with another method (not sure if it is Init() or not).

I'm waiting to hear back about what method the templates should call instead.
Comment 2 Sebastien Pouliot 2014-08-26 14:35:29 UTC
The templates are bad. `UIApplication.InitSyncContext` existed for a mere 10 minutes before Miguel renamed it to `Init`.

https://github.com/xamarin/monotouch/commit/7ce992173cb511a1eb058b42751ab14d0ce2cb09

It will be replaced (whenever I can get back to this) with `NSExtension.Initialize ();` so hold your breath a little longer :-)
Comment 3 Sebastien Pouliot 2014-08-26 15:36:54 UTC
The new

> NSExtension.Initialize ();

is in the newer builds, assuming you're on ios8-7.4.0 it's b5188507634cc4251319b51c82b92f612bf0e7a1
Comment 4 Jeffrey Stedfast 2014-08-26 15:57:57 UTC
Awesome, thanks Sebastien! I'll update the templates...
Comment 5 Jeffrey Stedfast 2014-08-26 16:00:50 UTC
fixed in git master in monodevelop revision 798af87bc105d51d89e81096def2d057c4d5c4d4
Comment 6 Rustam Zaitov 2014-08-27 08:45:57 UTC
Cool. It works.
Because of this I change status to Verified Fixed