Table of Contents
Creating a Multiplatform App isn't always as immediate as it sounds. Here is an activity you can start from to learn the development techniques you can use when you first initialize your project to make every Apple device support it. There are different strategies that can also be merged to reach our goal: starting from the Multiplatform Template initialization, passing through individually adding Development Targets having their Platform Scoped Files, to Sharing Common Files dealing with incompatibility conflicts using Conditional Compilation Blocks. Furthermore, if an iOS project has been already developed and has to be brought to macOS, Mac Catalyst can also be an option.
You should have some preliminary knowledge about SwiftUI and Design Principles for all Platforms to be able to go through this activity.
By the end of the activity, you should be acquainted with using the Multiplatform Template, along with setting new Development Targets and managing Shared Common files' incompatibility conflicts using Conditional Compilation Blocks.
Make it Multiplatform App |
---|
-
Clone the repo
git clone https://github.com/developer-academy-unina/Lab-Make-it-Multiplatform
-
Open the
.xcodeproj
file
- Multiplatform Music App (Starter)
The Multiplatform Template can be useful to set your app with a very powerful structure supported by different devices. In this activity you will move your first steps to master its concept.
- Here you will understand how to create an app architecture for all platforms.
- What Platform Scoped Files are and how they're helping build views that can't be shared among all the platforms.
- How to Share Common Files among different platforms taking incompatibility conflicts into account.
- How to use Conditional Compilation Blocks to avoid incompatibility conflicts in Shared Common Files.
- How to programmatically detect the device.
- How to use each device's simulator.
- Which frameworks and iOS exclusive functionalities are not supported by specific devices.
- Multiplatform Music App (Final)
This is the final result of the Multiplatform Music App with all the development targets including the WatchOS App, using Conditional Compilation Blocks for Shared Common Files.
You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new feature? Take a look at GitHub Discussions to see if it's already being discussed. You can help us by submitting an issue on GitHub. Before you create an issue, make sure to search the issue archive -- your issue may have already been addressed!
Please try to create bug reports that are:
- Reproducible. Include steps to reproduce the problem.
- Specific. Include as much detail as possible: which version, what environment, etc.
- Unique. Do not duplicate existing opened issues.
- Scoped to a Single Bug. One bug per report.
Reach out to the maintainer at one of the following places:
- GitHub Discussions
- GitHub issues
- Contact a Mentor for any other help
The original setup of this repository is by Luca Palmese.
For a full list of all authors and contributors, see the contributors page.
This project is licensed under the MIT License.
See LICENSE for more information.