3

I am working with Xcode 9 and using Cocoa framework throws this error. I have tried all possible ways but not able to resolved it. enter image description here

Hemant Solanki
  • 894
  • 10
  • 24

3 Answers3

4

So, if label is a lib in a pod, you probably are affected by a cocoapods bug; try to add this post_install in your podfile

post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
    end
end

I suggest you to remove all derived data and clean from xcode. Then, re-install pods with pod install

Rico Crescenzio
  • 3,952
  • 1
  • 14
  • 28
2

I had to combine the above two excellent answers (Podfile modification and cocoa pod version 1.4.0) plus another Podfile modification from another thread

My Podfile:

post_install do |installer|
installer.pods_project.targets.each do |target|
    target.new_shell_script_build_phase.shell_script = "mkdir -p $PODS_CONFIGURATION_BUILD_DIR/#{target.name}"
        target.build_configurations.each do |config|
            config.build_settings['CONFIGURATION_BUILD_DIR'] = '$PODS_CONFIGURATION_BUILD_DIR'
            config.build_settings.delete('CODE_SIGNING_ALLOWED')
            config.build_settings.delete('CODE_SIGNING_REQUIRED')
        end
    end
end

then

sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.4.0

Works for me on Xcode 9.4.1

Brett
  • 1,647
  • 16
  • 34
1

It is a problem with Cocoapod version 1.5.0 If you are using this you will get this error.

To remove your current version you could just run:

sudo gem uninstall cocoapods

you can install a specific version of cocoa pods via the following command:

sudo gem install cocoapods -v 1.4.0

Remove Podlock file before the update.

Brett
  • 1,647
  • 16
  • 34
Vinod Radhakrishnan
  • 441
  • 1
  • 6
  • 18