Swift

natpanferova,
@natpanferova@mastodon.cloud avatar

Sorting data by multiple criteria can be complex, but Swift's built-in tuple comparison feature simplifies the process. Using tuple comparison, we can efficiently sort and organize data by various fields. Check out my new post to learn how: https://nilcoalescing.com/blog/MultiCriteriaDataSortingWithTuples

hamish,
@hamish@hachyderm.io avatar

@jamesdempsey @natpanferova @schwa

That's for the conformance, a bunch of overloads of < for different tuple arities were added all the way back in Swift 2.2 https://github.com/apple/swift-evolution/blob/main/proposals/0015-tuple-comparison-operators.md

schwa,
@schwa@mastodon.social avatar

@hamish @jamesdempsey @natpanferova what I really want is hashable for tuples of different types.

StewartLynch,
@StewartLynch@iosdev.space avatar

Check out the talk I had to cancel at There might be a nugget here that would surprise you. Check out the links in the description to go directly to a specific or nugget

Deep Dish Swift Presentation
https://youtu.be/_XZHzl3R1Fo

davidbures,
@davidbures@mstdn.social avatar

@StewartLynch I watched the talk and it was very insightful! My favorite part was the Bindable technique right at the start. When I first started learning about Observation, I also thought the Bindable thing was some sort of an oversight… regardless, thanks for the great talk 😉

phranck, German
@phranck@chaos.social avatar

Does anyone know of a tool that analyses Xcode projects and then provides me with statistics on lines of code etc.? In any case, it should also take into account Swift packages used.

Any suggestions?

#Xcode #Swift #SwiftUI

leberwurstsaft,
@leberwurstsaft@mastodon.social avatar

@phranck I use tokei for code counting purposes. It’s very fast, has enough options for me.

https://github.com/XAMPPRocky/tokei

phranck,
@phranck@chaos.social avatar

@leberwurstsaft Sehr cool, das Tool!

davidbures,
@davidbures@mstdn.social avatar

Will I spend an hour doing a tedious task? No, I'd rather spend a week writing an app to do it for me.

Anyway, I'll be posting about my next small utility app for macOS, StringsMerge, which will let you merge two conflicting .xcstrings files.

#swift #swiftUI #macOS #opensource #buildinpublic #macdev

cheekbathmediasalad,

@davidbures

This is the way.

davidbures,
@davidbures@mstdn.social avatar

Thanks to @dimitribouniol and @glacials, we're much closer to the next Cork release! I was finally able to implement the first version of a self-compiled check, which was the only requirement left for the next release.

As promised, both Dimitri and Ben will be getting either a free Cork license or the cash equivalent, as well as a special shoutout in the contributors sections once the feature is fully implemented.

#swift #swiftUI #macOS #opensource #buildinpublic #macdev #homebrew #CorkApp

davidbures,
@davidbures@mstdn.social avatar

I used to use GitHub sponsors, but I ran into massive limitations. What I’d recommend is to use an automation system like n8n to react to webhooks that Stripe sends to add users, then also using a different n8n workflow for the verification (which is also what I use) (2/3)

davidbures,
@davidbures@mstdn.social avatar

You can hit up the n8n workflow every time the user tries generating something, the workflow will then check a database for the relevant user info (like the number of tokens) and maybe even generate the response. Then, you can use another workflow to update the database.

That’s about an overview of what I’d do 🤔 Tell me if you have any other questions 😊 I’m far from an expert though (3/3)

davidbures,
@davidbures@mstdn.social avatar

Earlier today, I shared the first prototype of starting and stopping services in Cork.

I've made some adjustments to it, including polishing up the progress indicator, and I think it looks pretty alright.

What do you think?

(@troz here's that 2nd part 😉)

Video of new Homebrew service starting workflow

davidbures, (edited )
@davidbures@mstdn.social avatar

As for having the service name in the button, I’ve read somewhere that it’s better to be explicit in the buttons so that the user doesn’t have to look up at the service name and then back to the button to figure out which service that button will actually modify. All the buttons in Cork follow this system; maybe it’s a bit awkward and noticeable due to the two buttons being next to each other, so let’s see what can be done about that (2/3)

davidbures,
@davidbures@mstdn.social avatar

@arnan @troz Impossible, right? 😂 Anyway, I created Cork so that you could do everything in Homebrew without the terminal. It’s written in SwiftUI for macOS 13+. It using SwiftUI is sometimes a bit awkward, but I do my best to make it work.

There’s a quick overview of the features on the website: https://corkmac.app

You can also browse the source code here: https://github.com/buresdv/Cork

You can compile the app yourself for free, or buy the app for a one-time price of 25€

tootsdk,
@tootsdk@iosdev.space avatar

A new release of TootSDK - 3.10.0 📣

https://github.com/TootSDK/TootSDK/releases/tag/3.10.0

What's changed:

  • Add report, signup and severed relationship notification types @luckkerr

Community contributions are greatly appreciated 🙌

#iOSDev #Swift #TootSDK #Fediverse

kern,
@kern@iosdev.space avatar

Hello Fediverse!

I grew up programming in Applesoft Basic, and now I spend my days writing apps for Apple products.

I’m looking for my next role part-time or full-time. Please get in touch if you would like to work with me!

davidbures,
@davidbures@mstdn.social avatar

I really need some Swift help. If you’re feeling brave, could you check out this Cork issue? https://github.com/buresdv/Cork/issues/275

We’re having trouble with the “Somehow bypass this licensing scheme if the user compiled Cork themselves” part

Do you have any ideas on how to solve this? If you do and you help implement it, you’ll get a spot in the “Special thanks” section of the readme and within the app itself, as well as a free license or cash equivalent of the license

glacials,
@glacials@hachyderm.io avatar
davidbures,
@davidbures@mstdn.social avatar

@glacials @dimitribouniol Thanks a lot!

natpanferova,
@natpanferova@mastodon.cloud avatar

Exciting news! I just released a new book called "Swift Gems" 📚✨

The book consists of a large collection of advanced Swift language techniques gathered and tested over the years, tailored for experienced developers.

Please, check it out: https://books.nilcoalescing.com/swift-gems

All the tips in the book are focused on Swift and Swift Standard Library, so they can be applied to any platform, from iOS and macOS to Swift on the server.

#Swift #SwiftLang #iOSDev

StewartLynch,
@StewartLynch@iosdev.space avatar

@natpanferova Another instant purchase

jamesrandall,
@jamesrandall@mastodon.social avatar

Voxel editor coming along nicely now. Video is taken on the Mac but it also works on the iPad.

I've spent surprisingly little time on this. 20 hours total tops. Its amazing what you can get done with good quality tools, consistency (I normally do an hour pre and post dog walk), and a good set of fundamentals (its really making use of things I've learned in the last year or so). #swift #swiftui #metal

