I'm working on a game that I'd like to ultimately be available for Mac OS X and iOS. What's the best way to do this? Should I (1) focus on one OS first and get a polished version 1.0, then port to the other OS, or (2) should I try to develop for both simultaneously from the start?
If (1), which OS should I target first, i.e. which porting direction is the easiest?
If (2), do I need a separate project in XCode for each OS? If so, how do I maintain just one copy of the platform agnostic code that I share between both projects?
Mostly Objective-C and Swift programming languages are used as the best programming language for iOS app development to build applications for devices running iOS, iPadOS, tvOS, macOS, watchOS. They are the main languages for writing iOS applications.
Setup your MAC for ios app developmentiOS can only be run on Apple's own devices, including the iPhone and iPad. We can run Mac on window machines using VMWare or Hackintosh, but these are not recommended for iOS coding purposes.
Developer RequirementsTo develop iOS apps, you need a Mac computer running the latest version of Xcode. Xcode is Apple's IDE (Integrated Development Environment) for both Mac and iOS apps. Xcode is the graphical interface you'll use to write iOS apps.
You'll need to download Xcode from the Mac App Store or from the Apple developer site. Once you have Xcode installed, you can begin writing code. In order to test and debug your app, you'll need a device running iOS or macOS.
I usually code in parallel, sometimes starting on Mac, sometimes on iOS. Most of the core functions (i.e. non-GUI) is virtually the same on both platforms, but sometimes some of the functionality is missing on one part. Then I try to start off with the poorer platform so that the code will run on both.
Working in parallel gives another benefit: you need to think about good abstraction or you will get annoyed of duplicated code rather quickly. Multiple targets really help with good structure.
As for the multiple targets - yes, in theory this works in Xcode. It was a real pain (with losing references over and over) as soon as I put my "core code" in static libs and keeping everything updating automatically.
My setup is as follows:
MainWorkspace
CoreFunctionsMacLibProject
CoreFunctionsIOSLibProject
TheApplicationMacProject
TheApplicationIOSProject
The shared code for the core part is in a shared folder, updates are easy given everything is in the same workspace. It would work easily without the separate libraries, I just happen to use them in different projects/workspaces as well.
So far everything goes smooth. Talking about 2-4 libs and several app projects. Just my experience, though. Workspaces make this approach pretty flexible, as you might put a project in more than one workspace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With