Bug 59329 - NSFileProviderItemIdentifier needs an Initializer that takes a string
Summary: NSFileProviderItemIdentifier needs an Initializer that takes a string
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 10.99 (xcode9)
Hardware: PC Mac OS
: --- normal
Target Milestone: Xcode9
Assignee: Alex Soto [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-09-08 12:20 UTC by Ivan Herrera
Modified: 2017-09-10 20:21 UTC (History)
3 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 Ivan Herrera 2017-09-08 12:20:21 UTC
The Swift version of NSFileProviderItemIdentifier takes a String as a param for initialization. In our bindings it is just an enum. It also needs to be equatable.

Swift: https://developer.apple.com/documentation/fileprovider/nsfileprovideritemidentifier
Comment 1 Alex Soto [MSFT] 2017-09-08 14:13:36 UTC
Hello, can you show me which C# API uses this?
Comment 2 Ivan Herrera 2017-09-09 09:05:35 UTC
(In reply to Alex Soto from comment #1)
> Hello, can you show me which C# API uses this?

INSFileProviderItem protocol/interface for example
Comment 3 Alex Soto [MSFT] 2017-09-09 17:10:56 UTC
We can't change the API there since it is a protocol, as I said NSFileProviderItemIdentifier is just NSString typedef in ObjC. That being said, having NSFileProviderItemIdentifier as an enum was a wrong choice since it can be outside the enum scope and be any NSString I will change it to be a static class and have just RootContainer and WorkingSetContainer as standard options and have the users use their own NSString Identifiers
Comment 4 Alex Soto [MSFT] 2017-09-09 22:48:20 UTC
https://github.com/xamarin/xamarin-macios/pull/2634
Comment 5 Alex Soto [MSFT] 2017-09-10 20:21:50 UTC
Fixed in xamarin-macios/xcode9 @ 0b95596fc1783c72775fbea2f566ed79e6a85f24