https://youtu.be/R6htZe4Lmjc

ctietze,
@ctietze@mastodon.social avatar

@jamesrandall Oh yes please, a "Mac-assed" Voxel editor sounds great. Video demo looks buttery smooth already :)

I don't know how people adapt to the MagicaVoxel shortcuts and UX

jamesrandall,
@jamesrandall@mastodon.social avatar

@ctietze I’ve been working on voxel buildings for a city builder and wanted something a bit more to my tastes for creating them so figured I’d see what I could do! Hopefully useful to others too.

finestructure, (edited )
@finestructure@mastodon.social avatar
rauhul,
@rauhul@hachyderm.io avatar

@dgregor79 @finestructure so... can we use this on macOS? I dislike having to use swift.org to download new nightly toolchains.

finestructure,
@finestructure@mastodon.social avatar

@rauhul Unfortunately swiftly is Linux only for the moment, although it will support macOS eventually.

kenji, German
@kenji@chaos.social avatar

-Nutzer sollen ändern - Daten aus dem wurden eingesetzt, um Ticketverkäufe für -Konzert in Deutschland zu manipulieren:

"Wie die Ticket-Plattform Eventim mitteilt, hätten in den letzten Tagen unbekannte Kriminelle versucht, sich unautorisiert Zugang zu Konten von Nutzerinnen und Nutzer zu verschaffen, um in den Besitz von Karten für Swifts "The Eras Tour" zu gelangen - und diese dann weiterzuverkaufen."

https://www.n-tv.de/leute/Hacker-machen-Fans-von-Taylor-Swift-nervoes-article24924816.html

piotrekjeremicz,
@piotrekjeremicz@mastodon.social avatar

Today is my 32nd birthday! 🥳🎂🎉

Exactly a year ago, on my previous birthday, I added a cake symbol to the app. Today it symbolizes the day of opening an account in BeforeDaily.

The funny thing is that the first commit that I found was made in July 2022. 😅

Stay up to date with #swift, #swiftui, #iOS and #macos with BeforeDaily!

ctietze,
@ctietze@mastodon.social avatar

@piotrekjeremicz Happy birthday 🍰

piotrekjeremicz,
@piotrekjeremicz@mastodon.social avatar

@ctietze thank you so much!

jonduenas,
@jonduenas@mastodon.world avatar

Alright, might be time to abstract in my app. Who has the best example? Should I use a ModelActor? Would a class holding a ModelContainer be sufficient if I create a new ModelContext inside the CRUD functions?

jonduenas,
@jonduenas@mastodon.world avatar

@davidbures Lol I’m mostly trying to extract my reliance on SwiftData everywhere. If something causes the ModelContainer to fail to initialize, my app still has functionality to offer. In fact, free users don’t even access the database at all. So, doesn’t make sense to fatalError or block the entire app loading. “Abstraction” is probably a step past what I need though, so maybe I should ask for examples of moving SwiftData out of SwiftUI first.

davidbures,
@davidbures@mstdn.social avatar

@jonduenas That’s fair 😁 This is actually something I’m interested in myself

  • All
  • Subscribed
  • Moderated
  • Favorites
  • swift
  • PowerRangers
  • DreamBathrooms
  • everett
  • magazineikmin
  • InstantRegret
  • ngwrru68w68
  • Youngstown
  • Durango
  • slotface
  • rosin
  • GTA5RPClips
  • tester
  • kavyap
  • thenastyranch
  • provamag3
  • mdbf
  • osvaldo12
  • ethstaker
  • vwfavf
  • cubers
  • normalnudes
  • tacticalgear
  • khanakhh
  • cisconetworking
  • modclub
  • Leos
  • anitta
  • megavids
  • All magazines