Swift

airspeedswift,
@airspeedswift@mastodon.social avatar

I wrote up what I hope is a easy-to-follow walkthrough/tutoral for the newly proposed non-copyable generics features on the forums.

https://forums.swift.org/t/noncopyable-generics-in-swift-a-code-walkthrough/70862

yoyokuo,

Excited to share a sneak peek of my latest project, TuneTally! 🎶 It's an app designed to help you explore music charts across various streaming platforms, with the added flexibility of selecting different countries. Would love to hear your thoughts – is this something you'd be interested in? 😮

SENTINELITE,

Welp… I want a new persistence layer for my SwiftUI app!

Part of me hopes SwiftData 2 will be leaps & bounds better, but waiting until June seems sooo far away.

Ideally something using the Observation framework, but I doubt that’s going to end well (for me). Any ideas?

(Read: performance has been a nightmare. It should’ve be this hard.)

#Swift #iOSDev #SwiftUI

SENTINELITE,

@mergesort @MuseumShuffle All valid points! I hope you're getting/feeling better health wise! 🤍

Can't wait to get hands on with Plink! 👀

mergesort,
@mergesort@macaw.social avatar

@SENTINELITE @MuseumShuffle Thank you very much. ❤️ I'm also happy to add you to the beta if you'd like to give it a shot, no pressure if not of course!

ryanslikesocool,
@ryanslikesocool@mastodon.social avatar

just released MoreWindows on GitHub :)
additional Scene types for SwiftUI apps on macOS

https://github.com/ryanslikesocool/MoreWindows

davidbures,
@davidbures@mstdn.social avatar

@ryanslikesocool Let’s gooo macOS SwiftUI content, I can’t believe it

yoyokuo,

Todays Xcode tip: Ctrl + M

can’t live without this.🤣

video/mp4

dzamir,
@dzamir@mastodon.uno avatar

@yoyokuo this is awesome, thanks!

CorkApp,
@CorkApp@mstdn.social avatar

Cork version 1.3.5 is out.

This update includes a lot of small improvements, namely a keyboard shortcut for searching packages (available in macOS 14+) and some prep work for the new way of validating licenses.

Read more at https://open.substack.com/pub/corkapp/p/cork-135-out-many-small-improvements?r=2vioyx&utm_campaign=post&utm_medium=web&showWelcomeOnShare=true

License checker

ktoso,
@ktoso@mastodon.social avatar

And now @compnerd about and windows development!

ctietze,
@ctietze@mastodon.social avatar

@ktoso cool, that sounds like a good talk to watch when recordings become available

davidbures,
@davidbures@mstdn.social avatar

Update on the Services sub-window in Cork:

It now includes much more information about a service! You can also searh for a specific service using the search field, much like in the main Cork window.

In the release after the next one, the services might be read-only. I'm not sure if I'll have enough time to implement the turning on/off of services, but we'll see!

More info on Cork: https://corkmac.app

stux,
@stux@mstdn.social avatar

@davidbures Oh, oh, oh! Interesting, thank you! :cat_hug_triangle:

davidbures,
@davidbures@mstdn.social avatar

@stux Glad you like it :ablobcatwink:

davidbures,
@davidbures@mstdn.social avatar
james,
@james@nullio.net avatar

@davidbures Any guides you used that helped? I need to convert all my API calls.

davidbures,
@davidbures@mstdn.social avatar

@james I’ve been reading “Practical Swift Concurrency” by @donnywals and it’s been really helpful: https://practicalswiftconcurrency.com

I’d definitely recommend it.

airspeedswift,
@airspeedswift@mastodon.social avatar

It’s been great to see the rapid adoption of the Benchmark package across the ecosystem. Read more its features on the blog.

https://www.swift.org/blog/benchmarks/

airspeedswift,
@airspeedswift@mastodon.social avatar

Experimental support for generic noncopyable types in the standard library is now available in the nightly toolchain.

Here's a simple demonstration of adoption of this feature on the Swift Playdate example project. Switching the Sprite type from an enum+class box to a simpler non-copyable struct drops binary size from 7k to 6k on the SwiftBreak game.

https://github.com/apple/swift-playdate-examples/pull/13

airspeedswift,
@airspeedswift@mastodon.social avatar

and yes, it was with a heavy heart that I had to temporarily write a .forEach method

dgoldsmith,
@dgoldsmith@mastodon.social avatar

@airspeedswift Resistance is useless. You will be assimilated.

phranck, German
@phranck@chaos.social avatar

Fellow / and developers: I need your help.

This is a question I published on the MongoDB forum:

https://www.mongodb.com/community/forums/t/signin-with-apple/271753

And it is a serious topic to us (the company). Do you know how to do SignIn with one Apple ID on different apps (iOS, macOS) to get the same Realm user?

Please share. Thanks. 🙏
:BoostOK:

dachary,
@dachary@dacharycarey.social avatar

@phranck I’m glad you found a path forward!

phranck,
@phranck@chaos.social avatar
ctietze,
@ctietze@mastodon.social avatar

package devs, have you all updated your projects to use privacy manifest files for UserDefaults usage, yet?

ctietze,
@ctietze@mastodon.social avatar

like here for ReSwift:

https://github.com/ReSwift/ReSwift/issues/512

Could need a helping hand who is faster at adding a privacy manifest

CorkApp,
@CorkApp@mstdn.social avatar

Hey guys, there will be some changes to the way Cork licenses are validated, the demo, and maybe the Cork tap in the upcoming releases. Check out the article for more info: https://blog.corkmac.app/p/upcoming-changes-to-the-install-process

daveaknight,

There are times unicode behaviour just gets annoying. The following will end up failing:

