FXForms
FXForms copied to clipboard
Linker Error when using FXFormFieldType
I'm using Swift and so far the framework has performed fantastically.
Unfortunately, I'm trying to have an NSDate field use the DateTime type, so far I'm using the code:
func startsField() -> NSDictionary {
return [FXFormFieldType: FXFormFieldTypeDateTime]
}
I appreciate that I may not be returning the values correctly, but I'm getting the following Linker error:
Undefined symbols for architecture arm64: "_FXFormFieldType", referenced from: __TFC7Network26AddEventFormViewController11startsFieldfS0_FT_CSo12NSDictionary in AddEventFormViewController.o
Given iOS has supported 64-bit for a while, it may be a good idea to add 64-bit support to FXForms.
Worth noting however, is that if I simply use the strings themselves or redefine the constants in my own project then it all works (obviously), just a bit annoying that the linker falls over for some reason!
Despite the reference to arm64 in the error, FXForms works fine on arm64 when using Objective-C, so I think it's unlikely that the architecture has anything to do with it. Hopefully just a beta bug in the Swift compiler, but I'll look into it.
As a side-note, it's nice to see FXForms still works well in Swift - I wasn't sure if the automatic property introspection would function correctly, since Swift doesn't have the same kind of runtime support - but I guess as long as you are subclassing NSObject for your form objects then declared properties are still inspectable?
I believe that's the case yeah, I think Apple realised that for swift to be even remotely successful it had to have complete interoperability with all things Objective-C.
Yeah, it is a weird one, some people seem to think it might be a cocoa pods issue where some build settings don't match quite right.
I'm targeting 7.1 and using the standard (arm64, armv7) configuration on the pods and main projects and their targets.
If you can get it working that would be amazing!
Try importing the FXForms.h/m files into your project directly. They don't have any dependencies or unusual compiler requirements.
:+1: I will attempt that when I'm next at the machine, that may just work, thanks!
Does this issue still take place? If not it may be closed.