Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I program for Macs without owning one?

I'm programming a game using C++ and OpenGL/SDL, using Visual Studio as my IDE. I don't own a Mac, nor am I even vaguely familiar with the platform. But I want to release to Mac users all the same.

I have three questions. Can I write and compile Mac programs on a PC? If I can, are there any possible pitfalls to doing so? And finally, can VS2010 compile for Mac, or will I need to use another compiler?

like image 449
Anne Quinn Avatar asked Oct 18 '12 03:10

Anne Quinn


People also ask

Can I code for iOS without a Mac?

You cannot develop iOS apps without a Mac computer, but you can set up CI/CD to handle building and publishing!

Do I need a Mac to program?

But, no really, you do not need a MacBook to be a developer, and you certainly don't need a top-of-the line recent one.

Can a standard user install programs Mac?

Standard account can install software by default, so it's not a problem. You can set up a Standard user as usual. Standard users can install apps and change their own settings, but can't add other users or change other users' settings.

Does Mac have free software?

From useful utilities to handy archivers and transcoders, here are 35 free yet powerful macOS apps you can download today. There's something of a misconception when it comes to the Mac: that Mac apps cost more, just like the computer itself.

Is it possible to develop iOS apps without owning a Mac?

But the question states specifically "without owning a mac?"… It is possible to develop iOS (and Android at the same time) application using React Native + Expo without owning a mac. You will also be able to run your iOS application within iOS Expo app while developing it.

Do I need a Mac to develop for the Mac?

Unless you couldn’t care less about whether your app works or not, you need a Mac to develop for the Mac. Without a Mac, the only thing you would be doing is writing code in Objective C. You’d get no testing, debugging, integration tools, or anything else. Just a load of text files. No compiling, either. That’s kind of an issue with apps.

Should I buy a Mac or a Windows device?

When it comes to buying a Mac, you will have to go to Apple store. This shows that Windows can be bought from any brand except Apple. PlayStation or the Xbox. If you want to play games on your PC, then it is recommended that you buy a Windows device. Windows devices have proved to be better in providing gaming experience.

Is it possible to run iOS apps on a Windows computer?

It's mainly about programming iOS apps, which is definitely on-topic. On Windows, you can use Mac on a virtual machine (this probably also works on Linux but I haven't tested). A virtual machine is basically a program that you run on your computer that allows you to run one OS in a window inside another one.


2 Answers

If you're using SDL then the answer is "you can get kind of close to your desire, up to the last step, sort of". Being able to write a game-like program in a single codebase, and then take that codebase to various machines and compile it and have it work is exactly what the Simple DirectMedia Library was designed to do! It wouldn't be very popular if it didn't at least make this a reasonable target.

That won't mean you'll be able to push a button and get a Macintosh or Linux binary package out of Visual Studio. But you could always find friends and ask them to try the compilation for you on the codebase. So long as you've been careful to only call functions out of the standard C++ library AND stay inside the box that SDL gives you, it should compile fine...in theory.

Update 2018: - If you want to compile on Mac and don't have one, Travis-CI now has virtualized OS X, so you can run clang and actually have it upload the resulting binaries somewhere. You probably don't want to wait for a full build over the network each time you make a change...but once you get a cross-platform codebase building on OS X, continuous integration can make sure you keep it that way.

It can be harder in C++ than it is in other languages to make sure you're staying within a "portability sandbox" (especially if you're a beginner). And it can be harder if you're following tutorials targeting Microsoft tools especially, as they have few qualms about advising you to make Windows-only calls in their documentation. So the odds of being able to hand the "fully debugged" code to a friend, have it compile and work on a new platform the first time will be low.

You'll need a testing period, certainly. And you probably shouldn't wait until the last minute to have someone else make sure the basics are working by compiling it in XCode or whatever. You can lower the risk of writing nonportable code by using the GCC compiler instead, which will be more likely to complain if you start bringing in dependencies that are not actually cross platform.

It also may be possible to run a "Hackintosh" virtual machine if you like living on the edge. You can certainly make a Linux VM and try building under that, and if it works that will raise the confidence that a Mac build will work too. Won't guarantee it though.

like image 70
HostileFork says dont trust SE Avatar answered Sep 21 '22 22:09

HostileFork says dont trust SE


Firstly you can't cross-compile for a Mac. You will need their "gcc". The Mac Universal binary can be created (theoretically) on a PC, but practically its not possible yet.

VS2010 cannot compile for Mac, although if you're going to use a different language perhaps then you can code for Macs(such as in Python).

Any cross platform languages will help. Python, Java, Ruby, Perl

like image 44
Aniket Inge Avatar answered Sep 18 '22 22:09

Aniket Inge