<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Mamatha,<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 18, 2016, at 3:03 AM, Mamatha Busi via swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class=""><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue';" class=""><font color="#454545" class="">Hi</font></p><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue'; min-height: 14px;" class=""><font color="#454545" class=""><br class=""></font></p><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue';" class=""><font color="#454545" class="">init(for aClass: AnyClass) is an unimplemented API on Linux. I am exploring around this to implement the same and have a couple of queries:</font></p><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue'; min-height: 14px;" class=""><font color="#454545" class=""><br class=""></font></p><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue';" class=""><font color="#454545" class="">-> In the context of Linux platform, how relevant is this API for loading bundles dynamically? </font></p><div class=""><br class=""></div></div></font></div></blockquote><div><br class=""></div>On Darwin, this API really only works if the bundle is already loaded. It’s more about getting the NSBundle instance for a particular class.<br class=""><blockquote type="cite" class=""><div class=""><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class=""><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue'; min-height: 14px;" class=""><font color="#454545" class=""><br class=""></font></p><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue';" class=""><font color="#454545" class="">-> In a Bundle, how do I go about getting information on the classes that are available within it? </font></p><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue';" class=""><font color="#454545" class=""><br class=""></font></p></div></font></div></blockquote><div>On Darwin (again) we ask dyld for the library that holds the pointer for the class info, then use further dyld functions to find the path for that library, and use that info to construct the bundle.</div><div><br class=""></div><div>These seem reasonable on Linux and in Swift, if we can get some kind of metadata about the class.</div><div><br class=""></div><div>- Tony</div><blockquote type="cite" class=""><div class=""><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class=""><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue';" class=""><font color="#454545" class="">Any related insights/suggestions would help.</font></p><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue'; min-height: 14px;" class=""><font color="#454545" class=""><br class=""></font></p><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue';" class=""><font color="#454545" class="">Thanks</font></p><div style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue';" class="">
<br class="webkit-block-placeholder"></div><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue';" class=""><font color="#454545" class="">Mamatha</font></p><p style="font-size: 12px; line-height: normal; font-family: 'Helvetica Neue'; min-height: 14px;" class=""><br class=""></p></div><div class=""><br class=""></div></font><br class="">
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev<br class=""></div></blockquote></div><br class=""></div></body></html>