Gagan_iOS
Gagan_iOS

Reputation: 4060

Add Multiple Target Header in IOS Objective-C code

I am working on a project written in Objective-C. Current app has three target based on environment(Dev, Prelive and Live).

Now I have to add new functionality which must be written in Swift language. I follow this link and app complied successfully in Dev target (i.e. Environment) .

In objective-C files I have added header as below

#import "Dev-Swift.h"

and I have imported above 'Dev-Swift.h' in multiple files.

Now issue is that I have three target and suppose If I have to run on any other target(Say Prelive) then I have to made changes with header again in multiple files & it will be

import "Prelive-Swift.h"

which will be again a tough task & may leads error while changing target.

Can any one suggest how to tackle this issue. I do not want change header every time when I change target.

Let me know if I have clarify question more.

Upvotes: 0

Views: 198

Answers (1)

NB Fouda
NB Fouda

Reputation: 1393

did you try to put the same name for the three environment. in this case you don't need to change the file name each time like this : enter image description here

Upvotes: 1

Related Questions