• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
preprocessors to check for header inclusions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

preprocessors to check for header inclusions


  • Subject: preprocessors to check for header inclusions
  • From: Balaji M <email@hidden>
  • Date: Thu, 08 Dec 2016 16:55:08 +0530

Hi,

I have 2 frameworks written in objective-c with similar public headers like
below:

1) A.framework:

- x.h
- y.h


2) B.framework:

- x.h
- y.h
- z.h (extra header exposed only in this fw)


I embed only one of these frameworks in my application at any given time.
But I need to be changing them for bundle size restrictions.
When my application was in obj-c, I use to conditionally check for headers
and call the APIs like below:

#if defined(__has_include)

#if __has_include(<A/x.h>)

#import <A/x.h>

#else

#import <B/x.h>

#endif

#endif

Similar way is followed for calling APIs in particular headers like z.h in
B.framework.
But now I ported my application to Swift and it does not seem to recognize
above symbols. Is there any alternative way to do this in swift? Thanks in
advance for any help.

--
Balaji M.
+91 8088640610
_______________________________________________

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


  • Prev by Date: Re: NSOpenPanel stopped working in some apps on Sierra
  • Next by Date: How to know if an NSFont can draw an NSString?
  • Previous by thread: Re: NSOpenPanel stopped working in some apps on Sierra
  • Next by thread: How to know if an NSFont can draw an NSString?
  • Index(es):
    • Date
    • Thread