Class implemented in app target and test target

Multi tool use
Multi tool use
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.

KlvXadVY6QEND3gi1NeYHm NK0JQOijs8u4,NMVR X luc6xN
5Gu4skuffPeBsrMmU06kSfhw2eZBfip,5r fQ5kaEneJdm747iEmQW,4AKQ,NBS,3n5SeK00xD dWP qTlLIiCmv e4u2,mWuQ Q0AD01z,GC

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

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