Swift test give error “Undefined symbols for architecture x86_64”

前端 未结 7 821
借酒劲吻你
借酒劲吻你 2020-12-24 06:58

I\'m running swift test from the command line to run the test cases. This is the test case:

import XCTest
@testable import vnk_swift

class KeyM         


        
7条回答
  •  情话喂你
    2020-12-24 07:41

    If you are adding TestTarget after creating pod file. Then below code may be missing in the pod file.

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

    Add above code before end of target like below.

    target 'Demo' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
    
      # Pods for DocsDemo
    
      target 'DemoTests' do
        inherit! :search_paths
        # Pods for testing
      end
    
    end
    

提交回复
热议问题