
@b3ll hmm. We used that:
SomeView()
.applyEffect_iOS16plus()
And if #available is inside :)
Stupid. Readable. Fixable if needed.
¯\_(ツ)_/¯
@b3ll hmm. We used that:
SomeView()
.applyEffect_iOS16plus()
And if #available is inside :)
Stupid. Readable. Fixable if needed.
¯\_(ツ)_/¯
If you want to check for iOS 26 (via xcode 16) `#available(iOS 26, *)` does not work `#available(iOS 19, *)` does work. #fail #iosdev #xcode #indiedev #ios26 #ios19 #xcode16 #lol
@mattiem Yes! SwiftUIBackports: https://github.com/shaps80/SwiftUIBackports
and SwiftUIIntrospect https://github.com/siteline/swiftui-introspect
I have a rule/guideline that Introspect especially only gets pulled into one module, and that module primarily just exposes View modifiers that include an if #available(iOS whatever, *) and falls back on Introspect where necessary and possible.
Man, it becomes so cumbersome trying to adopt new OS features with SwiftUI (especially with Widgets). So much wrapping and custom fallback modifiers
I really wish you could do something like:
MyView()
.background(Color.blue)
if #available(iOS…) {
.enableNewFeature()
}
now that all the OSs have the same version number I wish that I could do: `if \#available(26, *)`
@stroughtonsmith Can't they fast forward the year? Then we get to have #available sections for iOS 17/macOS 14, iOS 18/macOS 15, iOS 26/macOS 26
→ The one change that worked: I set my phone to ‘do not #disturb’ three years ago – and have never looked back
https://www.theguardian.com/lifeandstyle/2025/feb/16/the-one-change-that-worked-i-set-my-phone-to-do-not-disturb-three-years-ago-and-have-never-looked-back
“I’m probably a #nightmare to get hold of at a moment’s notice – and should never, ever be someone’s In Case of #Emergency, much to my partner’s chagrin – but I’m immeasurably calmer now I’m not perpetually #available to the #world and his #WhatsApp-mad wife.”
Same here. I've also ditched most #apps in favour of their #web version. Best move ever.
#BENIGNANT #Days AHEAD
ANSWERS FOR LIFE
THE BIG WHY?
WHY OUR CUSTOMIZED PRODUCT LINES, REDRESSALS, RESOLVES, DEFINITIONS and ANSWERS WE DESIGN OR CUSTOMIZE ON OUR OWN ARE QUITE EXPENSIVE, WELL DESIGNED, ENGINEERED, EFFECTIVE, SAFE and USUALLY DOES WORK or PROVIDE QUALITY OUTCOMES.
We at Ministry of Acoustics find bold, effectual, practical solutions to problems of poor design and build, and help resolve some of the most complicated problems of threatened mankind. Our approach is always Crude but with a wide open heart.
To Ministry of Acoustics, the word DESIGN means a weightless, metaphysical conception or a physical pattern and is a pure passion.
We tend to differentiate design as a subjective experience, i.e. designs that affect us and produce involuntary subconscious reactions in contradistinction to the designs we undertake objectively in response to the stimuli. What we elect to do consciously is objective design.
When we say there is a design, it indicates that an intellect has organized different events into discrete and conceptual inner patternings. Everything we see and feel is design, music is design, noise is design, snowflakes are design, crystals are design, planets, stars and galaxies are design accomplishments. Our whole Plant is a design accomplishment. (Grammatical Expressions Courtesy from Designs for a Better Word by Victor Papanek)
The Opposite of design is Chaos.
Design is Intelligent or Intelligible. Most of the designs experienced by the Humans is a priori. Our created universe manifests an aggregate of generalized principles, none of which contradict one another and all of which are inter accommodative with some of the inter accommodations exhibiting high exponential levels of synergetic surprise. Some of them involve fourth power geometrical levels of energy interactions.
WE AT MOA PROVIDE SOME STARTLING ALTERNATIVES IN ACOUSTICS, AUDIO, MEDIA & ENVIRONMENTAL SCIENCES. WE UNDERSTAND THE PRINCIPLE OF WAVES THAT MAKE WAVES.
We expertise in original conceptions, inventions, designs, hypothesis, apotheosis and resolves unknown to others to alter the environment in complex ways which are Omni considerate of all side effects on the altered space or environment. (Information Courtesy-Poisson equation, Laplace equation, wave equation, wave function, Probability interpretation, Time dependence and many)
We are always accustomed to start from primitive conditions and principles where as far as one can see and no other man has explored. We have learnt the art of science to re arrange the environment in such a way that it does progress towards betterment rather than stagnation.
Our #Operations will be #limited to #emergency #support only, in view of high Holidays from September 27th 2024 to October 25th 2024, due to the month of Elul, #Yamim #Noraim-#Days of #Awe and the Yom Teruah-Rosh Hashanah.
Rosh Hashanah literally meaning “head [of] the year”, which is the Jewish New Year. The biblical name for this holiday is Yom Teruah (יוֹם תְּרוּעָה), literally “day of shouting or blasting”, and is also more commonly known in English as the Feast of Trumpets. It is the first of the Jewish High Holy Days (יָמִים נוֹרָאִים Yamim Nora’im. “Days of Awe”) specified by Leviticus 23:23–32 that occur in the early autumn of the Northern Hemisphere.
Our Aim is to create quality life spaces with a (Mushlam) complete acoustic character and preserving the architectural space concept as alive as possible for soulful connections.
At Ministry of Acoustics (Apocalypse Acoustic Sciences Corp) we adapt originative ways of logical arrangements with in depth apotheosis, hypothesis, technology, treatments, declarations, resolutions and ultimately science as the foundation with assistive predictive modelling and AI to compliment and support architectural & visual acoustics, audio, media, AV performance technologies for better lives on earth (#Eretz).
We are #available on #call at +919562583140 and on #mail at apocalypseglobal@gmail.com for emergency system breakdowns and priority sound and noise resolves only.
https://apocalypsesite.wordpress.com/2024/09/25/the-big-why/
@christianselig I had some issues. You can’t just use if #available in the WidgetBundle. https://stackoverflow.com/questions/63797991/widgetbundle-return-widgets-based-on-some-logic
I wish SwiftUI provided an easier way to adopt new modifiers when still supporting older versions. End up needing to make a custom modifier with the #available check around every new modifier you want to use.
@christianselig You can use `@Environment(\.self) var environment` and then put the usage of `environment.activeFamily` behind a `#available` check
SOUL RESTORATION WITH MANDATED TECHNOLOGY UPDATE in PROGRESS from Sept 25 to Oct 27 2024.
SCATTERED OPERATIONS FORECAST
Now featuring the POWER OF PENITENCE @MOA (Apocalypse)
Elul is traditionally a time of introspection and personal stock-taking, known in Hebrew as “cheshbon hanefesh” literally “an accounting of the soul.
The month of Elul began from yesterday and its themes of freedom and repentance are upon us once again. As we draw closer to Rosh Hashanah and Yom Kippur in the days to come, we personally pause to think about what actually sets us apart from ferocious violence, wars and hostage crisis, Gen Z revolutions, prison Breaks, manmade calamities, pandemics, endemics, natural calamities, floods, hurricanes, inhumane conditions, unmanned war machines, robots, cyborgs, machines, hydrogen powered skyscrapers, 3D printers, luxury fortresses, simulators and finally Artificial Intelligence and more…
Is our behavior somehow programmed?
Are we becoming limited?
Thus exposing our ideas about free will as a huge illusion, or are we truly free to do good and evil and to repent when we have done anything wrong?
Is this a matter of abstract speculation, or is this a persistent question motivated by my despair at many people’s seemingly uncontrollable capacities to behave with great unknowingness, grotesqueness, imperiousness, rudeness & selfishness today.
When we feel that despair, we draw comfort and strength from the classic Laws of Repentance, found in this law code, the Mishneh Torah:
Free will is granted to all people. If one desires to turn himself to the path of good and be righteous, the choice is his. Should he desire to turn to the path of evil and be wicked, the choice is his… Each person is fit to be righteous like Moses, our teacher, or wicked, like Jeroboam. [Similarly,] he may be wise or foolish, merciful or cruel, miserly or generous, or [acquire] any other character traits.
There is no one who compels him, sentences him, or leads him towards either of these two paths. Rather, he, on his own initiative and decision, tends to the path he chooses. (Mishneh Torah, Laws of Repentance 5:1-2. Translation by Rabbi Eliahu Touger).
Would we as astute physicists, philosophers, and messianic Jews drawing different conclusions about human freedom and functionality do we really need to possess our contemporary knowledge about the profound genetic, environmental, and psychological influences upon human development to perform the brokenness and the deeds of kindness? Yes or No.
This Season of TESHUVA (Forgiveness) or returning to CLEAN state is indeed a choice I make or take.
What choice are you making or taking also matters most?.
In this world, our Aim is to provide quality life spaces with a (Mushlam) complete acoustic character and preserve the architectural space concept as alive as possible.
At Ministry of Acoustics (Apocalypse Acoustic Sciences Corp) we adapt smart ways of logical arrangements with in depth apotheosis, hypothesis, technology, treatments, declarations, resolutions and ultimately science as the foundation with assistive predictive modelling and AI to compliment and support architectural & visual acoustics, audio, media, AV performance technologies for better lives on earth (#Eretz).
Ahead of the LAST MONTH of “cheshbon hanefesh, we are #available on #call at +919562583140 and on #mail at apocalypseglobal@gmail.com for priority support only on weekdays from 11:30 Am to 15:30 Pm IST only. Our scattered support is limited to emergency system breakdowns or critical sound or noise resolutions only.
Our operations will be restored back to normalcy from the First week of November 2024. Thank you for your incessant and constant support.
https://apocalypsesite.wordpress.com/2024/09/12/holidays-alertapocalypse/
If I want to XCTSkip a test on watchOS, is there a way to do that? I've marked the test function `@available(watchOS, unavailable)`, but that isn't enough (I get why, but still...)
I can't figure out the `if #available` that will do it correctly. Is `#if os(watchOS)` really the only way? (It always feels very ugly doing stuff that way, but maybe it shouldn't.)
This test requires calling a method that is unavailable on watchOS.
@sharplet commenting out that for-await loop resolves the issue. Removing the #available(…) check (which is checking for macOS 13.0) also resolves the problem.
Seems to be your assumption about a bad interaction between the for-await loop and availability check is correct.
Now to reduce it to something shareable.
/cc @ktoso
@chbeer Haven't had to do this, and not sure which part is giving you trouble, but AFAIK
if #available(macCatalyst 15, *)
or something in the Package.swift to exclude certain bits of the data structure should work? (Probably using a method that returns the full array or a partial one)
@mattiem Yeah, that looks basically like what I've done:
extension Color {
public static var Backport: Backport<Self>.Type { Backport<Self>.self }
}
extension Backport where Value == Color {
public static var groupedBackground: Color {
if #available(iOS 15, *) {
return Color(uiColor: UIColor.systemGroupedBackground)
} else {
return Color(UIColor.systemGroupedBackground) // deprecated
}
}
}
@rileytestut wasn't this the ONE job of `#available`?
YIKES: if your iOS app's deployment target is earlier than 17.0, `if #available(iOS 17)` will return FALSE on visionOS…making it difficult to use any iOS 17+ APIs
(First image = iOS 17 deployment target, second image = iOS 16 deployment target)
#Butters or #Butterscotch would love to have a nice human to play and cuddle with!
#Available for #Adoption!
Please share!
Adoptions are saturdays at Petco in Napa, CA, 1-4 pm; applications at www.whiskerstailsandferals.org