How can I use the iOS app and OS X app in one project?

I saw this question about whether it is possible to make an iOS application and a Mac OS X application in the same project while I tried to ask about it. I do not ask if this is possible. I had to uninstall and reinstall Xcode (because I wanted to upgrade, and my MacBook Air SSD was actually small), and I came across this screenshot.

Screenshot

In addition to the absolutely beautiful 3D landscapes on the right side, I looked at the structure of the project on the left. They have OS X files in one group and iOS files in another.

How could I organize my project? As in how do I start creating a project where I can just have OS X and iOS files, are these just two different groups of files in one project and work with each application almost synchronously?

+4
3

. Xcode . , , iOS OSX .

- Source
    - Common
        - File1.m       Target: iOS and OSX
        ...
    - iOS
        - File2.m       Target: iOS
        ...
    - OSX
        - File3.m       Target: OSX
        ...
+3

, , , .

OSX, , , iOS.

enter image description here

iOS. , OSX, iOS, .

enter image description here

, iOS OSX. !

enter image description here

+2

You can add a Mac OS X target to the same project. ~ Select the file that should be added to the iOS target and which should be added to mac os x target

0
source

Source: https://habr.com/ru/post/1617701/


All Articles