Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VersionNumber and VersionString in umbrella header

Tags:

ios

swift

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.

like image 640
Laura Calinoiu Avatar asked Aug 09 '17 05:08

Laura Calinoiu


1 Answers

You can replace

#import <UIKit/UIKit.h>

by

#import <Foundation/Foundation.h>
like image 168
Anthony Avatar answered Nov 11 '22 18:11

Anthony