Re: Accessing the bundle of the call-site

2016-12-02 Thread Jens Alfke
> On Dec 1, 2016, at 10:21 PM, Rick Aurbach wrote: > > Thank you for confirming my suspicions. I know that Bundle won’t help. What I > was hoping for was a Swift runtime call that returned the current module name. Something equivalent to [NSBundle bundleForClass: [self class]]? I don’t think

Re: Accessing the bundle of the call-site

2016-12-01 Thread Rick Aurbach
Jens, Thank you for confirming my suspicions. I know that Bundle won’t help. What I was hoping for was a Swift runtime call that returned the current module name. Since (at least by convention), there is a correspondence between module names and framework names, I was hoping to derive a bundle

Re: Accessing the bundle of the call-site

2016-12-01 Thread Jens Alfke
Introspecting the call stack is possible, if somewhat ugly, using the backtrace and backtrace_symbols functions (on macOS/iOS.) But all you get is a list of PC and stack addresses, or function names. I don’t know how you’d go from those to an NSBundle object. On cursory inspection I didn’t see a