Targets within a target in a Podfile

Viewed 3062

I am trying to install the Google Mobile Ads SKD into my Xcode project. I installed Cocoapods and then initialized a Podfile into my project:

# Uncomment the next line to define a global platform for your project
platform :ios, '10.2'

target 'Cubical' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Cubical

  target 'CubicalTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'CubicalUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

However, I don't understand why there are targets within my main project (Cubical). I never really used CubicalTests or CubicalUITests, since I don't really need to test my UI or any snippet of code. I was thinking of removing these two folders.

My questions are,

1) Is there any drawback in removing the Tests and UITests folders from my Xcode project? And if I do, can I just simply delete those two targets from my Podfile?

2) Let's say I was going to keep those two targets. Would I have to add the pod to all three targets? Or do the two nested targets inherit any pods of target 'Cubical'

3) Do I need to add to Linked Frameworks the Google Mobile Ads SDK? Or is this already done by Cocoapods?

My final pod would look like this:

# Uncomment the next line to define a global platform for your project
platform :ios, '10.2'

target 'Cubical' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  pod 'Google-Mobile-Ads-SDK'

  # Pods for Cubical

  target 'CubicalTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'CubicalUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end
1 Answers
Related