0 Replies
      Latest reply on Apr 30, 2020 5:59 AM by alienspaces
      alienspaces Level 1 Level 1 (20 points)

        Is it by design that we are not able to succesfully load the XCTest framework into our own framework targets?

         

        I can add it to my framework target's list of linked frameworks, and import it into a source code file, and even build my project successfully, but after it's built, Xcode will display a red error inline at the import site with the message "Failed to load module 'XCTest'". My framework target even builds if I refer to an XCTest type in my code.

         

        I got to this point because I was trying to use XCTPerformanceMetric(rawValue: ""). The call works in my test target, but in a framework target it tells me the rawValue version of the constructor does not exist.

         

        Of course, as i type this, I'm still receiving the load module error, but now the compiler doesn't complain if I use the rawValue constructor.

         

        Can anyone enlighten me? Thanks.