Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I publish an app for both iOS and macOS?

I’m working on an iPhone/iPad app exclusively with Objective-C files.

Is there a way to build a Mac app without having to duplicate many of them?

Is there a way I can make custom button files (.h, .m) that work for both iOS and macOS?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You will need to add it to the platforms

enter image description here

enter image description here

and exclude the codes which wont work on MacOS with :

#if !targetEnvironment(macCatalyst)
// Code to exclude from Mac.
#endif

then you need to optimize your app for MacOs , more details on :
https://developer.apple.com/documentation/uikit/mac_catalyst/optimizing_your_ipad_app_for_mac

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading