Test bundle could not be loaded because an unanticipated error

后端 未结 10 1473
盖世英雄少女心
盖世英雄少女心 2020-12-31 00:57

Recently I have started writing test case for one old static library. I have loaded the library to Xcode 5,Since Static Library is old , I have to manually add TestProject w

相关标签:
10条回答
  • 2020-12-31 01:21

    Turning off the pod configuration for the test target fixed the problem for me, it had something to do with the pod configuration messing with it.

    0 讨论(0)
  • 2020-12-31 01:22

    For me, we had just turned on CloudKit entitlement. For some reason that broke building.

    0 讨论(0)
  • 2020-12-31 01:25

    Had a similar issue:

    FrameworkA imports FrameworkB

    FrameworkA-Tests also imports FrameworkB

    What solved the issue was to remove(comment) all references to FrameworkB in FrameworkA-Tests, then Run Tests once and uncomment the references.

    FrameworkA-Tests now imports FrameworkB and runs fine.

    0 讨论(0)
  • 2020-12-31 01:28

    Check if you forgot to add your test target in your Podfile:

    target 'MyProject' do
    
      # Add test target
      target 'MyProjectTests' do
        inherit! :search_paths
      end
    
      pod 'SomePodLibrary'
    
    end
    
    0 讨论(0)
  • 2020-12-31 01:29

    The bundle UITests couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle

    Verify if all your targets are using the same iOS version in: Build Settings -> iOS Deployment Target

    0 讨论(0)
  • 2020-12-31 01:32

    If other readers are getting this error, and you're using Carthage to add a framework, ensure the Copy Files phase is with Destination: Frameworks.

    If you accidentally add the frameworks to a Copy Files phase with a different target (other than Frameworks), or Copy Bundle Resources, this will also produce the damaged / invalid bundle error message.

    0 讨论(0)
提交回复
热议问题