iOS , ld: framework not found GoogleMaps for architecture arm64

I’m developing an app using google maps. I will explain what I did with google maps, and maybe you can help me.

I was using Google maps frameworks without POD, but after a few errors about Google map Key I deleted the google map frameworks reference and I installed it using POD. Everything is working fine, but when I hit

  • Swift 2 – Cant get user location with CLLocationManager
  • Unable to profile app on device with iOS 9.0.1 using Xcode 7, 7.0.1 or 7.1 beta
  • FBSOpenApplicationErrorDomain error 1
  • The Selection is Not a Type that Can Be Renamed Xcode 7
  • Could not cast value of type 'UIView' (0x112484eb0) to 'SKView' (0x111646718)
  • Xcode 7 beta 5 Swift 2 redundant conformance to protocol error
  • Product -> TEST

    now I get this error:

    ld: framework not found GoogleMaps for architecture arm64
    

    Any idea how fix this?

    Thank you!

    Podfile looks like this Cocoapods v1.0 beta 6):

    platform :ios, '8.0'
    use_frameworks!
    
    target 'Project' do
        pod 'GoogleMaps'
    
        target 'ProjectTests' do
            inherit! :search_paths
            pod 'Mockingjay'
        end
    end
    

    2 Solutions Collect From Internet About “iOS , ld: framework not found GoogleMaps for architecture arm64”

    Update Please check if you have same build settings in the Architectures and Build active Architectures only keys of the targets

    Your podfile should look like this

    platform :ios, '8.0'
    use_frameworks!
    
    target 'Project' do
        pod 'GoogleMaps'
    end
    
    target 'ProjectTests' do
         //inherit! :search_paths
         pod 'Mockingjay'
    end
    

    End the project target before you start the ProjectTest target, also why you add inherit! :search_paths? it’s usually not needed unless you have some special requirement


    Old Answer

    If you want to you pods in the Test target than you have to add then in the test also the same way you have added in project’s main target

    So your cocoa pods like this if “SwiftCocoaPods” is your main target name

    //other top level imports
    target “SwiftCocoaPods” do
    pod "GoogleMaps"
    end
    
    target “SwiftCocoaPodsTests” do
    pod "GoogleMaps"
    end
    

    Then you should add pods for the test also like “SwiftCocoaPodsTests”. you may replace the name with whatever you Test target name is

    Else if you want to add the same pods in the multiple target you can use def and use that in all the targets which looks like this

    def project_pods
    pod "GoogleMaps"
    //add other pods which you want in all the targets
    end
    
    target “SwiftCocoaPods” do
    project_pods 
    end
    
    //only add project_pods instead of pods individually 
    target “SwiftCocoaPodsTests” do
    project_pods
    end
    

    This works for me:

    platform :ios, '9.0'
    
    source 'https://github.com/CocoaPods/Specs.git'
    use_frameworks!
    
    def all_pods
        pod 'GoogleMaps'
    end
    
    abstract_target 'Map Base' do
         all_pods
    
         target 'Map' do
    
         end
    
         target 'Unit Tests' do
    
         end
    
         target 'Device Tests' do
    
         end
    end