Elements lets you create applications for the Apple platform – macOS, iOS, iPadOS, tvOS and watchOS – using the Cocoa frameworks and the Objective-C runtime as well as native Island APIs.
- macOS – Intel and Apple Silicon
- iOS & iPadOS
- Mac Catalyst — build iOS and iPadOS apps so they can run on macOS.
Elements ships with a wide range of templates to help you get started with your projects for all of Apple's operating systems. You can Debug your applications locally on your Mac or device, or remotely (when developing on Windows in or Visual Stuidio).
See below for links to help you get set up for Cocoa development.
Toffee vs. Island
The Elements compiler has two compiler back-ends that support building Cocoa projects.
The Toffee compiler is the current default back-end for Cocoa projects, and it directly and exclusively targets the Objective-C runtime that is the back-bone of Apple's platforms. Binaries compiled with Toffee will be virtually indistinguishable from those created with Apple's Clang compiler for Objective-C.
The Island/Darwin back-end is allows you to mix Objective-C code with Elements' own object model (shared between all the Island-backed platforms) as well as (in the near future) the new Swift object model.
You can read more about the two back-ends, and which one is the right choice for you, in the Toffee vs. Island/Darwin topic. If in doubt, use the default Toffee backend.
Supported SDK Versions
Elements for Cocoa is designed to be able to work with any version of Apple's SDKs. The product ships with support for the SDKs that are officially released at the time an Elements release RTMs, but pending any drastic and unexpected changes to the tool chain for Apple's SDKs, you can import newer or beta SDKs using the FXGen tool that is included in the product, even if we have not gotten around to supporting them officially yet.
We usually do try to support new SDK versions, including Betas, within days, and when we do, Elements will download them for you automatically, even without you having to install a new version. You can also manually download SDKs here.
You can also download older SDK versions that shipped with the product, from the URL above, in case you need to work directly with older Xcode versions. However, we generally do recommend using the latest shipping version of the SDKs, and leverage Deployment Targets in order to keep your apps running on older OS versions.
Getting Set Up
In addition to Elements itself, you also need a Mac with Xcode installed. Please follow the links below top learn how to get set up, if you're not familiar with the Apple tool chain:
- Setting up for Cocoa Development with Fire on Mac
- Setting up for Cocoa Development with Water on Windows
- Setting up for Cocoa Development with Visual Studio on Windows
If you work in Water of Visual Studio on Windows, some build phases will run remotely over the network, on a Mac:
- Introduction to the Frameworks
- Working with XIBs and Storyboards for UI Design
- Automatic Reference Counting (ARC) and ARC vs GC
- Storage Modifiers
- Debugging Cocoa Projects
- Deploying and Shipping Cocoa Projects
These external links point to great resources on Cocoa development (not specific to, but applicable to Elements) across the web: