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.
UIActivityItemProvider is thread-safe but all of its properties call UIApplication.EnsureUIThread.
iOS calls the "Item" property from it from a secondary thread, as specified in the documentation: https://developer.apple.com/library/ios/documentation/uikit/reference/UIActivityItemProvider_Class/Reference/Reference.html - "This method is called on a secondary thread of your app."
It's also clear from Apple's sample that it's called on a secondary thread: https://developer.apple.com/library/ios/samplecode/sc2273/Listings/AirDropSample_APLAsyncImageActivityItemProvider_m.html#//apple_ref/doc/uid/DTS40013842-AirDropSample_APLAsyncImageActivityItemProvider_m-DontLinkElementID_6
My app access PlaceholderItem and ActivityType with no issues at all, after setting UIApplication.CheckForIllegalCrossThreadCalls to false.
I have verified this issue and seems fixed in master build.
I have checked it in following method/properties of UIActivityItemProvider class. Here, UIApplication.EnsureUIThread (); should not be called.
Screencast before fixed : http://screencast.com/t/ORgTM0F7tb
Screencast of fixed issue : http://www.screencast.com/t/8Sp083mPOAa
Environment Info :
=== Xamarin Studio ===
Version 5.1 (build 322)
Installation UUID: 561c7a69-0a91-4bae-ad7c-f0c79d594337
Mono 3.4.0 ((no/c3fc3ba)
GTK+ 2.24.23 (Raleigh theme)
Package version: 304000204
=== Apple Developer Tools ===
Xcode 5.1.1 (5085)
=== Xamarin.Mac ===
Xamarin.Mac: Not Installed
=== Xamarin.iOS ===
Version: 184.108.40.206 (Business Edition)
Build date: 2014-06-02 11:31:47-0400
=== Xamarin.Android ===
Version: 4.14.0 (Trial Edition)
Android SDK: /Users/tajinder/Desktop/android-sdk-macosx
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
3.2 (API level 13)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
=== Build Information ===
Release ID: 501000322
Git revision: e79f17166d197fa4e7b2750c623d3eed3209aa98
Build date: 2014-06-02 18:20:30-04
Xamarin addins: b68a34ef2fc4c46b045dc38e26fb199bfe1b201d
=== Operating System ===
Mac OS X 10.8.4
Darwin Tajinders-iMac.local 12.4.2 Darwin Kernel Version 12.4.2
Mon Jun 17 18:00:12 PDT 2013