简体   繁体   中英

Swift import existing iOS files into OS X target in single project

How to access some classes from iOS project and use it inside OS X target in the same project? Classes are not CocoaTouch specific (NSManagedObjects for instance)

In the project settings view, select the your OS X target and go to the Build Phases tab. Then, simply drag the classes you want to access to the Compiler Sources section. This lets Xcode know that you want these classes to be included when you compile for OS X.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM