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.
After binding, when creating a new "DownloadableAgent", the following error occurs:
Could not create an native instance of the type 'DLAgent.DownloadableAgent': the native class hasn't been loaded.
It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.
Setting "ObjCRuntime.Class.ThrowOnInitFailure" to false prevent the error from occurring, but calling the methods does not work.
The libraries are built for both arm64 and x86_64
at Foundation.NSObject.InitializeObject (Boolean alloced) [0x0003a] in /Users/builder/data/lanes/2128/efb0d4d9/source/maccore/src/Foundation/NSObject2.cs:170
at Foundation.NSObject..ctor (Foundation.NSObjectFlag x) [0x0000d] in /Users/builder/data/lanes/2128/efb0d4d9/source/maccore/src/Foundation/NSObject2.cs:114
at DLAgent.DownloadableAgent..ctor (Foundation.NSUrl contentURL, DAContentType contentType) [0x00000] in /Users/admin/sky-mobile-app-ios-skygonline/DLAgent/obj/Debug/tvos/DLAgent/DownloadableAgent.g.cs:70
at Storm.iOS.App.Player.DrmPlayer.DrmClientImpl+<GetDrmContent>c__async2+<GetDrmContent>c__AnonStorey4.<>m__0 () [0x00020] in /Users/admin/sky-mobile-app-ios-skygonline/Storm.tvOS/App/Player/DrmPlayer/DrmClientImpl.cs:164
Note that as mentioned in the release notes  and the forum release announcement :
> This version does not provide support for tvOS or watchOS in this release.
> Xamarin has previews (XI 9.3) available for both platforms. See our forums for
> the latest information and download links.
I will mark this bug as NEEDINFO for now to check whether the problem still occurs for the customer on the Xamarin.iOS 9.3 preview version. If so, we can update the "Version" and "Target Milestone" fields accordingly.
We are working with the preview #2 builds:
On a Mac with El Capitan and XCode 7.2 Beta 2.
Thanks for the version info! I am updating the version and target milestone accordingly.
It looks like the native library is correctly linked into the executable (which is the most common reason to get the "Could not create an native instance of the type ..." error), and I can't see anything else obviously wrong from the build logs.
Would it be possible to get a complete test solution we can use to reproduce this?
Please re-open, along with a test case, if this issue still exists in preview 4.