0

I am developing an framework project which is initailly developed in objective-c and for new changes we are started making in swift.

I have just created an header which have only enum declaration in objective-c. I am able to access it in swift file from framework target.

But when I try to compile the unit test target, I am getting a wired error saying

"Cannot find type 'CertificateType' in scope"

.

Any Suggestion on this to fix the issue?

#ifndef CertificateType_h
#define CertificateType_h

typedef NS_ENUM(NSInteger, CertificateType) {
    
    CertificatePaid = 0,
    CertificateFree = 1,
    CertificateTrial = 2,
    
    CertificateUnknown = 15

};

#endif /* CertificateType_h */

Since it is already available SDK, I am unable to convert this into swift.

Srinivas
  • 315
  • 3
  • 18

1 Answers1

0

Have you made a bridging header and included that header file in it?

How do I call Objective-C code from Swift?

Yogurt
  • 2,913
  • 2
  • 32
  • 63
  • No @Biclops, It is an framework/sdk project. So we can't use bridging file, instead we supposed to use umbrella header file. but in that case, it will be consider as public class. it should be private. – Srinivas Nov 08 '21 at 14:58
  • So the header is in the umbrella.h and you see the header selected as public in the inspector panel? You should update your question to show that this is the case. – Yogurt Nov 08 '21 at 17:43