Tushar J. Tushar J. - 2 months ago 7x
iOS Question

Run script error : No such file or directory

I am getting this error when I tried to run a test in my project. I have added one framework as a embeded framework in my project. The exact error message is

bash: /Users/<username>/Library/Developer/Xcode/DerivedData/<ProjectName>-cnpqefdtutjgjdaulkqwjbbvbfnu/Build/Products/Debug-iphonesimulator/<ProjectName>Tests.xctest/Frameworks/LayerKit.framework/strip-frameworks.sh: No such file or directory

I have followed all the steps to add an embeded framework to Xcode. But still no use.

BTW, I am using pods.


Adding this answer, in case it will help somebody else.

While installing pod which will also connect to our test targets. We need to write podfile as follows ,

def shared_pods 
specify pods here

target 'AppName' do  

target 'AppNameTests' do 

Adding the target entry in your Podfile will cause CocoaPods to generate a new set of files the next time you run pod install. However, before you run that command, you will probably need to set your configurations to None, so that Cocoapods can assign its own configuration. Here's how to do that:

  1. Go to your project-level target
  2. For each configuration listed under Configurations, select None for your target, in the drop-down menu under Based on Configuration File.

Once you've edited your Podfile and you nullified your configurations, you're ready to run pod install on the command line. After the process is completed, check back with your base configuration settings, and note that they have been set to the configuration file that was generated by CocoaPods!

I hope that helps!