Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Konstantin 馃敪
@konstantin@hachyderm.io  路  activity timestamp 2 weeks ago

One does not simply use conditional modifiers in SwiftUI 18.6... because if one does, one may experience tears and/or need to use expedited review 馃槶

#IndieDev #iOS #SwiftUI

Screenshot from the The Lord of the Rings: Fellowship of the ring where Boromir has his hands up and about to say "One does not simply walk into Mordor"
Screenshot from the The Lord of the Rings: Fellowship of the ring where Boromir has his hands up and about to say "One does not simply walk into Mordor"
Screenshot from the The Lord of the Rings: Fellowship of the ring where Boromir has his hands up and about to say "One does not simply walk into Mordor"
  • Copy link
  • Flag this post
  • Block
dasdom
@dasdom@chaos.social replied  路  activity timestamp last week

@konstantin One does not simply use SwiftUI because if one does, one may experience tears and/or need to use expedited review

  • Copy link
  • Flag this comment
  • Block
obrhoff
@obrhoff@mastodon.social replied  路  activity timestamp 2 weeks ago

@konstantin Dont post it! The SwiftUI Mob on Mastodon will hang you for it. 馃槶

https://mastodon.social/@pakkito/115314355147173532

  • Copy link
  • Flag this comment
  • Block
Konstantin 馃敪
@konstantin@hachyderm.io replied  路  activity timestamp 2 weeks ago

@obrhoff Let them come 鈽猴笍. I have a reproducible case where `if #available(iOS 26.0, *) {}` in a conditional modifier will absolutely break reactivity on iOS 18.6 but not on iOS 26. No amount of "team discipline" can protect against undefined behaviour in the SDK. (or rather, it's well defined but the side effects are so far reaching it may as well be undefined, as explained in that post by Chris Eidhof)

  • Copy link
  • Flag this comment
  • Block
Helge He脽
@helge@mastodon.social replied  路  activity timestamp last week

@konstantin @obrhoff The availability check should actually be fine as it is constant during the execution of the program, it is unrelated to the original problem. So I wonder what issue you actually have.

  • Copy link
  • Flag this comment
  • Block
Andrii Chernenko
@andrii_ch@mas.to replied  路  activity timestamp 2 weeks ago

@konstantin interesting, would you mind sharing the code?

  • Copy link
  • Flag this comment
  • Block
Konstantin 馃敪
@konstantin@hachyderm.io replied  路  activity timestamp 2 weeks ago

And it's not like one hadn't been warned this can happen 馃槄

https://www.objc.io/blog/2021/08/24/conditional-view-modifiers/

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login