title: How to add a folder reference in my the Pod project in post install?
body: <p>So, I am trying to add a folder reference in a target that was created by cocoapods.</p>
  
  <p>I found this solution, but it is not working for me. <a href="https://github.com/CocoaPods/CocoaPods/issues/3521" rel="nofollow">https://github.com/CocoaPods/CocoaPods/issues/3521</a></p>
  
  <p>I am on cocoapods 0.39. And I only changed the <code>projects</code> to <code>pods_project</code> since that was deprecated. </p>
  
  <p>Also how do you enable logging when running <code>pod update</code>. I tried <code>pod update --verbose</code>, but my <code>puts</code> is not being displayed. :/</p>
  
  <p><strong>=========== UPDATED ===========</strong></p>
  
  <pre><code>post_install do |installer|
      puts "printing tests"
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          if target.name == "TargetWhereToAddTheFolderOrFileReference"
            source_files = target.source_build_phase.files
            folderReference = installer.project.add_file_reference("/AbsolutePath/To/FileOrFolder", installer.project.pod_group("PodGroupWhereToAddTheFileOrFolder"), true)
            target.source_build_phase.add_file_reference(btsdata, true)
          end
        end
      end
  end
  
  post_install do |installer|
      // another post install script is here.
  end
  </code></pre>
  
  <p>I've attached the script that is failing plus there was another post_install script below it. That <code>puts "printing tests"</code> is not being called as well....</p>
  
  <p><strong>=========== UPDATED ENDS ===========</strong></p>