<html><head></head><body><div>So if we treat an operating and apps as a collection of libraries (I.e modules) which can be vended to various other swift modules.</div><div><br></div><div>How would we handle library version querying ? Is there support for this already? You are right in my polyfill library I query the version of the core foundation library (mainly due to the lack of the ability to do so with UIKit)</div><div><br></div><div>If we were able to query libraries (I.e modules) it would be great.</div><div><br></div><div>- We could query the version of the standard library of swift which you could use to know the version of swift itself</div><div>- Features across platforms and versions of platforms could be queued simply by knowing if a certain module was loaded (from a library) and what version so you can handle older Apis.</div><div><br></div><div>Functionality that may not be implemented across platforms should be split into its own library or modules to simplify querying if that feature exists on this platform.&nbsp;</div><div><br></div><div>If you have a class shared across platforms but one platform contains platform specific extensions to that class. Then the class would be in the shared module and you could put the extension in a separate module (I.e MyModuleAppleWatchExtensions).</div><div><br></div><div>You should be able to version the methods by the version of the module but only the modules by the specifications of the platform.</div><div><br></div><div>This way we can handle multiple platforms, be less fragile and not encourage people effectively whitelisting a bunch of operating systems in their APIs.</div><div><br></div><div>I think this would work reall nice with the swift PM<br><br>P.s I wanted to check do we have specifies for watch and tvos?<br><br><div class="acompli_signature">Sent from <a href="https://aka.ms/qtex0l">Outlook Mobile</a></div><br></div><br><br><br>
<div class="gmail_quote">On Wed, Feb 3, 2016 at 5:27 PM -0800, "Charles Srstka" <span dir="ltr">&lt;<a href="mailto:cocoadev@charlessoft.com" target="_blank">cocoadev@charlessoft.com</a>&gt;</span> wrote:<br>
<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="3D&quot;ltr&quot;">
<meta http-equiv="Content-Type" content="text/html charset=utf-8">On Feb 3, 2016, at 3:29 PM, James Campbell &lt;<a href="mailto:james@supmenow.com" class="">james@supmenow.com</a>&gt; wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div class=""><div class="">We could only allow objective c methods to be queried by responds to&nbsp;</div></div></div></blockquote><div><br class=""></div><div>But then the check is faulty, because it can find private methods.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class="">But how do we handle Linux or any of the other platforms are you saying we need to annotate with a million OS version specifies&nbsp;<br class=""></div></div></div></blockquote><div><br class=""></div><div>If you’re checking to see whether a library contains an API or not, you probably only care about the library version rather than the OS itself.</div><div><br class=""></div><div>Charles</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class=""><div class="acompli_signature">Sent from <a href="https://aka.ms/qtex0l" class="">Outlook Mobile</a></div><br class=""></div><br class=""><br class=""><br class="">
<div class="gmail_quote">On Wed, Feb 3, 2016 at 1:18 PM -0800, "Charles Srstka" <span dir="ltr" class="">&lt;<a href="mailto:cocoadev@charlessoft.com" target="_blank" class="">cocoadev@charlessoft.com</a>&gt;</span> wrote:<br class="">
<br class="">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="3D&quot;ltr&quot;" class="">
<meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><blockquote type="cite" class="">On Feb 3, 2016, at 3:07 PM, James Campbell via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></blockquote><div class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I think if we did feature detection it should ignore private methods not accessible by the code querying its accesbility. Additionally we really do need proper support across platforms.</span></div></blockquote></div><br class=""><div class="">How is that going to work, though? Most of the system APIs are in Objective-C, which has no distinction between private and public methods at runtime.</div><div class=""><br class=""></div><div class="">I think #available is fine as-is, especially since the compiler is able to detect if you’re using an API that’s not appropriate for the OS X version you’re specifying.</div><div class=""><br class=""></div><div class="">Charles</div><div class=""><br class=""></div>
</div>

</blockquote>
</div>
</div></div></blockquote></div><br class="">
</div>

</blockquote>
</div>
</body></html>