Bug 4988 - Missing UTType constants
Summary: Missing UTType constants
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.3.x
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2012-05-09 20:45 UTC by Felix Collins
Modified: 2012-05-10 16:01 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:
RESOLVED FIXED

Description Felix Collins 2012-05-09 20:45:24 UTC
The constants referenced in UTCoreTypes.h are not to be found in monotouch.  Well not that I can see anyway.

See:

http://developer.apple.com/library/ios/#documentation/MobileCoreServices/Reference/UTTypeRef/Reference/reference.html
Comment 1 Sebastien Pouliot 2012-05-10 16:01:34 UTC
The constants will be added in the next releases of MonoTouch (and the associated method bindings will, eventually, follow). In the mean time (e.g. for 5.2.11) you can use this:

public const string MobileCoreServicesLibrary = "/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices";

and the code from:

https://github.com/mono/maccore/blob/master/src/MobileCoreServices/UTType.cs

The last thing you'll need is to add:

    -gcc_flags="-framework MobileCoreServices"

to your project options, under "Additional mtouch arguments" to the library that contains the strings will be linked with your application.


5.2-series: 5784240c0bb907a3fa7536d89df37e0869e6852d
master: 7c8d487d6ee8db58a74d43dca59fd60426ecd88b

QA: unit tests added