toad.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server operated by David Troy, a tech pioneer and investigative journalist addressing threats to democracy. Thoughtful participation and discussion welcome.

Administered by:

Server stats:

277
active users

#if

4 posts4 participants0 posts today
Nick Lockwood<p><span class="h-card" translate="no"><a href="https://mastodon.social/@mattiem" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>mattiem</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@chbeer" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>chbeer</span></a></span> <span class="h-card" translate="no"><a href="https://hachyderm.io/@cocoafrog" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>cocoafrog</span></a></span> I think you can put <a href="https://mastodon.social/tags/if" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>if</span></a> conditions around individual .viewModifier() lines since Swift 5.5:</p><p><a href="https://swiftbysundell.com/articles/conditional-compilation-within-swift-expressions/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">swiftbysundell.com/articles/co</span><span class="invisible">nditional-compilation-within-swift-expressions/</span></a></p>
Christian Beer<p>Why are things like this not implemented as dummy on macOS? I can't add „<a href="https://mastodon.social/tags/if" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>if</span></a> !os(macOS)“ here and I need to implement a ViewModifier to handle this. Ugh!</p>
PSiReN-X :verified_paw:​<p><a href="https://psiren.eu/tags/OpenLetter" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenLetter</span></a>... </p><p><a href="https://psiren.eu/tags/DearOtherInstances" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DearOtherInstances</span></a>,</p><p><a href="https://psiren.eu/tags/PSiReN" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PSiReN</span></a>-Group <a href="https://psiren.eu/tags/Stills" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Stills</span></a> <a href="https://psiren.eu/tags/ComesComplete" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ComesComplete</span></a> with <a href="https://psiren.eu/tags/ZeroReports" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ZeroReports</span></a> and <a href="https://psiren.eu/tags/TootSuite" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TootSuite</span></a>; <a href="https://psiren.eu/tags/PoweredBy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PoweredBy</span></a>: <a href="https://psiren.eu/tags/FloofsAndSparkles" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FloofsAndSparkles</span></a>... </p><p><a href="https://psiren.eu/tags/AllMyToots" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AllMyToots</span></a> are <a href="https://psiren.eu/tags/HandCrafted" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HandCrafted</span></a> and <a href="https://psiren.eu/tags/ComeToYou" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ComeToYou</span></a> with <a href="https://psiren.eu/tags/TheVoice" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TheVoice</span></a> of <a href="https://psiren.eu/tags/EgyptianSpanishSeanConnery" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>EgyptianSpanishSeanConnery</span></a>... </p><p><a href="https://psiren.eu/tags/IF" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>IF</span></a> you're <a href="https://psiren.eu/tags/ExperiencingAnyDifficulties" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ExperiencingAnyDifficulties</span></a>; you're <a href="https://psiren.eu/tags/DoingITWrong" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DoingITWrong</span></a>... </p><p><a href="https://psiren.eu/tags/TheRules" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TheRules</span></a> are <a href="https://psiren.eu/tags/SimplicityItself" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SimplicityItself</span></a>... </p><p>1: <a href="https://psiren.eu/tags/KnowTheRules" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>KnowTheRules</span></a> <br>2: <a href="https://psiren.eu/tags/RememberTheRules" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RememberTheRules</span></a> <br>3: <a href="https://psiren.eu/tags/TryNotToKillAnyone" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TryNotToKillAnyone</span></a> </p><p><a href="https://psiren.eu/tags/TryNot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TryNot</span></a> to <a href="https://psiren.eu/tags/UpsetTheVolcano" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>UpsetTheVolcano</span></a> and <a href="https://psiren.eu/tags/RememberTheRules" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RememberTheRules</span></a>... </p><p>And, <a href="https://psiren.eu/tags/StopBeingHitler" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StopBeingHitler</span></a>; <a href="https://psiren.eu/tags/IT" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>IT</span></a>'s <a href="https://psiren.eu/tags/TheNewRules" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TheNewRules</span></a></p><p><a href="https://psiren.eu/tags/BTW" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>BTW</span></a>: <a href="https://psiren.eu/tags/IF" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>IF</span></a> you're <a href="https://psiren.eu/tags/Still" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Still</span></a> <a href="https://psiren.eu/tags/NotQuiteSure" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NotQuiteSure</span></a>, <a href="https://psiren.eu/tags/CantRemember" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CantRemember</span></a> (or <a href="https://psiren.eu/tags/JustDontKnow" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>JustDontKnow</span></a>) how a <a href="https://psiren.eu/tags/FederationWorks" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FederationWorks</span></a>... </p><p><a href="https://psiren.eu/tags/LookITUp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LookITUp</span></a> | <a href="https://psiren.eu/tags/DogsCanLookUp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DogsCanLookUp</span></a> </p><p><a href="https://psiren.eu/tags/StillNotHitler" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StillNotHitler</span></a>™️ </p><p>🧙⚕️🤖:wolfparty:🤖⚕️🧙 | :fediverse:​🦹:PirateBadge:​🦄​:PirateBadge:​🦹:fediverse:</p>
Jonathan Wight<p>Really liking Xcode 26's <a href="https://mastodon.social/tags/Playground" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Playground</span></a> support. Very very very useful for geometry coding.</p><p>(Wish we had an explicit `<a href="https://mastodon.social/tags/if" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>if</span></a> playgrounds` type condition so i can only enable code for playgrounds)</p>
Eshu Marneedi<p><span class="h-card" translate="no"><a href="https://mastodon.social/@bigzaphod" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>bigzaphod</span></a></span> Related: It’s insane how many times you have to write <a href="https://mastodon.social/tags/if" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>if</span></a> os compiler checks for even basic SwiftUI code and view modifiers that aren’t available on certain platforms.</p>
Adrian Schönig :kangaroo:<p><span class="h-card" translate="no"><a href="https://mastodon.social/@chockenberry" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>chockenberry</span></a></span> <span class="h-card" translate="no"><a href="https://twit.social/@MikeMilzz" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>MikeMilzz</span></a></span> You can wrap that in `<a href="https://aus.social/tags/if" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>if</span></a> compiler(&gt;=6.2)` which works as a crummy proxy to check if it’s Xcode 26 or Xcode 16.</p>
PSiReN-X :verified_paw:​<p><a href="https://psiren.eu/tags/PSiReN" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PSiReN</span></a>-Group <a href="https://psiren.eu/tags/Stills" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Stills</span></a> <a href="https://psiren.eu/tags/ComesComplete" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ComesComplete</span></a> with <a href="https://psiren.eu/tags/ZeroReports" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ZeroReports</span></a> and <a href="https://psiren.eu/tags/TootSuite" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TootSuite</span></a>; <a href="https://psiren.eu/tags/PoweredBy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PoweredBy</span></a>: <a href="https://psiren.eu/tags/FloofsAndSparkles" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FloofsAndSparkles</span></a>... </p><p><a href="https://psiren.eu/tags/AllMyToots" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AllMyToots</span></a> are <a href="https://psiren.eu/tags/HandCrafted" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HandCrafted</span></a> and <a href="https://psiren.eu/tags/ComeToYou" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ComeToYou</span></a> with <a href="https://psiren.eu/tags/TheVoice" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TheVoice</span></a> of <a href="https://psiren.eu/tags/EgyptianSpanishSeanConnery" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>EgyptianSpanishSeanConnery</span></a>... </p><p><a href="https://psiren.eu/tags/IF" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>IF</span></a> you're <a href="https://psiren.eu/tags/ExperiencingAnyDifficulties" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ExperiencingAnyDifficulties</span></a>; you're <a href="https://psiren.eu/tags/DoingITWrong" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DoingITWrong</span></a>... </p><p>Have we <a href="https://psiren.eu/tags/HadEnoughRainbows" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HadEnoughRainbows</span></a> yet, <a href="https://psiren.eu/tags/Today" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Today</span></a>...? With <a href="https://psiren.eu/tags/PiratePower" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PiratePower</span></a>...</p><p><a href="https://psiren.eu/tags/DontForget" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DontForget</span></a>... <a href="https://psiren.eu/tags/TheFediverseRemembers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TheFediverseRemembers</span></a>... </p><p><a href="https://psiren.eu/tags/TheRules" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TheRules</span></a> are <a href="https://psiren.eu/tags/SimplicityItself" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SimplicityItself</span></a>... </p><p>1: <a href="https://psiren.eu/tags/KnowTheRules" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>KnowTheRules</span></a> <br>2: <a href="https://psiren.eu/tags/RememberTheRules" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RememberTheRules</span></a> <br>3: <a href="https://psiren.eu/tags/TryNotToKillAnyone" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TryNotToKillAnyone</span></a> </p><p><a href="https://psiren.eu/tags/TryNot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TryNot</span></a> to <a href="https://psiren.eu/tags/UpsetTheVolcano" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>UpsetTheVolcano</span></a> and <a href="https://psiren.eu/tags/RememberTheRules" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RememberTheRules</span></a>... </p><p><a href="https://psiren.eu/tags/BTW" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>BTW</span></a>: <a href="https://psiren.eu/tags/IF" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>IF</span></a> you're <a href="https://psiren.eu/tags/Still" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Still</span></a> <a href="https://psiren.eu/tags/NotQuiteSure" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NotQuiteSure</span></a>, <a href="https://psiren.eu/tags/CantRemember" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CantRemember</span></a> (or <a href="https://psiren.eu/tags/JustDontKnow" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>JustDontKnow</span></a>) how a <a href="https://psiren.eu/tags/FederationWorks" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FederationWorks</span></a>... </p><p><a href="https://psiren.eu/tags/LookITUp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LookITUp</span></a> | <a href="https://psiren.eu/tags/DogsCanLookUp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DogsCanLookUp</span></a> </p><p><a href="https://psiren.eu/tags/StillNotHitler" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StillNotHitler</span></a>™️ </p><p>🧙⚕️🤖:wolfparty:🤖⚕️🧙 | :fediverse:​🦹:PirateBadge:​🦄​:PirateBadge:​🦹:fediverse:</p>

Can you still not exclude a platform or specify only this/these platforms in a Swift Package?

I have a tvOS package that is complaining that macOS doesn't support this or that and I'd prefer not putting #if os into a package that will never run on macOS or iOS