@helge@mastodon.social
@helge@mastodon.social avatar

helge

@helge@mastodon.social

https://github.com/helje5 Swift things, FOSS, Apple Apps.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

helge, to random
@helge@mastodon.social avatar

Did someone work w/ yet? I assume it is essentially like Android development? Or would you always use sth like Unity and never touch the actual "2D" GUI things? Is there a good introduction article for developers?

helge, to random
@helge@mastodon.social avatar

If you need a pre-filled database just to play around w/ SwiftData, I have this Northwind import as an example/prototyping database: https://github.com/Northwind-swift/NorthwindSwiftData

mattiem, to random
@mattiem@mastodon.social avatar

@ctietze hello! Have you ever used/made/ thought about a Swift wrapper package for JavaScriptCore?

helge,
@helge@mastodon.social avatar

@mattiem @ctietze You can probably do a lot with dynamic member lookup and callable. In that spirit: http://www.alwaysrightinstitute.com/swift-objc-bridge/

helge,
@helge@mastodon.social avatar

@mattiem @ctietze Chris Lattner did it for Python. Just use Python, better language anyways 🙃

simonbs, to random
@simonbs@mastodon.social avatar

Asked my first question on the Apple Developer Forums, so if someone knows eskimo and could send my question their way, I'd appreciate it 😄 https://developer.apple.com/forums/thread/750283

helge,
@helge@mastodon.social avatar

@simonbs @justkwin He is right here as well 😬

helge, to random
@helge@mastodon.social avatar

It is a little annoying that AsyncStream is named like that. Now I have to come up w/ other names for bidirectional streams, which is slightly annoying 🙂

mattiem, to random
@mattiem@mastodon.social avatar

The thing I find so compelling about watchOS development is the extreme constraints. It’s the polar opposite of macOS.

Playing around with TabView and it’s cool.

#BuildInPublic

helge,
@helge@mastodon.social avatar

@krzyzanowskim @mattiem Wrong, on macOS you always have NSViewRepresentable, which you don't have on watchOS.

gruber, to random
@gruber@mastodon.social avatar

Electron.

helge,
@helge@mastodon.social avatar

@stroughtonsmith @gruber Your point is correct but calling Catalyst apps native is the most weird thing.

helge,
@helge@mastodon.social avatar

@gruber Those memory comparisons are quite off really. There is nothing wrong with apps consuming all the memory available, it’s there, use it.
The key difference is what the memory is being used for, and for Electron that is largely just infra.

helge,
@helge@mastodon.social avatar

@stroughtonsmith @gruber They are certainly not native. Yes a set of builtin apps (like Messages) use that zombie and that is awful.
What system features does it power?

helge,
@helge@mastodon.social avatar

@stroughtonsmith @gruber For me native means that it follows the system UX conventions, UIKit is of course closer to that than say Electron, but it is still quite off. Just like you can easily tell an Electron you can usually tell a Catalyst app (eg via resizing behavior)
What language is being used doesn’t matter that much for me, a PyObjC Cocoa app can be perfectly sound.
An app using a different framework isn’t native 🤷‍♀️

ctietze, to SwiftUI
@ctietze@mastodon.social avatar

Remember that I was confused and worried about buttons in background windows not being "click-through" (aka acceptsFirstMouse) once you add custom styles?

I just started on a way to handle click-through events and then the very first step sufficed to make it work:

https://gist.github.com/DivineDominion/3795a9c40eea16144358e120368013ac?permalink_comment_id=5019677#gistcomment-5019677

This wraps the SwiftUI.Button in an NSHostingView that always wants acceptsFirstMouse. And with that, the button it contains receives the click, not the hosting view!

helge,
@helge@mastodon.social avatar

@ctietze Events travel top down until they are handled, not quite sure where you see the bug here.

kyleve, to random
@kyleve@mastodon.online avatar

I am hiring a staff engineer and tech lead for the UI Systems iOS team at Square. We build and maintain Square’s design system.

If this sounds interesting, you can apply here!

https://jobs.smartrecruiters.com/Square/743999979471083-staff-ios-engineer-ui-systems

helge,
@helge@mastodon.social avatar

@jsq @kyleve That seems to be covered in the link?

christianselig, to random
@christianselig@mastodon.social avatar

Imo, an internal policy change Apple should adopt that would be great for everyone is if they release a new API in UIKit, it HAS to also be available in SwiftUI. If SwiftUI is indeed the future, no exceptions

helge,
@helge@mastodon.social avatar

