Getting error “No such module” using Xcode, but the framework is there

前端 未结 30 1814
小蘑菇
小蘑菇 2020-11-22 05:02

I\'m currently coding in Swift, and I\'ve got an error:

No such module Social

But I don\'t understand, because the module is in

30条回答
  •  渐次进展
    2020-11-22 05:41

    I was getting same error for

    import Firebase
    

    But then noticed that I was not adding pod to the main target section but only adding to Test and TestUI targets in Podfile.

    With the command

    pod init
    

    for an xcode swift project, the following Podfile is generated

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    
    target 'MyApp' do
      # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
      use_frameworks!
    
      # Pods for MyApp
    
      target 'MyAppTests' do
        inherit! :search_paths
        # Pods for testing
      end
    
      target 'MyAppUITests' do
        inherit! :search_paths
        # Pods for testing
      end
    
    end
    

    So, need to make sure that one adds pods to any appropriate placeholder.

提交回复
热议问题