Chief Madog
Chief Madog

Reputation: 1507

Error while importing a file from .framework using a bridge

i'm trying to import a native obj C library to my project and use it using a bridge.

1. The library is linked in the "build phases> link binary with library" and i see it in the list

2. the bridge is configured in the "Build Settings > Swift Complier - General > Objective - c Bridging Header"

3. The library name is AWSDK Its a private cosutme library It has a class in the headers called AWSDKService i want to import

4. i write

#import <AWSDK/AWSDKService>

and when i build the project i get an error

'AWSDK/AWSDKService' file not found

What am i doing wrong ?

Upvotes: 0

Views: 108

Answers (1)

Cy-4AH
Cy-4AH

Reputation: 4615

Bridging header is used in mixed project where some source code is written on Objective-C, some on Swift. You use bridging header to make code written on Objective-C available for Swift. But you have different situation. You just have project written on Swift. In swift you just import frameworks with common rule. It doesn't matter, written it on swift of objective-c.

In your case it will be just import AWSDK

Just don't forget to #import 'AWSDKService' in framework's umbrella header.

Upvotes: 1

Related Questions