brainray
brainray

Reputation: 12884

Build active architecture only for CocoaPods needs to be NO in Xcode

In an old project where we use cocoapods, there is a strange problem since Xcode 6: when compiling for iphone (not simulator), some random cocoapods are not found while building (e.g. Flurry). In Xcode 5 everything is fine. This is with When 'Build active architecture only = YES' in the Cocoapods target.

When 'Build active architecture only = NO', everything works as expected.

Why is this? I've already rebuilt cocoapods a few times, but it keeps the same.

Upvotes: 11

Views: 6125

Answers (1)

Nahash
Nahash

Reputation: 330

Append to your Podfile:

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
        end
    end
end

Upvotes: 21

Related Questions