You really don’t. Generally macOS tends to extend software support (i.e. the latest release) to computers that are around 6-7 years old.
> My main program was broken and I had to fix it several times during the past two decades, every time because of changes by Apple and not a single time because of a programming bug.
Just curious: what were the problems you faced?
> use XCode or die, get a developer account or forget it
You can write Mac apps without either of these. Without Xcode the job is hard but not impossible, and you can distribute unsigned binaries and they will run on macOS.
> You really don’t.
That's not my experience, it depends on how lucky you get. I still have a Core Duo iMac and that one didn't last longer than 5 years.
Anyway, it would be easier for me if Apple made compelling hardware, but none of the current offers appeal to me in any way. They don't even sell iMacs with mate screens, and let's not speak about the keyboards or lack of extensibility.
I purchased an Amd 1800X machine with 32GB RAM and Geoforce 1080 together with a 42 inch monitor for peanuts. Why would I spend the same amount of money on an iMac with 8GB RAM, slower processor, and smaller, but very glary display?
Surely Apple has their customer base and appealing products for many people. I'm just not one of them any longer. (I used to have an Aluminum Powerbook Pro G4 - that was some quality. But now? They even come with power cables that are too short!)
>Just curious: what were the problems you faced?
Deprecated Carbon dependencies, deprecated GUI calls in Cocoa, problems with high DPI displays, problems with Gatekeeper and signing, problems with 32bit->64bit transition. Basically, whenever a new MacOS version came out, I wasn't sure whether my app would continue running. Sometimes it did, sometimes it didn't, sometimes the GUI was messed up.
To be fair, the real problem was more on the Hackintosh side: Every problem could eventually be fixed with a simple recompile. Unfortunately, every time I had to set up a new virtual machine with the new OS, make a new Hackintosh installation and try to get a new OS image, and as you might imagine these come with different hacks and different obscure instructions every time, especially when you run them in virtual machines.
>you can distribute unsigned binaries
That's what I do right now, but users will pester you with bug reports and you have to explain to them every time again how to manually open the application and allow Gatekeeper to run it. That's especially annoying if you believe, like I do, that Gatekeeper is fairly insecure and can be broken or circumvented by any skilled hacker anyway (as past bug reports have illustrated).
Given what you went through I'm glad I didn't try the hackintosh approach. I suspect that >90% of the people who even try the Hackintosh approach are developers who don't want to buy another computer just to target one platform.
Personally I think eventually it will be possible to develop iOS apps from non iOS computers, but maybe not anytime soon. Once Apple thinks the moat is degraded enough, I guess.
It's much more flexible to do it this way than using the latest version of Xcode. I can compile a 32-bit app that runs on iOS 6, or I can compile a 64-bit app using the iOS 7 sdk.
I also prefer compiling OS X apps on my Linux box, because I can use whichever version of clang I want, but compile it so that it will run on Snow Leopard. The dev environment for Snow Leopard is missing a lot of the newer features of Objective-C, so I find it easier to do this, than to use the latest version of macOS and Xcode.
I only use Objective-C, I haven't tried cross compiling Swift, simply because I do not like the language.
- 32bit linux, still? Is there any reason you haven't gone 64, or have you just been on some rock solid distro that never felt like it needed the upgrade?
- Cydia Impactor[0] requires a jailbroken iPhone, does it not? What version of iOS are you running on the actual device? I understand that you're compiling with iOS6/7 SDKs but I wonder how long they'll be supported, and how fluently they work on iOS12 for example.
- Are there any limitations on versions for the Cocoa SDK that you use for building OSX apps? Do you worry at all about EoLing of support or anything like that?
> I only use Objective-C, I haven't tried cross compiling Swift, simply because I do not like the language.
Could you explain this and why? While I'm not necessarily a Swift fan because I don't think it does particularly well in comparison with some of the recent languages that I really enjoy using, I found Objective-C to be pretty jarring. Clearly you know a thing or two about the toolchain and Objective C, I'd love to know why you prefer it to Swift or why you think Swift is not worth switching over to just yet (if at all).
This is kind of random but maybe the thought will be interesting -- I've often wondered why it's not possible to actually just build and run XCode (or at least the lower level toolchain) on an apple device like a phone. Has anyone heard of anything in this area?
Cydia Impactor does not require a jailbroken iPhone, it is generally used to initiate the process of jailbreaking, by sideloading an app onto the device.
I have an SE running iOS 12, an iPad Mini running iOS 10, and a 4S running iOS 6. iOS 10 is the last version to support 32bit apps. If I compile with the iOS 7 SDK, the app will still run with later versions of iOS, it's only if you need the header files for some of the API's that are only in the later versions of iOS that you should use a more recent SDK to make your life easier, but you can still send the messages via Objective-C without the actual header files (because of introspection the API is available at runtime).
I'm not sure what you mean by limitations for the Cocoa SDK and OSX apps. I do this for my own personal code, it's not something I distribute so I don't worry about End of Life
It's just that I started with C and Objective-C, and it's a lot of work to bridge between Swift and C, so I'd rather stick to Objective-C. Also there is no 32bit Swift runtime (that I am aware of). I just like being able to run my code on older 32bit processors. Objective-C is just so dynamic and the fact that it's just a thin layer on C is very appealing to me. I'm more fond of the Objective-C runtime itself than I am of Foundation.
I have a jailbroken 4S with iOS 6, and you can install clang and all the tools you need to compile an app on the device itself. No need for Xcode at all unless you need storyboard or to submit an app to the App Store. Most of the toolchain can be downloaded from Cydia, and you can read the instruction for Theos to get an idea of how it works, but you don't need to use Theos, you can compile it with clang yourself (on the device).
Also, 64-bit Wine is a thing now. I think the version on SlackBuilds.org is still 32-bit only, but I don't recall any issues when I downloaded and compiled/installed the upstream version myself.
But believe it or not, I think it's easier to do it manually than to use Xcode because it gives you more flexibility. When things are hidden from you, it makes things seem more complicated than they actually are. Most of the functionality is built into clang.
Believe it or not, I was 100% going to guess that you were running Slackware.
> Cydia Impactor does not require a jailbroken iPhone, it is generally used to initiate the process of jailbreaking, by sideloading an app onto the device.
Thanks for clearing that up. So as long as I can find a way to build the IPA you're good to go.
> I have an SE running iOS 12, an iPad Mini running iOS 10, and a 4S running iOS 6. iOS 10 is the last version to support 32bit apps. If I compile with the iOS 7 SDK, the app will still run with later versions of iOS, it's only if you need the header files for some of the API's that are only in the later versions of iOS that you should use a more recent SDK to make your life easier, but you can still send the messages via Objective-C without the actual header files (because of introspection the API is available at runtime).
> I have an SE running iOS 12, an iPad Mini running iOS 10, and a 4S running iOS 6. iOS 10 is the last version to support 32bit apps. If I compile with the iOS 7 SDK, the app will still run with later versions of iOS, it's only if you need the header files for some of the API's that are only in the later versions of iOS that you should use a more recent SDK to make your life easier, but you can still send the messages via Objective-C without the actual header files (because of introspection the API is available at runtime).
Thanks for the detailed information, it's great to see that the setup is working with such recent OS versions and on top of it all Objective C has afforded you a little bit of leeway with the magic of message passing.
> I'm not sure what you mean by limitations for the Cocoa SDK and OSX apps. I do this for my own personal code, it's not something I distribute so I don't worry about End of Life
Got it -- sorry I was assuming that it was something you distributed -- given the fact that you were running a non-mac system.
> It's just that I started with C and Objective-C, and it's a lot of work to bridge between Swift and C, so I'd rather stick to Objective-C. Also there is no 32bit Swift runtime (that I am aware of). I just like being able to run my code on older 32bit processors. Objective-C is just so dynamic and the fact that it's just a thin layer on C is very appealing to me. I'm more fond of the Objective-C runtime itself than I am of Foundation.
> I have a jailbroken 4S with iOS 6, and you can install clang and all the tools you need to compile an app on the device itself. No need for Xcode at all unless you need storyboard or to submit an app to the App Store. Most of the toolchain can be downloaded from Cydia, and you can read the instruction for Theos to get an idea of how it works, but you don't need to use Theos, you can compile it with clang yourself (on the device).
Thanks so much for sharing -- this is something I would love to look into some day. Jailbreaks have mostly kept up and since iPhones often have best-in-class hardware it seemed like a natural choice
In the end, you have to have something running OSX -- despite the fact that fact that frameworks like Flutter draw every pixel on the screen, you still usually need to (well should) test it on a real device.
For a more or less hobby developer like me, the running costs of developing for Mac are too high if you take into account that you have to purchase new hardware every 3 to 5 years. I've tried the Hackintosh approach, but it was overall too unstable and you never know whether some user might not send a bug report for the pre-release of some future OS version. My main program was broken and I had to fix it several times during the past two decades, every time because of changes by Apple and not a single time because of a programming bug.
Apple has a strong tendency of breaking their own APIs. That in combination with obvious attempts to lure them into their developer infrastructure and a strong deprecation of non-standard tool chains and languages (use XCode or die, get a developer account or forget it) makes developing for Macs a major pain in the ass.
No more iOS or macOS applications from me in the future. I might offer web apps for iPhone users, though.