6

I am adding a new framework to a Swift + Objective-C project. So, into my framework, I have an umbrella header: xFramework.h

#import <UIKit/UIKit.h>

//! Project version number for xFramework.
FOUNDATION_EXPORT double xFrameworkVersionNumber;

//! Project version string for xFramework.
FOUNDATION_EXPORT const unsigned char xFrameworkVersionString[];

I don't want to depend upon UIKit in my framework. But, if I remove the import, FOUNDATION_EXPORT will not be found.

  1. How much from this autogenerated file do I really need?
  2. Are the xFrameworkVersionNumber and xFrameworkVersionString[] needed to be used in a Swift Framework?

I've understood from this question that FOUNDATION_EXPORT is a kind of public.

Thank you.

Frederik Winkelsdorf
  • 4,383
  • 1
  • 34
  • 42
Laura Calinoiu
  • 704
  • 1
  • 8
  • 24

1 Answers1

4

You can replace

#import <UIKit/UIKit.h>

by

#import <Foundation/Foundation.h>
Anthony
  • 1,155
  • 10
  • 17