Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Cocoapods Link Error: __FBTweakIdentifier (with custom build configuration) #4
Trying to get set up with Tweaks, added the pod to my podfile:
When I went to build I got a Linker Error:
I see the
Any suggestions on what I might have missed or what the problem might be?
I have a similar issue, but I can run in simulator and on debugging device. When I want to archive for a testflight build (to send to customer for testing), then the Linker Error happens:
I'm using cocoapods also and FB_WEAK_ENABLED is set to 1 in the Preprocessor Macros. One thing I found is that ARC is turned off in the build settings for the Pods-Tweaks target, but turning it on, didn't help.
@grpaul as @alloy explained in CocoaPods/CocoaPods#1934 the app project and the Pods project macros have to be in line. This is why sometimes when using custom build configurations Tweaks doesn't link, the macros used by the Pods project to compile Tweaks are different from the ones used by the app project.
I updated my example repo with a Podfile that compiles.
Wrapping it up:
In case you are not checking in your
post_install do |installer_representation| installer_representation.project.targets.each do |target| if target.name == "Pods-TweaksBuildConfigurationsDemo-Tweaks" target.build_configurations.each do |config| if config.name == 'QA' config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'FB_TWEAK_ENABLED=1'] end end end end end
What it does is adding
Maybe we can update the README?
On Wednesday, April 16, 2014, Grant Paul email@example.com wrote:
"Be a yardstick of quality. Some people aren't used to an environment
It looks like with Cocoapods v0.38.2 hook should look like
post_install do |installer_representation| installer_representation.pods_project.targets.each do |target| if target.name == "Tweaks" target.build_configurations.each do |config| config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'FB_TWEAK_ENABLED=1'] end end end end