News for hackers. Stuff that matters.
Re:Write code for the web - Apple doesn't care about you, Mr... by zshrc on Sunday February 04, 2024 @10:13AM (#39250787)
Apple provides thousands of APIs to make developing on the platform easier, has created their own programming language that integrates nicely with the platform and has a fully integrated IDE that works with both above.

Sure, buddy… They don’t care about you unless you develop for their platform. And who can blame? The above is a terribly expensive and timely investment.

Re:Write code for the web - Apple doesn't care about you, Mr... by bmitc on Sunday February 04, 2024 @10:50AM (#39251167)
You left out that they lock down anything that isn't those things. I tried developing an app of my own on macOS, not using Swift and their tools, and it's a huge pain. They have deprecated and version locked OpenGL for no other reason than to push their own tools. Trying to just get an external DLL to load was nearly impossible. Anything cross-platform needs to be converted down to their tooling, such as Vulkan to Metal. MacOS is even more of anomaly and special case than all the Linux distributions.

It's crazy how much easier development on Windows is. And Microsoft's is almost all cross-platform. None of those things you mentioned allow you to work in a platform agnostic manner. Whereas Windows supports their own stuff like DirectX but still allows direct running of Vulkan, OpenGL, etc.

Re:Write code for the web - Apple doesn't care about you, Mr... by ederamen on Sunday February 04, 2024 @11:14AM (#39251456)
This. Apple has been slowly, relentlessly, sneakily squeezing out any open or cross platform dev options.

If you want to develop for Apple's devices, you have to sacrifice your future career options with any other tech stack/vendor by investing your limited time into skills that are only relevant in the Apple ecosystem.

Then you have to hope that it's still financially viable to do software dev in Apple's world for the next few decades - which given their demonstrated behavior of scraping back more and more of the pie for themselves and their shareholders, seems like a risky bet.

Re:Write code for the web - Apple doesn't care about you, Mr... by hnfong on Sunday February 04, 2024 @10:58AM (#39251261)
"I tried developing on <platform>, actively avoided using their tools and tech, and the experience sucked because nothing I tried was supported."
Re:Write code for the web - Apple doesn't care about you, Mr... by bmitc on Sunday February 04, 2024 @11:02AM (#39251299)
It wasn't that it was not supported. It is that Apple is openly antagonistic to and actively blocks anything that isn't theirs.

And you also left out key information. I don't have any issues with the same development on Windows or Linux. Apple is the outlier and isn't doing some reasonable thing.

Apple is by far the most troublesome platform to develop for. They literally make you do it their way, and you cannot recover any of that work for other platforms.

Re:Write code for the web - Apple doesn't care about you, Mr... by kredd on Sunday February 04, 2024 @11:19AM (#39251520)
I generally agree with you, but on the other side of the coin, if you follow the processes they’re forcing on you… it’s pretty seamless. Sometimes it’s a bit buggy when they release new APIs or versions of tooling, but given the amount of people who do Native development and the money it generates, it gets resolved.
Re:Write code for the web - Apple doesn't care about you, Mr... by bmitc on Sunday February 04, 2024 @11:35AM (#39251688)
I don't have infinite time and energy. It would be easier to just not support macOS rather than learn an entire stack just for them. Microsoft also has a Windows-only stack, but its perfectly fine to use others.
Re:Write code for the web - Apple doesn't care about you, Mr... by pohl on Sunday February 04, 2024 @12:19PM (#39252178)
This is an overestimation of how much effort it takes to learn another language and stack, especially in a world with Google, Stack Overflow, and LLMs.
Re:Write code for the web - Apple doesn't care about you, Mr... by kredd on Sunday February 04, 2024 @10:54PM (#39257105)
I’m not sure what you mean by “entire stack” when it comes to mobile development, especially with iOS. If you want to target >85% of all devices, you aim for iOS current version - 1, then Swift and xCode your way into AppStore.

