Archive for July 14, 2022

Thursday, July 14, 2022

Inject: Hot Reloading in Swift

Krzysztof Zabłocki (tweet):

If you only used Apple platforms, you can be surprised to learn how many platforms have embraced hot-reloading decades ago. Whether you write Node or any other JS framework, there is a setup for you to use hot-reloading. Go also offers hot-reloading (This blog leverages that feature).

[…]

Eight years have passed since Swift Playgrounds are still here, and they got better, but are they reliable? […] In my experience: not really.

[…]

Similar story [with SwiftUI Previews], it’s great when it works, but it works unreliably in bigger projects and tends to break more times than they work.

[…]

I recognized that Playgrounds approach might have been too heavy-handed, so today, I’m open-sourcing. A very focused micro-library called Inject that, when paired with InjectionForXcode, will make your Apple development much more efficient and enjoyable!

[…]

Hosts leverage auto-closure, so each time you inject code, we create a new instance of your type with the same arguments as initially, allowing you to iterate on any code, memory layout, and everything else. The only thing that you can’t change is your initializer API.

See also: his previous project Traits.

Previously:

Performance of Microsoft Teams

shilocase (via Hacker News):

Teams is murdering my MacBook Pro 16" i9 with 16GB RAM every day. This was supposed to be the most kick-a$$ laptop at the time but Microsoft is slowly killing it with Teams. It causes serious lags and randomly decides when it wants to share the screen successfully. Other times, it just shows screen but no audio or vice versa.

[…]

My entire system. Mail, Calendar, Finder, and Preview (all Apple Apps, which should run super fast) started running like garbage with lags between 5 and 10 seconds - that's no joke. Upon reboot, it was normal again until I ran Teams for another meeting... reboot.

[…]

I found an MS article mentioning how Teams uses memory because of this Chromium feature due to easier development. I don't care about the ease of development. I CARE about it working and NOT DELAYING MY PRODUCTIVITY.

There’s a long thread. This is with the Electron version of Teams. Microsoft has announced that it’s switching from Chromium to Edge later this year, though I’m not sure how much that will help.

I’ve also heard of people preferring the Web version of Teams since the app is Intel-only.

Previously:

Giving a Shit As a Service

Allen Pike:

In some ways, that’s the fundamental value proposition of a small boutique, whether it be a furniture shop or a software studio.

[…]

I used to puzzle over why potential clients who reached out to me always seemed to get more interested in hiring us if I tried to dissuade them by asking challenging questions. I think the biggest reason is that pushing back demonstrated that I care. If you email 4 software studios for a quote and 3 say “Sure, here’s a quote” but the 4th says “Hm, we certainly could build it but we can’t be sure about cost without knowing X and Y, and here are some other concerns we’d have” then the 4th is going to seem like they give a shit.

Via Nick Heer:

The most impressive trick is to pull this off at scale.

I’m not sure I’ve ever seen that pulled off.

Previously:

Most Fraudulent Apps Still on the App Store

Frederik Lipfert:

In March 2021, Avast shared a list of 133 fraudulent apps for which Sensor Tower estimated a total of 500M downloads and total revenue of $365M generated by the applications in their lifetime.

We found that over a year later, more than 60% of these reported scam apps are still active on the AppStore. According to our calculations, these apps are scamming users for anywhere north of $100M annually.

It’s almost ridiculous how easy it is to identify these Apps just based on publicly available information. Heck, you just need to read some of the one star reviews on the App Store.

See also: Darragh Murphy.

Previously:

Simplify Gmail Safari Extension Blocked Over IAP

Michael Leggett:

Apple is telling me that I HAVE to add in-app payments to my browser extension, Simplify Gmail which currently has no in-app purchases.

[…]

My understanding of the rules was that, IF I use in-app payments, I HAVE to use Apple’s in-app payments.

AND that if I do not use their in-app payments, the app can in no way collect money or link outside the app to collect money for any reason.

The problem seems to be that he’s offering a free app for accessing a paid service. Netflix and other “reader” apps can do this, but in general it’s not allowed.

I am so close to removing Simplify from Safari.

It is by far the most difficult browser to support and not just b/c of Apple’s App Store rules.

Michael Leggett:

They also confirmed my options for further updates are to (1) remove app, (2) add IAPs, or (3) adopt a freemium model.

Michael Leggett:

The 3rd option (and the one I plan to attempt) is only available to me because Simplify modifies an email app. I think this came from the big dispute with Hey.

Previously: