Rich-text Reply

Getting error with Optimizely X implementation in iOS Swift.

bpmaurya3 02-21-17

Getting error with Optimizely X implementation in iOS Swift.

[ Edited ]

I installed SDK through Pod. After that I am trying to execute forllowing code as refered to your doc:

 

let optimizelyManager = OPTLYManager.init {(builder) in builder!.projectId = "project_id" } optimizelyManager?.initializeWithCallback({ (error, client) in //Activate code (step #7) //Track code (step #8) })

 

But here , I am getting error with the above line of code that  "Unresolved Identifier is OPTLYManager".

 

Please reply with positive output.

 

Note : I follwed your installation process carefully.

Screen Shot 2017-02-21 at 6.42.51 PM.png
tedroddy 02-24-17
 

Re: Getting error with Optimizely X implementation in iOS Swift.

[ Edited ]

bpmaurya3,

I've seen this issue in Xcode when a bridging header exists in addition to the headers our Pod provides. Can you check and make sure there is not a bridging header file for Optimizely? If there is one in your project, delete it and go to Build Settings and remove it from there as well.

Are you seeing this issue in a blank project? Try creating a new single view app in Xcode, installing with cocoapods, and see if you have this issue in the blank project. If you do, could you post the Xcode project here so I can take a look?

Pod installing and then importing OptimizelySDKiOS should be all you need to have OPTLYManager be defined, but I have seen this error when there is a bridging header in addition to install with cocoapods.

Best,
Ted
Optimizely
SergioM-SB 06-28-17
 

Re: Getting error with Optimizely X implementation in iOS Swift.

[ Edited ]

Hello guys,

 

I'am experiencing this issue and can't seem to get it to work.

I have downloaded the SDK (not using cocoapods), added the library, etc.

I works no problems in obj-C, but when I attempt to use any of the SDK classes in Swift it cant find them. I import the SDK and then I get a segmentation error Smiley Frustrated.

Any suggestions are highly appreciated.

 

Thanks