I am obviously over-simplifying it, but my point is it really depends on the market you’re aiming for. Like if you think you’ll make an app for users in North America, not supporting Android makes more sense. On the opposite side, if you want India, LATAM, you can drop iOS and never learn anything about Swift since your ROI will be very little. Again, heavily depends on what your goal is.

Re:Write code for the web - Apple doesn't care about you, Mr... by motoxpro on Sunday February 04, 2024 @11:26AM (#39251591)
I agree with the GP. I feel like you're trying to walk into a steakhouse and ask for pancakes KNOWING it was a steakhouse before you went in. Pancakes are great, but it says steakhouse right on the sign that says "We sell steak and nothing else"
Re:Write code for the web - Apple doesn't care about you, Mr... by bmitc on Sunday February 04, 2024 @11:42AM (#39251772)
The analogy doesn't work.

It's not like Apple provides their platform and then if you don't want to use it then fine, you're on your own. They are actively hostile towards you doing something else.

If I leap off your analogy, which again doesn't really work, it's as if they throw tomatoes from their steakhouse as you go towards the pancake house.

Re:Write code for the web - Apple doesn't care about you, Mr... by skydhash on Sunday February 04, 2024 @12:57PM (#39252582)
Are they? They own the OS. And they reserve to themselves the rights to change how it behaves. There’s no standard API, only tooling. So yeah, it’s obvious that you’ll be in great pain if you try to sidestep the tooling. Everything apart from their SDK is and will always be an hack.
Re:Write code for the web - Apple doesn't care about you, Mr... by bmitc on Sunday February 04, 2024 @01:22PM (#39252839)
Are they what? Actively hostile? Yes, they are.

Of course they can do whatever they want. But it makes everyone slowly hate them.

Re:Write code for the web - Apple doesn't care about you, Mr... by motoxpro on Sunday February 04, 2024 @03:52PM (#39254337)
If you go and develop for android (the pancake house) how can they possibly be hostile toward you? Sure if your want to develop for both then it's not ideal, and I agree it sucks to have to learn two languages, but that's not apples problem.
Re:Write code for the web - Apple doesn't care about you, Mr... by Eric_WVGG on Sunday February 04, 2024 @10:47AM (#39251143)
I likewise have a fairly sunny perspective of Apple development, I even like XCode (since SwiftUI, at least… could never get the hang of Interface Builder).

But the fact that he got in to work on a music app is illuminating. The Apple audio APIs are an absolute mess. Media Player, AVPlayer, Core Audio, AVFoundation, AVAudioEngine… it's like competing teams dating all the way back to NeXT kept writing their own libs and somehow they all persisted through the iPhone era.

I spent about three months of the COVID lockdown trying to make a Shoutcast/Icecast player, it was excruciating.

Re:Write code for the web - Apple doesn't care about you, Mr... by mnvrth on Sunday February 04, 2024 @11:32AM (#39251646)
OP here. Funny you mention Shoutcast, because a Shoutcast player is what I'd made earlier - https://github.com/mnvr/Soundtrack. So I sort of know what you mean :)

And you know the reason why it's macOS only? because the Apple App store reviewer rejected it heh.

Re:Write code for the web - Apple doesn't care about you, Mr... by ederamen on Sunday February 04, 2024 @10:43AM (#39251097)
They don't develop those APIs out of the goodness of their heart - it's a lock in strategy.

They've made it practically impossible to write native cross platform code that runs on IOS, and they've everything they can (within political limits) to prevent web apps from being able to compete with native apps.

Re:Write code for the web - Apple doesn't care about you, Mr... by dgfitz on Sunday February 04, 2024 @11:19AM (#39251521)
I’ve had success with Qt building an app that compiles on Android and iOS. I’m not in the app development business at $dayjob though.
Re:Write code for the web - Apple doesn't care about you, Mr... by ederamen on Sunday February 04, 2024 @11:35AM (#39251690)
Oh cool - I started looking into Qt a while ago but was confused by their license. Would you recommend it?
Re:Write code for the web - Apple doesn't care about you, Mr... by rubymamis on Sunday February 04, 2024 @11:41AM (#39251746)
The license may look confusing, but it's pretty permissive. I highly recommend Qt. I developed a block editor[1] (similar to Notion) using Qt C++ and QML, and my development experience is pretty great.

