0

I just want to try Swift 3.0 in one of my projects and It is working fine in Swift 2.Xcode Version 8.3.1

Everything I fixed but getting error in FXForm library.Below is the error I am getting at the time of project compilation:

 "_OBJC_CLASS_$__TtCC13Test11AppDelegate15FXFormVariables", referenced from: objc-class-ref in FXForms.o error: linker command failed with exit code 1 (use -v to see invocation) 

I had passed the logged in user validation from App delegate like below:

 //objective C class @objc class loggedinUser : NSObject { class func isUserLoggedIn() -> Bool { return userLoggedin! } } 

and used it in Objective-C class of FXForm like below:

if([loggedinUser isUserLoggedIn] == true){ // default to bottom return CGPointMake(self.bounds.size.width/2, (self.bounds.size.height - (toast.frame.size.height / 2)) - style.verticalPadding - 120); } 

Please help in fixing the above error and thanks in advance.

2
  • Does the error say "Undefined symbols for architecture "?? or what is the error line above the "_OBJC_CLASS_$__TtCC13Test11AppDelegate15FXFormVariables" line? Commented Apr 14, 2017 at 8:10
  • Hello @MichaelDautermann. Undefined symbols for architecture i386: this is the error line. I want to run project in multiple devices and this error changes when I change the device. Please help. Commented Apr 14, 2017 at 8:19

1 Answer 1

1

This isn't a Swift 2 to Swift 3 refactoring problem.

It's a problem where you need to make sure the FXForms .m file is being compiled in your project. Do you include the .h & .m files in your project?

Go to the file inspector (the list of files in the left side) of your Xcode window, click on the FXForms.m file and make sure "Target Membership" is checked, like in the right red circle of this screenshot: Make sure target membership is checked

Sign up to request clarification or add additional context in comments.

3 Comments

which file contains FXFormVariables ? It looks like it is missing from FXForms.o, so if you can find the file that defines FXFormVariables, make sure that also has its target membership checked to ON.
Error I am getting when compiled: Undefined symbols for architecture i386 .
I think it is related with Build Setting -> Architecture settings.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.