#Swift
TIL: RelativeDateTimeFormatter() exists in #swift 🤯
Finally today you can learn about the #Swift OpenAPI Generator and how it can help wrangle HTTP APIs between apps and servers.
For anyone running into issues deploying Vapor app using Fly from an M1 laptop. Here are some tips:
- Don't use remote builders because you'll hit memory limits. You can pass --local-only for that.
- Configure Docker to use Rosetta or deploy from a CI environment.
You can read more about it here
https://pepicrft.me/blog/2023/06/09/vapor-follow-up
Finally I do not have to write boring api layers anymore. Just generate them with Swift OpenAPI Generator.
iOS Dev Weekly, Issue 613 is out. Happy Friday, everyone, and I hope you had an amazing WWDC week! 🚀
https://iosdevweekly.com/issues/613#start
Builder pattern in Rust, Sendables, and Tests aren’t enough
#rust #swift #python #book #CrimeFiction
👉 Please retweet if you ❤ Plurrrr. Thanks! 👍
#WWDC: So cool to see my #Swift on server colleague, Si Beaumont, give an intro into the awesome Swift OpenAPI Generator:
https://developer.apple.com/wwdc23/10171
#WWDC #WWDC23 #Swift #Observed
I’m looking at all the new Observed stuff and asking myself, can I use it for communication between model objects?
Previously, if I had a class with some Published properties, I could just subscribe to those with Combine subscription, delay and debounce them, do all fancy stuff…
How would I do this in the new Observed world without Combine?
Maybe the answer is in some talk or docs, I didn’t watch everything yet.
I'm writing a Mac firmware download tool via #Swift and #SwiftUI for #macOS
https://github.com/stoiandan/MacReviver

L’Alta Corte Britannica due giorni fa ha respinto l’appello di Julian Assange contro l’ordine di estradizione firmato dall’allora ministro dell’interno inglese Priti Patel.
Una sentenza di tre pagine del giudice #Swift che prosegue la persecuzione contro Julian #Assange.
Da un tweet di Stella Assange apprendiamo che martedì prossimo verrà presentato un nuovo ricorso affinché il caso venga giudicato da altri due giudici.
#FreeAssange
#Dropthecharges
#Journalismisnotacrime
Taylor Swift – Sparks Fly https://www.wacoca.com/videos/1766229/global-beauties/
#BIG #Country #fly #machine #phụđềtiếngviệt #pop #SarikataDalamBahasaMalaysia #Sparks #SubtitlesinTagalog #Subtitulosenespañol #Swift #Taylor #TeksdalamBahasaIndonesia #उपशीर्षकहिंदीमें #คำบรรยายภาษาไทย #テイラー・スウィフト #日本語字幕 #泰勒斯威夫特 #泰勒絲 #테일러스위프트 #한글자막

I’m currently learning Swift using @twostraws’s 100 Days of Swift. Today I wrote a while loop that coders who grew up in the 80s may appreciate. (Hint for those of you who aren’t developers: my code won’t let Sammy drive 55.)
#Swift #SwiftUI #Development #Code #100DaysOfSwift #SammyHagar #Music #Rock #IAmANerdFullStop