[1] https://www.get-plume.com/

Re:Write code for the web - Apple doesn't care about you, Mr... by bowsamic on Sunday February 04, 2024 @11:18AM (#39251499)
Many apps have a cross platform C++ back end
Re:Write code for the web - Apple doesn't care about you, Mr... by officialchicken on Sunday February 04, 2024 @10:22AM (#39250875)
My only concern is that standard would easily place Oracle as the winner of most corporate care for developers in a terribly expensive and timely investments!!!
Re:Write code for the web - Apple doesn't care about you, Mr... by pjmlp on Sunday February 04, 2024 @10:36AM (#39251022)
Actually I have my Oracle account since mid-1990's, and in some respects for DB development tooling, only MS SQL has feature parity.

Specially for applications where the DB is a platform on its own.

Re:Write code for the web - Apple doesn't care about you, Mr... by mouse_ on Sunday February 04, 2024 @10:54AM (#39251211)
You put this better than I could have. Extended support can in fact be malicious. Appreciate your contribution.
Re:Write code for the web - Apple doesn't care about you, Mr... by bogwog on Sunday February 04, 2024 @12:13PM (#39252101)
Hey man.

I don't know you, but even if you had a highly successful app on the appstore, I (an internet stranger) would care more about you being hit by a bus than the Apple corporation would, or any of the MBAs over there that you worship.

Any relationship you think you have with Apple is completely in your head. They take advantage of people like you all the time. Developing for Apple is an abusive relationship, and that's always a difficult thing to come to terms with.

I know this comment is probably just going to annoy you and result in a long, ranty, defensive, passive aggressive response. I don't care. I still love you more than Tim Cook/Steve Jobs does/would, my fellow dev.

Re:Write code for the web - Apple doesn't care about you, Mr... by carlosjobim on Sunday February 04, 2024 @03:33PM (#39254137)
Such a nice and selfless friend! Will you also pay the same amount of money into the developer's bank account as Apple does for top selling apps?
Re:Write code for the web - Apple doesn't care about you, Mr... by mardifoufs on Sunday February 04, 2024 @08:58PM (#39256451)
>you worship

Yeah okay, I guess you worship google if you support webapps too?

Re:Write code for the web - Apple doesn't care about you, Mr... by TillE on Sunday February 04, 2024 @10:36AM (#39251030)
Swift is great, but the vast majority of apps really don't need to be lovingly hand-crafted for each platform, and Swift is (currently) a bad choice for anything non-Apple.

Personally if I were working on mobile stuff, I'd be looking at .NET MAUI.

Re:Write code for the web - Apple doesn't care about you, Mr... by itsautomatisch on Sunday February 04, 2024 @01:11PM (#39252725)
I'm not sure why you think MAUI is a great choice considering its current status. There is a huge lack of learning resources, a very tiny community, and very few-to-none successful applications built entirely using MAUI at this point. There isn't any strong guidance or opinionated advice for how to architect or scale your app from Microsoft, either. Avalonia is a much better choice if you must use .NET, but outside of people who really, really like C# or have legacy apps they want to migrate, I don't think either will be very good choices for new greenfield apps. If anything, Microsoft has been signaling that Blazor Hybrid is what you should be using, and while it does use the same core technology under the hood, it is much more at home for C# developers who have been doing ASP.NET which has far more developers than WPF or Xamarin ever did.
Re:Write code for the web - Apple doesn't care about you, Mr... by Retr0id on Sunday February 04, 2024 @10:33AM (#39250986)
Are you writing this from the perspective of someone who has tried to consume an Apple API?
Re:Write code for the web - Apple doesn't care about you, Mr... by righthand on Sunday February 04, 2024 @10:32AM (#39250970)
It’s eternally expensive as they extract more and more money from the developers in new ways too. Building those APIs and tooling is never paid off because there’s enough unpaid evangelists socially guilting you into paying for it. We should be so lucky that Apple extracts billions every year and says when and where to stop and go.
Re:Write code for the web - Apple doesn't care about you, Mr... by worksonmine on Sunday February 04, 2024 @11:07AM (#39251368)
They didn't have to develop their own language. It's part of the lock in.
Re:Write code for the web - Apple doesn't care about you, Mr... by blitz_skull on Sunday February 04, 2024 @10:23AM (#39250881)
Lol. Have you ever used their “IDE”? My guess is you haven’t based on the tone of your remark. Apple has been developer-hostile for years, and OP was just synthesizing their thoughts around this and TBH I found the conclusion to be fairly nuanced and apropos.
Re:Write code for the web - Apple doesn't care about you, Mr... by whynotmaybe on Sunday February 04, 2024 @10:36AM (#39251027)
I've used every major ide since turbo Pascal in the 90`s and xcode is the less intuitive ever.

