Class implemented in app target and test target

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Class implemented in app target and test target



I'm using CoreData and have extended the automatic (didn't generate custom class files) model classes by custom variables that return objects of classes coming from an CocoaPods dependency.


import Foundation
import ACocoaPodsFramework
import CoreData

extension MyClass {
var customVar: AClassFromCocoaPods? {
return AClassFromCocoaPods()
}
}



I've added a target for unit tests to the Xcode project and added MyClass to the test target. A test class looks like the following.


import XCTest
import ACocoaPodsFramework
import CoreData
@testable import MyAppTarget

class MyClassTests: XCTestCase {
}



I have imported ACocoaPodsFramework in both the app and the unit test target as a framework.



When i run the unit tests i receive the following notice


objc[21178]: Class MyClass is implemented in both /.../MyAppTarget.app/MyAppTarget (0x1017703f0) and /... MyAppTarget.app/PlugIns/MyClassTests.xctest/MyClassTests (0x123dc8ae8). One of the two will be used. Which one is undefined.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Visual Studio Code: How to configure includePath for better IntelliSense results

Spring cloud config client Could not locate PropertySource

Regex - How to capture all iterations of a repeating pattern?