News for hackers. Stuff that matters.
Re:Apple introduces Ask Apple for developers by ajkjk on Tuesday October 11, 2022 @01:38PM (#33166297)
"We’ve been listening to feedback from developers around the world about what will be most helpful to them as they build innovative apps"

Lol, the feedback is surely "stop deleting all your documentation without replacing it" and also "please don't make me re-download Xcode for 3 hours using an account I forgot thee credentials for in your terrible app store with its un-resumable download flow before I can do anything", but they came up with this?

Re:Apple introduces Ask Apple for developers by masklinn on Tuesday October 11, 2022 @01:54PM (#33166533)
Surely "why is radar a black hole of suck" is in there somewhere?
Re:Apple introduces Ask Apple for developers by x0x0 on Tuesday October 11, 2022 @02:30PM (#33167139)
It's absolutely not. Apple desires quick and easy fixes. Devoting time to good documentation, product support, caring about bugs, and devrel ... not gonna happen.
Re:Apple introduces Ask Apple for developers by yamtaddle on Tuesday October 11, 2022 @02:02PM (#33166670)
"Make it so I don't contemplate self-harm and/or abandoning my life to live in the woods every time I need to update XCode" would indeed be a big improvement. IDK WTF they're doing wrong with that but god damn.
Re:Apple introduces Ask Apple for developers by myhf on Tuesday October 11, 2022 @02:15PM (#33166876)
Re:Apple introduces Ask Apple for developers by MichaelCollins on Tuesday October 11, 2022 @02:34PM (#33167221)
> I was reading the subtitles of End of Evangelion out loud to the baby (because she can’t read)

lmao

Re:Apple introduces Ask Apple for developers by dclowd9901 on Tuesday October 11, 2022 @02:48PM (#33167460)
Re:Apple introduces Ask Apple for developers by fn1 on Tuesday October 11, 2022 @02:07PM (#33166763)
I suspect it has to do with APFS doing snapshots to be able to rollback an installation and those snapshots being gigantic.
Re:Apple introduces Ask Apple for developers by saagarjha on Tuesday October 11, 2022 @02:22PM (#33167006)
Not really. The App Store installation first scans the entire bundle before installing the bits it needs, then it downloads the update and applies it, which goes through some not-very-optimized installation code that compresses the bundle on disk using zlib. This is ok for normal apps but for Xcode this can take a while. Blowing away the entire directory and just installing a fresh copy is usually far faster, if you optimize this you can do it in under five minutes.
Re:Apple introduces Ask Apple for developers by derefr on Tuesday October 11, 2022 @03:18PM (#33167917)
Is there a reason that these big installations of OS "components" aren't just distributed as APFS .dmg files, where the (pre-compressed) APFS volume in the disk image just gets shoved into your OS APFS container and wired up to automount at its directory mount-point?

(Basically like how Ubuntu's Snaps work filesystem-wise; but interacting directly with the logical-volume manager to create volumes, rather than keeping the disk image around as a file in your filesystem.)

For that matter, given that the APFS OS volume is read-only, is there a reason macOS hasn't yet transitioned to the coreOS model where OS updates just are just Courgette-alike binary diffs that construct a new OS volume beside the old OS volume atomically by stream-merging the old volume with the patch, and then blessing the result? Or the game-console software update model where the base-images of things are immutable, and instead updates are their own read-only volumes that get overlay-mounted on top of the base images when you mount the base images? (I know macOS can already do the latter for security hotfixes; it's strange that they don't use that capability for regular updates.)

Re:Apple introduces Ask Apple for developers by saagarjha on Wednesday October 12, 2022 @04:21AM (#33174286)
Xcode is not an OS component, but it could certainly be distributed as a APFS disk image that could be union mounted (this is actually how the watchOS and tvOS SDKs work today, plus Apple does this internally). I suspect they use XIPs to get that signature (which, tbh, is kind of useless) and compress it hard, but IMO these tradeoffs are not great. I have a long-term goal of writing out to a disk image myself, but my motivation would be to bypass filesystem performance bottlenecks when decompressing the archive.

> For that matter, given that the APFS OS volume is read-only, is there a reason macOS hasn't yet transitioned to the coreOS model where OS updates just are just Courgette-alike binary diffs that construct a new OS volume beside the old OS volume atomically by stream-merging the old volume with the patch, and then blessing the result?

To my knowledge this is pretty close to how updates work today.

Re:Apple introduces Ask Apple for developers by derefr on Wednesday October 12, 2022 @12:04PM (#33178990)
> To my knowledge this is pretty close to how updates work today.

But the key advantage of this model is a sort of green/blue deploy model for your OS — when you do it, you can construct the new updated OS release in the background while the previous release of the OS is running; and then you "update" by just rewriting the UEFI boot priority to default to the new release. There's no reason that an "OS update" should ever be a thing that sits around and blocks startup.

I think your intended meaning, is that the current model involves a binary diff that gets used to patch the OS volume, while the OS is booted into the recovery volume. Which, yeah, uses kind of the same ideas, but doesn't give any of the same advantages.

Re:Apple introduces Ask Apple for developers by saagarjha on Tuesday October 11, 2022 @02:07PM (#33166748)
Friends don't let friends download Xcode from the App Store.
Re:Apple introduces Ask Apple for developers by ajkjk on Tuesday October 11, 2022 @02:14PM (#33166866)
Friends might be apple developers instead of just developers trying to do something unrelated and randomly discovering they need to download Xcode to do something :(
Re:Apple introduces Ask Apple for developers by sixstringtheory on Tuesday October 11, 2022 @02:24PM (#33167026)
Not sure exactly what you mean, but everyone can choose to either download Xcode via MAS or https://developer.apple.com. I think I tried it with MAS once about 7 years ago and have never done that again since.
Re:Apple introduces Ask Apple for developers by ajkjk on Tuesday October 11, 2022 @02:40PM (#33167321)
Something that a regular developer of Apple products knows, and the rest of us have to figure out, somehow.
Re:Apple introduces Ask Apple for developers by sixstringtheory on Tuesday October 11, 2022 @02:48PM (#33167455)
Oh I see what you mean. Yeah, it’s tribal knowledge unfortunately.
Re:Apple introduces Ask Apple for developers by prange on Tuesday October 11, 2022 @02:49PM (#33167474)
It’s pretty normal that if you want to use the developer tools on a platform and you are not a developer for that platform, you are going to have to figure out how to install the tools.

This is true for Linux and Windows too.

Re:Apple introduces Ask Apple for developers by dmitriid on Tuesday October 11, 2022 @03:06PM (#33167732)
Why do developer tools like git require the presence of XCode?
Re:Apple introduces Ask Apple for developers by hbbwebw on Tuesday October 11, 2022 @03:17PM (#33167911)
I don't think they do. https://formulae.brew.sh/formula/git

Downloading the command line tools package is just a convenient way to get everything, which is why people recommend it.

Re:Apple introduces Ask Apple for developers by dmitriid on Tuesday October 11, 2022 @03:24PM (#33168009)
When you try to install git it forces you to install Command Line Tools for XCode (whatever the f that is) which can take an unknown time to download, force you to accept a license and breaks, and force you to reinstall them at least once a year (or randomly the next time they break something)
Re:Apple introduces Ask Apple for developers by prange on Tuesday October 11, 2022 @04:12PM (#33168646)
Did you know that GCC take an unknown time to download, and forces you to accept a license?

I think it’s pretty common knowledge that Macs are sold as consumer machines that don’t include a full tool chain out of the box. Guess what - it’s free to download and sometimes it gets updates.

It’s hard to understand why you are making such a fuss about installing developer tools on a developer machine.

Sometimes I find I have to install gcc or clang or llvm on a Linux machine in order to install some other package. Why would I moan about this?

Re:Apple introduces Ask Apple for developers by dmitriid on Tuesday October 11, 2022 @04:21PM (#33168731)
> Did you know that GCC take an unknown time to download

Why do I need GCC for git?

> Macs are sold as consumer machines that don’t include a full tool chain out of the box.

It wasn't that long ago that Macs had server software out of the box.

Still doesn't explain why I need to download 670 MB of something to install otherwise separate tools.

And why the hell things like git break when XCode upgrades a version

Re:Apple introduces Ask Apple for developers by prange on Tuesday October 11, 2022 @04:30PM (#33168836)
> Why do I need GCC for git?

You don’t - but you do need it on Linux to install certain other developer tools. There is nothing unusual about having to install developer tools.

> It wasn't that long ago that Macs had server software out of the box.

So what? Are you saying you didn’t realize MacOS is now aimed at consumers?

Re:Apple introduces Ask Apple for developers by dmitriid on Tuesday October 11, 2022 @04:50PM (#33169066)
> There is nothing unusual about having to install developer tools.

And yet, only in MacOS I need to install 670 MB of junk to install, say, git. Why?

> Are you saying you didn’t realize MacOS is now aimed at consumers?

This doesn't explain why I need to install 670 MB of tools to install separate developer tools that are not even Apple's.

Re:Apple introduces Ask Apple for developers by prange on Tuesday October 11, 2022 @05:02PM (#33169215)
> And yet, only in MacOS I need to install 670 MB of junk to install, say, git. Why?

With all due respect, it’s very unclear why you are experiencing so much pain over this. It really isn’t a big deal.

Re:Apple introduces Ask Apple for developers by dmitriid on Wednesday October 12, 2022 @01:20AM (#33173181)
It's very unclear why you are defending this. Especially when it's a very common source of pain. E.g. https://news.ycombinator.com/item?id=33168346
Re:Apple introduces Ask Apple for developers by prange on Wednesday October 12, 2022 @12:19PM (#33179200)
That’s a link to someone facing a different issue that it’s fairly clear most people aren’t experiencing.

I agree that if there is a bug that causes a download to get stuck in a loop, it should be a priority for Apple to fix it.

However that isn’t what you are arguing.

Re:Apple introduces Ask Apple for developers by MichaelCollins on Tuesday October 11, 2022 @04:46PM (#33169016)
> Did you know that GCC [...] forces you to accept a license?

No it doesn't. The GPL is only relevant if you plan to distribute GCC, and you are never made to affirm your agreement when downloading, installing or using GCC. GCC never prompts you with any "click agree to continue" bullshit.

Re:Apple introduces Ask Apple for developers by prange on Tuesday October 11, 2022 @07:12PM (#33170477)
The GPL governs use of the licensed software. What you are planning is no relevance. You are limited to what the GPL allows and no more.

This is no different from Apple’s license, which also allows you to use the software freely unless you want to redistribute it.

Prompt or no prompt, if you use GPL software, you are forced to accept the GPL.

And really? Your complaint is a click to agree to a software license? Why does that upset you so much?

Re:Apple introduces Ask Apple for developers by MichaelCollins on Wednesday October 12, 2022 @10:12AM (#33177243)
> Prompt or no prompt, if you use GPL software, you are forced to accept the GPL.

No prompt, no forced acceptance. You are simply wrong. The GPL permits all use, it has no restrictions on use. It restricts only distribution.

> This is no different from Apple’s license, which also allows you to use the software freely unless you want to redistribute it.

You are wrong. You didn't read Xcode's license. I did, it places substantial restrictions on how and where you can use Xcode, not just restrictions on distribution.

Do yourself a favor and read this document, since you obviously have already agreed to it without reading it: https://www.apple.com/legal/sla/docs/xcode.pdf

Re:Apple introduces Ask Apple for developers by prange on Wednesday October 12, 2022 @11:50AM (#33178773)
Limits on distribution are limits on use. If you don’t understand that, I suggest you Google for some discussions about why many people don’t use GPL’s software - it’s because the limits on distribution affect their usage.

Fair point about the XCode license being more restrictive than I said.

Re:Apple introduces Ask Apple for developers by benrow on Tuesday October 11, 2022 @03:48PM (#33168346)
I was in this position just recently where git suddenly stopped working, due to needing a complete update of xcode tools. Annoying blocker but OK, let's get it done.

But trying to download the xcode tools put me into a loop which wasn't completing for some reason. After several attempts waiting for it to download and install I gave up and created an alias 'git' which points to my brew install of git (in usr/local/bin I think).

This will bite me somehow very soon, I'm sure.

Re:Apple introduces Ask Apple for developers by classified on Tuesday October 11, 2022 @03:28PM (#33168078)
They don't. Use MacPorts. MacPorts git also receives frequent updates. Xcode isn't updated that often.
Re:Apple introduces Ask Apple for developers by dmitriid on Wednesday October 12, 2022 @01:24AM (#33173198)
MacPorts installation guide literally tells you to install XCode Commandline Tools before even using them: https://guide.macports.org/#installing

The question of "why the he'll do I need to download 670 MB of unknown junk before installing tools that are not even Apple's" remains

Re:Apple introduces Ask Apple for developers by prange on Wednesday October 12, 2022 @12:35PM (#33179439)
The question of why this download is such a big deal remains?

Honestly if having to download some tools is your chief complaint about their developer experience, they must be doing magnificently.

Re:Apple introduces Ask Apple for developers by prange on Tuesday October 11, 2022 @04:06PM (#33168572)
There is no such requirement.
Re:Apple introduces Ask Apple for developers by hbbwebw on Tuesday October 11, 2022 @03:03PM (#33167679)
I use the MAS and it's always been fine but honestly it's not that hard to figure out.

https://developer.apple.com/xcode/resources/

The download button gives options website or AppStore.

Re:Apple introduces Ask Apple for developers by skohan on Tuesday October 11, 2022 @02:11PM (#33166821)
Or how about "let me build and run an app on my device without XCode spending 20 minutes 'Preparing Apple Watch for development'"
Re:Apple introduces Ask Apple for developers by george_perez on Tuesday October 11, 2022 @02:12PM (#33166833)
Highly recommend Xcodes.app instead. https://github.com/RobotsAndPencils/XcodesApp
Re:Apple introduces Ask Apple for developers by float4 on Tuesday October 11, 2022 @02:54PM (#33167553)
And if you struggle with Xcode claiming large amounts of disk space:

1. Use DevCleaner[0] to remove old/unnecessary device support files.

2. Remove platforms you don't develop for, e.g.

- rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/Watch*

- rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/AppleTV*

DevCleaner freed up 10G+ for me the first time, the two rm commands above free up ~3G each.

[0] https://github.com/vashpan/xcode-dev-cleaner

Re:Apple introduces Ask Apple for developers by MichaelCollins on Tuesday October 11, 2022 @02:19PM (#33166943)
> "please don't make me re-download Xcode for 3 hours using an account I forgot thee credentials for in your terrible app store with its un-resumable download flow before I can do anything", but they came up with this?

I'm glad I'm not alone in that experience. Why the hell do I need an account to get developer tools in the first place?

Re:Apple introduces Ask Apple for developers by saagarjha on Tuesday October 11, 2022 @02:23PM (#33167017)
Technically you don't, there's an unauthenticated endpoint discovered recently that lets you grab their tools without requiring credentials. But it's annoying to use :(
Re:Apple introduces Ask Apple for developers by jim180 on Tuesday October 11, 2022 @02:32PM (#33167175)
I use this Xcodes[0] just for that. It does not require login these days and I can switch between Xcode versions.

[0] https://github.com/RobotsAndPencils/XcodesApp

Re:Apple introduces Ask Apple for developers by hbbwebw on Tuesday October 11, 2022 @03:09PM (#33167779)
> Why the hell do I need an account to get developer tools in the first place?

Because there is a history of rootkits being embedded into development tools.

https://9to5mac.com/2015/09/20/xcode-ghost-app-store-malware...

Re:Apple introduces Ask Apple for developers by samatman on Tuesday October 11, 2022 @03:18PM (#33167922)
This problem was solved years ago with code signing.

Running unsigned code requires several hoops, even running signed code which isn't Apple Approved requires telling the OS that you know what you're doing, twice.

Running signed code which has been altered, such as a hacked XCode, isn't possible, as far as I know.

If this was the reason developer accounts were required, it no longer is. From Apple's perspective, there's only upside in requiring them, which is the most likely explanation for why they do.

Re:Apple introduces Ask Apple for developers by ajkjk on Tuesday October 11, 2022 @03:12PM (#33167830)
Not developer tools that are downloaded from apple.com.
Re:Apple introduces Ask Apple for developers by MichaelCollins on Tuesday October 11, 2022 @04:46PM (#33169027)
How does that have anything to do with requiring users to have an account to download software signed by Apple from Apple's servers? That doesn't make a lick of sense to me.
Re:Apple introduces Ask Apple for developers by prange on Tuesday October 11, 2022 @02:30PM (#33167140)
I agree about the lack of docs, but it’s not obvious what you are talking about with XCode.

I installed the MAS version years ago and it seems to auto-update just fine for me.

When there is a beta, I install that from developer.apple.com and the two work just fine on the same machine.

Re:Apple introduces Ask Apple for developers by ajkjk on Tuesday October 11, 2022 @02:39PM (#33167301)
As you can see from the other replies here, it's not just me.

XCode presumably works fine if you work daily on it. What I can't fucking stand is having to download it to do something unrelated to it (and, lol, how it decides to be the terrible default editor for every file that's even vaguely related to code and then I have to go update all the file associations).

I especially hate that you have to download a second copy every year for the Mac beta. Especially when you have no desire to ever write Swift or Obj-c code in your life, like most of us.

Re:Apple introduces Ask Apple for developers by prange on Tuesday October 11, 2022 @02:47PM (#33167438)
Why don’t you just leave it installed?
Re:Apple introduces Ask Apple for developers by ajkjk on Tuesday October 11, 2022 @03:11PM (#33167819)
I have to update, I mean reinstall, it every year!
Re:Apple introduces Ask Apple for developers by prange on Tuesday October 11, 2022 @04:14PM (#33168661)
Why do you have to reinstall it every year?
Re:Apple introduces Ask Apple for developers by Alupis on Tuesday October 11, 2022 @03:22PM (#33167989)
Honest question - why do you all put up with this nonsense? Of all the companies you can invest huge amounts of time deving for, Apple seems to be the one that makes life the most difficult.

Even the annual "Developer License" is absurd... and the revenue such licenses generate is trivial.

Some will argue iOS is where the money is at... and that is true... but just think about it. The money is on iOS because you are putting up with Apple's absurdities!

If more of you stopped putting up with this nonsense then either Apple will have to change or another platform will become where the money is at... it's that simple.

Steve Balmer chanting "Developers, Developers, Developers!" comes to mind. Microsoft realized early on it's 3rd party developers would cause Windows to sink or swim, and by most accounts developer platforms and tooling coming out of Redmond are really good. Why put up with this stuff from Apple?

Re:Apple introduces Ask Apple for developers by cromka on Tuesday October 11, 2022 @03:48PM (#33168342)
You answer reminds of that of politicians saying to poor people they need to stop being poor and just be richer.
Re:Apple introduces Ask Apple for developers by scarface74 on Tuesday October 11, 2022 @03:49PM (#33168355)
Because for some reason many people haven’t gotten over their addiction to food and shelter nor have they found a legal means to support their addiction besides trading labor for money.

> Steve Balmer chanting "Developers, Developers, Developers!" comes to mind.

Yes and because of Steve Balmer’s great leadership, MS was able to conquer mobile like they were able to conquer the desktop. I see where you are coming from, why don’t people just develop for Windows phones?

> If more of you stopped putting up with this nonsense then either Apple will have to change or another platform will become where the money is at... it's that simple.

You really think that if every developer who writes iOS apps and posts to HN stopped that anyone would care?

Re:Apple introduces Ask Apple for developers by ajkjk on Tuesday October 11, 2022 @04:14PM (#33168659)
Well it's because Windows, and especially development on Windows, is total fucking garbage. I complain about apply but holy shit at least they don't try to put ads on my start menu.

(And Linux is infuriating for other reasons, like not having the sleek and snappy UX of Mac). Of the three, Apple is my favorite. Still think the company is weirdly incompetent at totally basic things, though. Like all API design. I will never do Apple-specific development for that reason, but I prefer it for general purpose work.

Re:Apple introduces Ask Apple for developers by twoWhlsGud on Tuesday October 11, 2022 @10:32PM (#33172056)
Yep. How expensive would it be to hire some tech writers? There was a time at the company (okay, it was decades ago) when writers (like Scott Knaster) were considered important-ish employees. The company had a heck of a lot less money back then, so what's the excuse for not doing this now?