I'm not an Apple user and when I have to do anything I don't know on Mac, the way to find it is always with the question "what's the simplest way to do it".

Except xcode. I always have to google or gpt to find what I want.

Re:Write code for the web - Apple doesn't care about you, Mr... by romanovcode on Sunday February 04, 2024 @10:29AM (#39250947)
I still can't figure out how to format on save in Xcode. Or format in general?
Re:Write code for the web - Apple doesn't care about you, Mr... by DelightOne on Sunday February 04, 2024 @10:38AM (#39251040)
Format with this integration: https://github.com/ruiaureliano/X-SwiftFormat

Then make CMD+s the shortcut.

Re:Write code for the web - Apple doesn't care about you, Mr... by andrekandre on Sunday February 04, 2024 @11:01AM (#39251292)
thats great (i use swift format plugin myself) but really apple should provide these features not 3rd parties and ideally format while typing not just save
Re:Write code for the web - Apple doesn't care about you, Mr... by Someone on Sunday February 04, 2024 @10:33AM (#39250993)
> Or format in general?

I use the workaround of Command-A, command-X, command-V aka “Select All, Cut, Paste”.

Unfortunately that loses cursor position in the file and gives you a free newline at the end of your content.

Re:Write code for the web - Apple doesn't care about you, Mr... by noSyncCloud on Sunday February 04, 2024 @11:27AM (#39251600)
You're supposed to end your document with a newline. That's a POSIX standard.
Re:Write code for the web - Apple doesn't care about you, Mr... by mdaniel on Sunday February 04, 2024 @12:23PM (#39252222)
I don't mean this as snark, I'm genuinely interested: do you have a phrase I can search for or a link to that? I don't think I've ever heard that before but I would love to start citing it
Re:Write code for the web - Apple doesn't care about you, Mr... by Someone on Sunday February 04, 2024 @02:31PM (#39253536)
Because otherwise, files can contain characters that aren’t on any of its lines.

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1...:

“3.206 Line

A sequence of zero or more non- <newline> characters plus a terminating <newline> character.”

That’s consistent with:

  > echo test | wc
         1       1       5
  > echo -n test | wc
         0       1       4
Re:Write code for the web - Apple doesn't care about you, Mr... by andoma on Sunday February 04, 2024 @02:21PM (#39253451)
Me too. Feels like I have an uphill battle with this at $dayjob. Would be nice with some ammo for the showdowns.
Re:Write code for the web - Apple doesn't care about you, Mr... by Someone on Sunday February 04, 2024 @11:52AM (#39251883)
I know, but if your file already ends in one, it adds a second one, if it already ends in two, it adds a third one, etc.
Re:Write code for the web - Apple doesn't care about you, Mr... by aetch on Sunday February 04, 2024 @10:32AM (#39250984)
Lol. Have you ever used Android Studio IDE? The grass always looks greener on the other side but Xcode and iOS development is miles ahead of how slow and unhelpful Android Studio is the majority of the time. Don’t even get me started on opening up your app 6 months later to update the code and it’s a 99% chance some Android gradle build system or dependency has changed and broken the build…
Re:Write code for the web - Apple doesn't care about you, Mr... by blashyrk on Sunday February 04, 2024 @11:40AM (#39251742)
I cannot disagree more on just about everything you wrote.

