I'm using iOS Universal framework template.
I created framework and added them as sub project to another project. And added framework binaries to the project.
in my framework there is some constants
const float kToolbarHeight = 45;
And when i'm trying to Build my Project and included Framework for iphone simulator (i386), there are linker errors:
ld: 14 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
but when i build it for device - there is not any linker errors.
I'm tried to exclude subProject (my framework) from Project, and and keep only binaries, but there is not any effect.
I'm trying to change architectures in targets to the i386
, and to the $(VALID_ARCHS)
, as
described in that issue, but there is not any effect.
How can I build framework for iOS simulator, what settings of target should I use?
Update: The problem was resolved when I defined my constants as extern in header file.
// MyView.h
extern const float kToolbarHeight;
// MyView.m
const float kToolbarHeight = 45;
But why? What difference in simulator and arm builds?