Best way to exchange iphone and mac code between projects

I understand that the presentation / controller elements will be different between Mac and IPhone applications, but the model code may be similar / identical. So, what is the best way to organize project (s) so that the model code is / can be shared?

  • Copy / paste - just duplicate it and manually sync it
  • You have 2 xcode projects in one working arena - one for Mac and one for IPhone and common code.
  • Shared library - maybe you cannot do this (or you can)

Thanks for any advice.

+3
source share
3 answers

. , , , Mac OS X. iPhone, , . , . , (, < Myframework/MyFramework.h > ), , "$ SDK_ROOT/usr/local/include/MyFramework" , /usr/local/include . SDK_ROOT.

, , . , , №2. , , , iPhone "", ( "MyFramework" ) . , , . Externals (, , ). iPhone, , , root.

+6

, . , , iPhone, , Mac.

2.

+1

JavaScript, CSS HTML. WebView UIWebView Mac iPhone . , , WebView, Objective-C.

QuickConnectiPhone, https://sourceforge.net/projects/quickconnect/, QuickConnectMac QuickConnectiPhone Xcode.

This way you can quickly create an application in one environment and then transfer the view to another. In fact, the structure of QuickConnect is very modular.

If you do not want to develop in JavaScript, then the same modular framework is installed on the Objective-C module on the template.

This should make it much easier for you to do what you are trying to do.

-2
source

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


All Articles