In my experience, Xcode has been terrible, sometimes borderline unusable. The horrible project format, merging pains when working in a team, interface builder being trash in general but completely unusable when you use a lot of custom components with @IBDesignable properties across multiple modules - in that scenario it sometimes rebuilds everything in an endless loop, and brings even the most powerful Mac machines to their knees.

In that state even changing a simple property on a view takes 15 seconds of 100% cpu time.

Sure nowadays there's SwiftUI but IMO it can't be considered as anything more than an alpha until they fix the horrible navigation woes. And even then it still uses UIKit under the hood and you can see countless internally used constraints breaking all the time in the logs. At least that's how it was when I tried it a year and a half ago.

And that's not even touching on the cruel joke that is the xcodeproj project format.

Apple didn't even provide a package manager until relatively recently for God's sake. It was left to the community (cocoapods) to fend for themselves in this regard.

Re:Write code for the web - Apple doesn't care about you, Mr... by pjmlp on Sunday February 04, 2024 @10:38AM (#39251049)
I love how it has become a meme in Android developer circles that a "stable" Android Studio release always requires a fix release shortly thereafter.

Also Gradle breaking the DSL all the time has become such a pain, that eventually they had to create an upgrade wizard, as if debugging performance issues with the build wasn't fun enough.

Re:Write code for the web - Apple doesn't care about you, Mr... by blashyrk on Sunday February 04, 2024 @11:28AM (#39251613)
Say what you want against Gradle, but that method of project/workspace configuration is miles, no, lightyears ahead of the dumpster fire that is the xcodeproj format, especially when working in a team.
Re:Write code for the web - Apple doesn't care about you, Mr... by fsflover on Sunday February 04, 2024 @10:53AM (#39251201)
You should try to write an app for a GNU/Linux phone, to see how being free from a duopoly helps in real life. For that, you simply use all desktop tools (and the app will also run on desktop).
Re:Write code for the web - Apple doesn't care about you, Mr... by realusername on Sunday February 04, 2024 @10:37AM (#39251036)
xcode is indeed the worst coding software I ever used, it looks like some kind of 90s software which got left rot since.

The whole thing takes 13GB to download where resuming fails, has an undocumented config format which doesn't work with git properly and is more sluggish than an Electron app.

The app upload process itself is so broken that even Apple had to release a third party tool to bypass it.

I refuse to believe they are using this thing internally, they must have some kind of special internal process to make this mess sort of work.

I could say similar things about appstoreconnect where even reordering app images is broken with a race condition if you click too quickly and you have to reload the page.

Re:Write code for the web - Apple doesn't care about you, Mr... by smoldesu on Sunday February 04, 2024 @11:22AM (#39251551)
> The whole thing takes 13GB to download

You're one of the lucky ones, eh?

Re:Write code for the web - Apple doesn't care about you, Mr... by aniforprez on Sunday February 04, 2024 @11:45AM (#39251794)
When the stars align and the mighty gods bless me, I am lucky to have Xcode download only 15GB to update. Once, the update got borked and consumed all free space in my Macbook when I kept retrying and almost bricked the laptop

It is utterly insane to me that this is the only way to build and sign apps for Apple devices locally. At one point, I almost burst into tears cause I was excited that they finally added an update that highlighted the line the cursor was on

Re:Write code for the web - Apple doesn't care about you, Mr... by lutoma on Sunday February 04, 2024 @12:52PM (#39252539)
> has created their own programming language

For me, that's part of the problem. I'm sure Swift is a nice enough language based on what I've seen. But I'm not going to invest a substantial amount of time learning a language that is realistically only ever going to be useful to target one platform by a single company.