let text = “Some\n\nText”
let regex1 = /[\r\n]/
let regex2 = /(\r|\n)/
let slice1 = text.replacing(regex1, with: " ")
let slice2 = text.replacing(regex2, with: " ")
assert(slice1 == slice2)

After ~15 mins I remembered \r\n can be a single char. to get (roughly) the behaviour wanted and still using a set it needs \r and \n flipping. So [\n\r] or to cover the single char [\n\r\r\n]

revk,
@revk@toot.me.uk avatar

@daveaknight I love that I have, and am old enough to have used before, an ASR33 teletype where CR and LF are very different characters and do something very tangible (and loud) with print head and paper feed.

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

I have a question for the Swift pros:

Ahead of Swift 6.0, I want to go on a deep dive on asynchronicity.

I got the basics down pretty well, so I’m looking for something a little more advanced and detailed.

Are there any blogs/posts/articles that you’d recommend?

Thanks!

mattiem,
@mattiem@mastodon.social avatar

@davidbures Good question about AsyncSequence. Yes, powerful! And getting soooo much better in Swift 6.

Im not a huge fan of using them with NSNotification myself, but it definitely is possible. Do you use Combine now or just callbacks?

Are you sure it is the number of tasks that are the issue and not what the tasks are doing?

davidbures,
@davidbures@mstdn.social avatar

@mattiem I'm using callbacks at the moment, but would love to ue async streams instead. The rest of my code is async/await, so it feels out of place :blobcatpopcornsweats:

As for the tasks, it's definitely a problem of what's happening inside of them. They spawn a huge shell process that can sometimes take a long time to finish, as well as using a lot of resources. Have a look: https://github.com/buresdv/Cork/blob/54c9ee228f1b01110feea95c33ececa4906719cf/Cork/Views/Installation/Reusables/Search%20Result%20Row.swift#L100

masukomi, (edited )
@masukomi@connectified.com avatar

Package Manager / People

I can't resolve known good packages from github. & searching has failed me.

I get 1 of these 2 errors. Unclear why it seems to alternate. API token has FULL access. SSH Key verified (by me and it). HTTP & SSH cloning configs both fail. Wifey can install the same package(s) just fine.

"realm-swift" is irrelevant. it's just a known good package & version to eliminate potential errors related to the package itself.

masukomi,
@masukomi@connectified.com avatar

The separate XCode bug we encountered:
I've been doing this a while & have been forced to jump through the 6 hells of GPG signing many times over the years. Consequently, I have my ~/.gitconfig configured Git to auto-sign all of my commits, with my SSH (not GPG) key.

I like knowing that all my commits to my public repos can be verified & weren't some malicious BS. You can fake the name & email on a commit trivially.

However, if I make a new XCode project w/ git it does this. 🎉
🧵5/?

masukomi,
@masukomi@connectified.com avatar

This isn't actually a problem for me because i never use IDEs to manage git.

So, XCode can't handle GPG signing configured git setups, their error messages are god-awful, and I think they're absolute 🍆's for bundling all their 💩 into their 💩 IDE.

You know who doesn't use XCode at Apple? Everyone‡ who isn't coding in Swift/Obj-C. I'm not kidding. NONE of my coworkers used it. Why? Because there are tons of great IDEs / Editors out there that aren't XCode.

FIN
‡some exceptions apply of course.

masukomi,
@masukomi@connectified.com avatar

I've got a mac app that I've been avoiding touching because the last time I tried to sign it was an effing nightmare. But that was years ago.

Today I opened it up to see just how many compliation errors it had, and how much / if they've improved signing for distribution outside of the app store.

I was greeted with this lovely dialog which makes me want to touch it even less.

🤦‍♀️

swiftdevjournal,

@masukomi With that amount of code, it would be easier to fix the errors manually than trying to install and run Xcode 10.1 on a Mac running a recent version of macOS.

masukomi,
@masukomi@connectified.com avatar

@swiftdevjournal thanks for the confirmation. That was the conclusion I came to too. I know very little about swift, but a lot about code, and most importantly I have a smart wifey, who can help me.

kharrison,

Turning on strict concurrency checking doesn't protect you from accidentally blocking the main actor. Something I find way too easy to do as I learn how to use Swift Concurrency https://useyourloaf.com/blog/swiftui-tasks-blocking-the-mainactor/

jasonhowlin,

@kharrison I would expect that calling sleep within a function marked to run on the main actor (main thread) will block, regardless of the function being marked async. I suppose adding nonisolated removes the MainActor requirement and then runs within the view’s task context.

kharrison,

@jasonhowlin the sleep is just a placeholder for the actual code which took several seconds to complete

Diggory,
@Diggory@mastodon.social avatar

Me thinking about the implications of v6

https://m.youtube.com/watch?v=LtKe1ZnyRK8

rauhul,
matthaliski,

Hey iOS and/or Ruby devs,

Does this seem right?

Rspec ➡️ Quick
Shoulda Matchers ➡️ Nimble
Minitest ➡️ XCTest

I do a lot of work in Rails, but I'm trying to get the lay of the land for testing in iOS.

finestructure,
@finestructure@mastodon.social avatar

@matthaliski The upcoming replacement for XCTest might be interesting, too: https://swiftpackageindex.com/apple/swift-testing

airspeedswift,
@airspeedswift@mastodon.social avatar
phranck, (edited )
@phranck@chaos.social avatar

To all / folks and / developer. We are facing problems of Realm in combination with Sign In.

Do you have any idea if this is supported?
Please share, thanks.

https://www.mongodb.com/community/forums/t/issues-with-shared-apple-sign-in-across-multiple-swift-apps-with-realm/270548

tootsdk,
@tootsdk@iosdev.space avatar

A new release of TootSDK - 3.2.0 📣

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

What's changed:

Community contributions are greatly appreciated 🙌

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