Re: Another app's UTI can break your app

2014-06-11 Thread Noah Desch
On Jun 10, 2014, at 3:21 PM, Seth Willits wrote: > My app and Coda both open plain text .sql files. Coda exports a UTI for the > .sql extension. So does my app. If .sql files are a public format that was defined by neither your app nor Coda, you should both be *importing* UTIs for it, instea

Re: Another app's UTI can break your app

2014-06-11 Thread Seth Willits
On Jun 10, 2014, at 8:22 PM, Uli Kusterer wrote: > On 10 Jun 2014, at 21:21, Seth Willits wrote: >> - (NSString *)typeForContentsOfURL:(NSURL *)url error:(NSError **)outError; >> { >> if ([url.pathExtension.lowercaseString isEqual:@"sql"]) { >> return @"my.uti.type"; >> }

Re: Another app's UTI can break your app

2014-06-10 Thread Uli Kusterer
On 10 Jun 2014, at 21:21, Seth Willits wrote: > - (NSString *)typeForContentsOfURL:(NSURL *)url error:(NSError **)outError; > { > if ([url.pathExtension.lowercaseString isEqual:@"sql"]) { > return @"my.uti.type"; > } > > return [super typeForContentsOfURL:url

Re: Another app's UTI can break your app

2014-06-10 Thread Sean McBride
On Tue, 10 Jun 2014 12:54:06 -0700, Seth Willits said: >It's not even about malicious intent. Coda obviously has no malicious >intent, but it breaks my app. I'd break Coda if it my app was installed >before it. That's just inconceivable to me. The root problem is with file formats that are not yo

Re: Another app's UTI can break your app

2014-06-10 Thread Vincent
> It's not even about malicious intent. Coda obviously has no malicious intent, > but it breaks my app. I'd break Coda if it my app was installed before it. > That's just inconceivable to me. I’m not sure associating well known extensions types as .SQL is a good idea in the first place. I have

Re: Another app's UTI can break your app

2014-06-10 Thread Seth Willits
On Jun 10, 2014, at 12:33 PM, Sean McBride wrote: >> This is a critical problem. > > This is well known, and has been discussed on this list years ago. Sigh. Wish I had been able to find anything on this topic when I searched. At least I'm not crazy. > Yes, a malicious app could probably c

Re: Another app's UTI can break your app

2014-06-10 Thread Sean McBride
On Tue, 10 Jun 2014 12:21:13 -0700, Seth Willits said: >TLDR: >--- >If your app has a document type that may use the same extension as >another app, you should override typeForContentsOfURL:error: because >otherwise the existence of that other application on a user's system can

Another app's UTI can break your app

2014-06-10 Thread Seth Willits
TLDR: --- If your app has a document type that may use the same extension as another app, you should override typeForContentsOfURL:error: because otherwise the existence of that other application on a user's system can break your app. Problem summary: ---