Playing around with the new Observable macro in Swift. Apple seems to forget it tell you need to import the new Observables framework in pretty much all the videos about it.
UPDATE: I found it: https://developer.apple.com/design/human-interface-guidelines/activity-views
——
iOS devs, please help: I want to add an action to every other app’s share menu. I see see what seems like other apps doing the same in my share menu (e.g. “Copy to Goodreader” or "Print to HP Printer”). I'd like for a user to be able to share a photo using my action. But I can't figure out what to search for in the Apple docs to get me the relevant dev documentation. #iOS #Apple #Xcode #Swift #SwiftUI
#Swift Observation is shipped
Sources behind Xcode 15/Swift 5.9 new @ Observable macro:
https://github.com/apple/swift/tree/main/stdlib/public/Observation/Sources/Observation
https://github.com/apple/swift/blob/main/lib/Macros/Sources/ObservationMacros/Extensions.swift
⎧ #Mojo essentially uses the #ObjectiveC approach of jamming the two languages into one. Except it doesn't repeat Objective-C's mistake of using the component language as the base (which, inexplicably, #Swift didn't just repeat, but actually doubled down on by largely deprecating objects). The reason this is a mistake is that it turns out that the connection language is actually the more general one, the component language is a specialisation of the component language⎭
https://blog.metaobject.com/2023/06/mojo-is-much-better-without-c-than.html
And some bonus #swift content: the “Build robust and resumable file transfers” talk includes a section on building the server side of resumable uploads using SwiftNIO, complete with sample code.
Los 3 ganadores del #Swift Student Challenge de la WWDC23 - #Apple (ES)
👏🏻 👏🏻 👏🏻
https://www.apple.com/es/newsroom/2023/05/meet-3-winners-of-the-wwdc23-swift-student-challenge/
If you want to understand the benefits of using structured concurrency (taskGroups and async let) over unstructured concurrency (spawning new Tasks) in #Swift I highly recommend the #WWDC session: “Beyond the basics of structured concurrency”.
👩🍳🧄🥕🥔
https://developer.apple.com/wwdc23/10170
Important Swift server note:
AsyncHTTPClient and PostgresNIO support cancellation today.

@simonbs We’ve fast tracked adding #Swift 5.9 support to @SwiftPackageIndex so people can add their macro packages and to enable the `product:macro` search filter so users can find them! 🚀
This morning, up your #swift concurrency game with Beyond the basics of structured concurrency
It's so cool to see how the new #Swift Parameter Packs will allow us to get rid of our decode() overloads in PostgresNIO.
- Day 36
In #Swift some functions might expect closures (functions) as arguments. You can call a function inside the closure or, if the arguments that are passed to the closures match with arguments a certain function awaits, you can just pass it’s name and get away with it

The new noncopyable struct introduced by #Swift 5.9 seems interesting, I added a few examples: https://gist.github.com/cecilemuller/9282da43ecfbd07ce5a90d37f5726d18
#WWDC23 #CloudKit #Concurrency #Sendable #Swift #Canopy
In this year’s platform release, many CloudKit types, most importantly CKRecord, are now Sendable 🎉
Nice to see in the docs, and confirmed in an Ask Apple session.
I built Canopy with Xcode 15 and was wondering where all the actor boundary crossing warnings had gone.
I still got work to make Canopy completely warning-free, but this is great.
#Swift Playgrounds is actually really fun! Coming from #Powershell swift is pretty easy so far.


Do you use actors? #swift
Now that it's much easier to debug the implementation I've started to update my Renamed #swift #macro to use the types provided by SwiftSyntax when generating its output. It's a lot more clunky, but heavily reduces the reliance on strings that contains bits of Swift code and maybe it's faster?
Lots more to explore, and it's all exciting!
Here's how I did this for creating typealiases: https://github.com/JosephDuffy/Renamed/commit/51b9dc25a4b7f3b81df65aa1f5184f434c587955
@jamesdempsey #Swift's upcoming and experimental feature flags look pretty similar to #Perl's `feature` and `experimental` pragmas:
• https://perldoc.perl.org/feature (introduced in 2007 with Perl 5.10: https://perldoc.perl.org/perl5100delta#The-feature-pragma)
• https://perldoc.perl.org/experimental (released to #CPAN by @leont in 2013, added to core in 2014 with Perl 5.20: https://perldoc.perl.org/perl5200delta#New-Modules-and-Pragmata)
OK so for those of you who are like me from the past and don’t listen to conferences, tech talks ETC but are actually interested in #programming I want to show you one feature of #Swift and/or #SwiftUI which actually blew my mind because of its simplicity. Before the #iOS 17 era you would do something like
```
class User: ObservableObject {
@Published var firstName = "Nuno"
@Published var lastName = "Mao"
}
//…
struct ContentView: View {
@StateObject var user = User()
var body: some View {
Text("I am \(user.firstName) \(user.lastName)")
}
}
```
Then, in subsequent views you could pass this class around by using `@ObservedObject` property wrapper so that all views could stay in sync and point to the same data. However now they made it to work like that:
```
@Observable
class User {
var firstName = "Nuno"
var lastName = "Mao"
private var eMailAddress = "nuno69a@gmail.com"
}
…
struct ContentView: View {
var user = User()
var body: some View {
Text("I am \(user.firstName) \(user.lastName)")
}
}
```
This code brings some interesting implications with it, the least of it being that we no longer need to mark our properties with the `@Published` property wrapper. Basically all publicly exposed properties are marked as `@Published` automatically without our further intervention. `private` properties stay untouched, like in the example above.
The problem starts when we want to make our data actually changable like so
```
TextField("Name", text: $user.firstName)
TextField("Last name", text: $user.lastName)
```
Funnily enough, it won’t actually work because “Cannot find '$user' in scope”. Or, maybe? They made it actually very clever, to minimize overhead of code generated at compile they they once again force us to use a property wrapper. One small change and our properties can be bound to stuff
```
struct ContentView: View {
@Bindable var user = User()
…
```
That’s all, stufff will now work as expected.
#programming #apple #iOS #macOS #WWDC
Backbase is hiring Application Security Engineer
🔧 #java #javascript #kotlin #swift #kubernetes #securityengineer
🌎 Kraków, Poland
⏰ Full-time
💰 $90k - $230k (Estimate)
🏢 Backbase
Job details https://jobsfordevelopers.com/jobs/application-security-engineer-at-backbase-dec-28-2022-d8d491?utm_source=mastodon.world&ref=mastodon.world
#jobalert #jobsearch #hiring
Check out this week’s featured jobs from iOS Dev Jobs.
https://iosdevweekly.com/issues/612#jobs
#Swift #SwiftLang #iOSDev #MacDev #iOSDevJobs #SwiftJobs #SwiftLangJobs
Today @zoecarver gets into the details of how to go between #Swift and C++ https://developer.apple.com/wwdc23/10172



Cool, #Swift has variadic generics now. I wonder if any of that work is applicable to #Rust; I haven’t really seen any public work on Rust variadic generics for like 2 years.
https://github.com/apple/swift-evolution/blob/main/proposals/0393-parameter-packs.md

Lots of new features in Swift 5.9 that comes with Xcode 15! One of them introduces the use of if/else statements as expressions, simplifying value returns and variable assignments.
I wrote a short post about it: https://nilcoalescing.com/blog/IfElseExpressionsInSwift/
Anyone else still mad at #Swift's `index(_:offsetBy:limitedBy:)` being so cumbersome to use with endIndex? 🤚
#Xcode 15 tidbit:
Images & Colors in Asset Catalogs can now be safely referenced with auto-completion support in your #Swift code! 😍
Basically, Apple sherlocked SwiftGen and made a related update I was planning for @RemafoX_App unnecessary. 👍

In Xcode 15 we can access colors and images stored in asset catalog via autogenerated static properties, for example Color(.myGreen) or even Color.myGreen 🤩 No more string literals 🎉 #WWDC23
And this works for older deployment targets too, not just iOS 17!
There is more information about this new feature in my post: https://nilcoalescing.com/blog/Xcode15Assets
Wow TIL there’s a page on all updates introduced on #WWDC: https://developer.apple.com/documentation/Updates/wwdc2023
I’ve yet to see the SotU (I watched the Keynote in 4AM and collapsed), but some #Swift frameworks catch my eye:
- SwiftData for a CoreData equivalent
- Observation for a KVO equivalent
- XPC now has a native Swift quivalent
- … and AppKit for Sonoma now has Swift code inside
… seems like Swift is preparing to taking over the traditional ObjC parts in the #Apple world.
@inthehands @holly You all demonstrate that a programming language is more than the technical bits and it’s a delight to observe your success.
At lot of the things you and the #Swift team do I can’t truly judge because it’s way over my head. But we can see •how• you do it and that’s exemplary.
Documentation for #Swift 5.9's C++ Interoperability feature is now available on swift.org
Loads of great #swift content for you this week, starting with @dgregor79 and me taking you through the latest improvements in What’s new in Swift
I've been wanting to try my hand at iOS development for a while (In the hobbyist or freelancer scope, not with the intent being a full career path). Today during #WWDC23 I've decided to give it an honest try.
Not too sure what resources to use, I found 100 Days of Swift which seems good https://www.hackingwithswift.com/100/swiftui, and was thinking to pair that with whatever I can find from #Apple themselves, be it a course or documentation. 🤞📚👨🏼💻
Snippets Studio 2.0 is finally released for macOS just in time for #WWDC! Great timing too, since many of you may want to save some snippets of code from this fantastic event-filled week! 😁
🚀 Boosts very appreciated. If this post gets hidden by all the #wwdc23 hype I may post again later this week, as a reminder to try it out, in case it was missed.

OK trying out a real me avatar for this conference thingy. I’ll be at Apple Park today along with a bunch of other folks from the #swift team. Come say hi if you’re there.
📷 👨💻 I’m ready from #WWDC! This photo is from 2014, the year #Apple introduced #Swift to the World! https://otavio.photos/2014/06/01/wwdc.html

In case this is useful to someone, I have a repo with #SwiftUI generated interfaces that I've been updating semi-regularly since #Xcode 11, so I can see the diffs between different versions (there are separate branches for macOS and watchOS): https://github.com/mackuba/swiftui-headers #Swift #iOSDev #MacDev
- Day 32
Ever wanted to let a variable be read from outside but only changed inside the class in #Swift? `public private(set)` will do exactly that, making it public to read but private to write. Works with all access control keywords: public, private, internal

I was gonna write some code on my #Swift #HPGL #GenerativeArt project, but I can’t decide which way to go with it and I lost all momentum in my brain.
Back to playing #NoMansSky

- Day 31
We all know that with #Swift’s modern concurrency we can have async functions but did you know we can also have async variables? Yep, just add an ‘async’ keyword to its getter and don’t forget to call with ‘await’. The same works for throwing – just add `throws`

First Look!
Pre-Alpha / Name TBC / Engine mostly written in Swift + Metal

Sean Allen has all of his #Swift and #SwiftUI courses 30% off for #WWDC https://seanallen.teachable.com/p/home
Well, @swift and @swiftui developers: Do you know more of these fu**** cool websites? 😎
We should collect them all.
* https://fuckingswiftui.com
* https://fuckingclosuresyntax.com
* https://fuckingifcaseletsyntax.com
Apple's WWDC Keynote is on Monday!
If you're in the Greater Saint Louis Area stop by LaunchCode's Mentor center for a watch event. Register now at https://www.eventbrite.com/e/wwdc-watch-event-tickets-638130323977
Boost for visibility!
#Apple #WWDC #LaunchCode #STL #stlouis #saintlouis #tech #swift
Can’t believe it’s been three years already since we kicked off Distributed Tracing in Swift, and today it finally reached 1.0.0 🎉
https://github.com/apple/swift-distributed-tracing/releases/tag/1.0.0