5

Please do help me on this scenario. I saw several post related to this, but could not able to resolve the issue with my mac App without pods.

Project is several years old, developed in macOS(Objective C). Now I am trying with XCTest for unit testing. Using Xcode 7.3.1, I am not able to run tests classes.

This project is to create frame work. Project is working fine, only issue is with the testing. We are not supposed to do Pods or some other alternatives.

Console window shows below points:

xctest[35530:345970] The bundle “BaseLibTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle. xctest[35530:345970]dlopen_preflight(/Users/12345678/Documents/Modify/Cocoa/Projects/BaseLib/build/Debug/BaseLibTests.xctest/Contents/MacOS/BaseLibTests): Library not loaded: @executable_path/../Frameworks/FreeTDS.framework/Versions/A/FreeTDS Referenced from: /Users/12345678/Documents/Modify/Cocoa/Projects/BaseLib/build/Debug/BaseLib.framework/Versions/Current/BaseLib Reason: no suitable image found. Did find: /Library/Frameworks/FreeTDS.framework/Versions/A/FreeTDS: no matching architecture in universal wrapper) Program ended with exit code: 82

Anand
  • 254
  • 2
  • 12
  • I saw this link(https://forums.developer.apple.com/thread/45055), similar to my question, but no answer is available, even it is in apple forum – Anand Jun 30 '17 at 10:22
  • I am able to write test cases in Xcode 8, without any issues and completed successfully. But the customer wants to run this in 7.3 itself, as the dependent projects all are in 7.3 – Anand Jul 28 '17 at 05:39
  • the no suitable image found is for arch missing in the binary. Please check the arch in build settings. – bikram990 Aug 01 '17 at 09:19
  • @ bikram990: I gave like Standard Architectures (64-bit Intel) (x86_64) - $(ARCHS_STANDARD) only. Pls check the updated error from console in question itself. – Anand Aug 02 '17 at 08:40

1 Answers1

1

@Anand For the 3rd Point: Please check the build settings.

Please make sure its either set to Standard Architectures (64-bit Intel) (x86_64) - $(ARCHS_STANDARD) or set to represent proper architectures.

settings

To debug this more, could you please copy paste the exact error you are facing and share the build env variables?

bikram990
  • 1,085
  • 1
  • 14
  • 36
  • I have given the architecture as u suggested only. Pls check the updated error exactly from console in question. – Anand Aug 02 '17 at 08:41
  • @Anand Please check the same setting in `BaseLib.framework` and all the targets linked. – bikram990 Aug 02 '17 at 09:03
  • check in FreeTDS target as well. – bikram990 Aug 02 '17 at 09:20
  • I made Target dependencies and Link binary with libraries for bselib.framework and test as same.Is that the same step as u expected? But issue still exists. In freeTDS target, there is no target dependencies. Link binary with libraries having foundation frame work only – Anand Aug 02 '17 at 09:32
  • The error here is freeTDS doesn't have the required architecture. – bikram990 Aug 02 '17 at 11:16
  • Check https://stackoverflow.com/a/42865601/1578528 which is similar to your issue where wrong arch binaries were being linked. – bikram990 Aug 02 '17 at 11:18
  • Check https://www.reddit.com/r/jailbreakdevelopers/comments/2qi6gd/no_matching_architecture_in_universal_wrapper/ where the same issue is with iOS and it was resolved by exporting/setting the Architectures properly. – bikram990 Aug 02 '17 at 11:22