@christianselig is part of the future, it is not "the" future. It is still unclear how sth basic like a text editor can work with the scalability constraints of SwiftUI. Or a List w/ more than 1k items.
Everything becomes easier if you start to acknowledge that SwiftUI is a convenience extension to Cocoa, not a replacement in any way. And miraculously SwiftUI also allows super easy integration w/ Cocoa, making sure it is no either or 🙂

ctietze, to SwiftUI
@ctietze@mastodon.social avatar

#SwiftUI experts around the world:

Is there a way to look inside PrimitiveButtonstyle or its effect on the button and see whether it can be replicated?

Because with .plain, some things break that work with .bordered -- and a custom regular ButtonStyle also doesn't work. So the bordered one must be doing something interesting, but I can't get to the honey 🍯

helge, (edited )
@helge@mastodon.social avatar

@ctietze @chris The plain button doesn't respond to -acceptsFirstMouse: while the bordered one does. And this is because the plain button doesn't end up being an actual NSButton (which has this behavior), while the bordered one become an NSButton.

.bordered: SwiftUIAppKitButton : NSButton : NSControl : NSView
.plain: CGDrawingView : _NSGraphicsViews : NSView

helge,
@helge@mastodon.social avatar

@343max @ctietze @chris I think all NSButton's have that behavior. The problem here is that the SwiftUI button w/ custom styling doesn't end up as an actual NSButton ... https://developer.apple.com/documentation/appkit/nsview/1483410-acceptsfirstmouse

helge,
@helge@mastodon.social avatar

@343max @ctietze @chris Those are the "little things" that b0rk if you use a non-AppKit app, say Electron or Catalyst, ... or SwiftUI sometimes.

AppKit has a very specific set of buttons available. And I'd say you are not really supposed to style them in the first place (which clashes w/ what SwiftUI allows). @mackuba has a nice overview: https://mackuba.eu/2014/10/06/a-guide-to-nsbutton-styles/

ctietze, to random
@ctietze@mastodon.social avatar

I don't know why but these macOS styles of yesteryear make the dumbest app look good in screenshots.

This is a picture of an app showing environment variables passed during launch or via GDB.

helge,
@helge@mastodon.social avatar

@ctietze Because Aqua ... but I think even today people are not making enough one-off apps just for a specific internal purposes. It is so easy!

krzyzanowskim, to random
@krzyzanowskim@mastodon.social avatar

interviewing is a full-time no-job 🤷

helge,
@helge@mastodon.social avatar

@krzyzanowskim If that’s your definition of “full time” job it might get hard 🙃
Good luck either way, cool that you have a set of interviews!

helge, to random
@helge@mastodon.social avatar

@mattiem Another fun one in such basic thing, it isn't even obvious where this is coming from (it is an optional delegate parameter w/ a nil default).

helge,
@helge@mastodon.social avatar

@mattiem I did this:

david, to random
@david@tnku.co avatar

Does HTML 5 include WASM? Could you create an html/js bridge to UIKit and Metal and compile Swift code to WASM?
https://snailedit.social/@zmk/112220263952470929

helge,
@helge@mastodon.social avatar

@Migueldeicaza @david It doesn't say Safari but HTML 5. I think the idea here is that you host the Wasm in JSCore and expose a UIKit API towards it. (within an app, not Safari)
(but I don't understand that HTML5 thing, but 4.7 specifically talks about in-app)

helge, to random
@helge@mastodon.social avatar

So you spend years and years to make sure that the Swift compiler makes super highly optimised binaries possible (in release mode), so much that it rivals C++ and Rust in performance.

And then you take that highly optimized binary, and run it in a JavaScript interpreter. Or even better, a JIT 🙈 Which is running on either an ARM or an Intel server.

lapcatsoftware, to random
@lapcatsoftware@mastodon.social avatar

I need code review.

This is one downside to self-employment.

helge,
@helge@mastodon.social avatar

@lapcatsoftware Your indent is wrong. You are welcome!

sindresorhus, to random
@sindresorhus@mastodon.social avatar

I'm still hoping for Apple to add support for time-limited trials and paid upgrades to the App Store. No, I'm not interested in IAP. Maybe EU could force them.

helge,
@helge@mastodon.social avatar

@gregtitus @sindresorhus Yes, but why implement it on your own? (and yes, the iAP messaging is not helpful) Everything being custom everywhere is not good for the customer either?
Just implement the trial and upgrade flow in the AppStore. They get paid to run that, maybe they should make features their customers, the devs, want?

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