Lifecycle for custom NSURLProtocol properties

2016-09-26 Thread Allan Odgaard
I am making use of NSURLProtocol’s `setProperty:forKey:inRequest:` but it seems that my custom properties outlive the URL request, and even if I explicitly call `removePropertyForKey:inRequest:` after my request is done, it would appear that my properties are still being retained by something.

Re: Stupid objective-c question

2016-09-26 Thread Britt Durbrow
FWIW, it’s currently an implementation detail that SELs do map into the global address space in a way that doesn’t collide with anything else; but technically, they are in their own address space and the system could map them otherwise in a manner that does have collisions with other stuff. In

Re: XCode documentation browser

2016-09-26 Thread Graham Cox
> On 27 Sep 2016, at 11:01 AM, Graham Cox wrote: > > the browser has started to open everything in Safari Never mind; re-downloading the doc sets has fixed it. —G. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Stupid objective-c question

2016-09-26 Thread Slipp Douglas Thompson
I'm just going to throw this out there as a solution, not because I recommend this approach (it's API misuse after all) but because it would work. Instead of using an `NSString *` you could use a `SEL` (AKA `struct objc_selector *`) since SELs are guaranteed to be unique for each given string

XCode documentation browser

2016-09-26 Thread Graham Cox
Forgive this non-Cocoa question, but I’m sure the learned folks on this list will be much quicker at pinpointing the issue…. I’m using XCode 7.3.1 on OSX 10.11.6. The built-in documentation browser has always worked fine, and I usually download the doc sets locally so that it’s reasonably fast

Re: Stupid objective-c question

2016-09-26 Thread Britt Durbrow
> On Sep 26, 2016, at 3:31 AM, Slipp Douglas Thompson > wrote: > > I'm sorry if I'm not up to snuff on compiler architecture, but how would a > pointer to the memory address of that same pointer ever collide with any > other pointer? When ***Somebody*** is Doing

Re: Stupid objective-c question

2016-09-26 Thread Fritz Anderson
On 23 Sep 2016, at 9:49 PM, Uli Kusterer wrote: > > Are you sure? I only learned Cocoa when it came to OS X, but my impression > was that, while KVC came from NeXT, KVO arrived with bindings … that would > have been 10.3 or 10.4-ish? As I remember, when KVO was

Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-26 Thread Markus Spoettl
It is an OSX Cocoa GUI application. I have always started it from the command line by executing the executable inside the bundle. While this always worked, it no longer seems to. That said, it didn't occur to me that there's a proper way, by using the "open" command. Thanks for the tip, this

Re: Stupid objective-c question

2016-09-26 Thread Quincey Morris
On Sep 26, 2016, at 02:45 , Britt Durbrow wrote: > >> void *kMyContext = >> >> is *guaranteed* to give you a unique address that nobody else's object may >> occupy? >> > > Splitting hairs, but that’s not ***guaranteed*** - just super highly

Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-26 Thread Gary L. Wade
In what way did you start your app from the Terminal? Is this WindowServer-based or a command line app? Not sure your purpose in starting from the command line if WindowServer-based, but have you tried launching it with the open command where the argument is the .app bundle vs possibly

Re: Question about Swift 3 and AWS

2016-09-26 Thread Quincey Morris
On Sep 26, 2016, at 09:44 , Jim Adams wrote: > > Not sure if this is the right list but I thought I would try. I was thinking > of using Swift 3 for some server side work. The best place to ask is probably over at swift.org :

Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-26 Thread Markus Spoettl
On 26/09/16 15:16, Steve Christensen wrote: What is the error code when it fails? OSStatus is -67054, which is errSecCSBadResource. Only happens when launched from the command line. Markus -- __ Markus Spoettl

Question about Swift 3 and AWS

2016-09-26 Thread Jim Adams
Not sure if this is the right list but I thought I would try. I was thinking of using Swift 3 for some server side work. I know that BlueMix is out there for the IBM Cloud but I live in the Amazon cloud. I was wondering if anyone had thought about porting the aws-sdk from Java to Swift? Jim

Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-26 Thread Steve Christensen
What is the error code when it fails? > On Sep 26, 2016, at 2:44 AM, Markus Spoettl wrote: > > I'm using SecStaticCodeCheckValidity() to self check the signature of my own > app when it is launched. This works fine and always has. > > All of a sudden, the call to

Re: Stupid objective-c question

2016-09-26 Thread Britt Durbrow
> > void *kMyContext = > > is *guaranteed* to give you a unique address that nobody else's object may > occupy? > Splitting hairs, but that’s not ***guaranteed*** - just super highly unlikely to have a collision. There’s never any guarantee that somebody else isn’t Doing It Wrong

SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-26 Thread Markus Spoettl
I'm using SecStaticCodeCheckValidity() to self check the signature of my own app when it is launched. This works fine and always has. All of a sudden, the call to SecStaticCodeCheckValidity() fails if (and only if the application) is started from the Terminal. When I start the very same app