Smaato for Swift iOS: linker command with exit code 1 (use -v to see invocation)

142 views Asked by At

Xcode gets error which you can see below

Error

Smaato framework is Objective-C written framework but I use only Swift in my project. How can I manage this problem (I have only dragged and dropped Smaato framework to Xcode project space and checked that it works with import line)?

2

There are 2 answers

0
Sanjay Bharadwaj On BEST ANSWER

check whether you have added following frameworks: UIKit,Foundation,StoreKit,CoreTelephony,SystemConfiguration,MessageUI,AdSupport,QuartzCore,CoreLocation,CoreImage,CoreFoundation,EventKit

3
Adithya On

Swift project does not directly recognize Objective C files added to the project. There are a couple of steps after you drag and drop the framework to the project.

First, you have to create a Bridging-Header. Create a new Header file. Usually its named "project_name-Bridging-Header.h".

In Build Settings, search for "Objective-C Bridging Header" and set the value to Bridging header file name. You will have to provide the path from your project directory.

Now add import <iSoma/iSoma.h> in the Bridging Header. You should be then able to access the Objective file in Swift file.