Re: Language options: Objective-C, Swift, C or C++?
Re: Language options: Objective-C, Swift, C or C++?
- Subject: Re: Language options: Objective-C, Swift, C or C++?
- From: Kevin Meaney <email@hidden>
- Date: Tue, 16 Jun 2015 09:36:06 +0100
> The other major problem I ran into — unrelated, but I’m mentioning it in case someone wants to jump in and tell me the easy way — is that I’m trying to use frameworks in order to break the project into modules so that I can use the access controls (private and internal) to keep implementation details of related groups of files out of the grasp of unrelated code. This is in a cross-platform (OS X, iOS) project with shared code. Since the different platforms need different frameworks, and the frameworks/modules have to have different names to tell them apart, I can’t share source code files across platforms because of the “import” statements. Maybe I’m missing something obvious here.
>
I have a similar related problem.
My cross platform project builds both iOS and OS X Frameworks. I run the same test code on the iOS and OS X frameworks. In my swift test code I use #if os(iOS) to differentiate.
#if os(iOS)
import UIKit
import MovingImagesiOS
import Photos
#endif
I also have a small number of cases where I use.
#if os(OSX)
and I have a couple of tests that don’t work on the iOS simulator and I use the
#if !(os(iOS) && arch(x86_64))
to exclude.
Kevin
>> And now I know what Kyle looks like too!
>
> What’s the video?
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Roland King <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Quincey Morris <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Graham Cox <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Michael David Crawford <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Carl Hoefs <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: "Gary L. Wade" <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Quincey Morris <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Carl Hoefs <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Rick Mann <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Quincey Morris <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Roland King <email@hidden>) |
| >Re: Language options: Objective-C, Swift, C or C++? (From: Quincey Morris <email@hidden>) |