Same code base for iPhone/Desktop app

前端 未结 2 734
迷失自我
迷失自我 2020-12-28 22:24

I have an iPhone/iPad app that I want to port to MacOSX. Most of my objective C classes should work just fine as long as they do not contain UIKit stuff. Obviously the inter

2条回答
  •  礼貌的吻别
    2020-12-28 23:15

    You can also simply add the files from one project as references to the other one. Simply drag them from the source project (where the actual files reside) into the other project. The dialog will ask you whether you want to copy the files. Choose no. This will make the second project point to the files in the first project. Edits go into both projects.

    Be careful with this, though, as there are a few differences between APIs in iOS and MacOS, even if they are called the same.

提交回复
热议问题