I’ve a tvOS challenge incorporates an App goal and three static libraries:
EntryPoint – Static library that incorporates principal , AppDelegate and SceneDelegate
Expertise – Static library containing my UI parts
AppTarget – executable constructed utilizing above two libraries
I’ve a category “SelectionTable” which subclasses UITableView in Expertise goal :
import UIKit
class SelectionTable : UITableView
{
non-public var vDataSrc:[String]!
func SetDataSrc (_ pDataSrc:[String])
{
self.vDataSrc = pDataSrc
}
func UpdateDataSrc (_ pStringList:[String])
{
self.vDataSrc += pStringList
}
func GetDataSrc () -> [String]
{
return self.vDataSrc
}
}
I’m not utilizing this class wherever and nonetheless i get these errors when i construct my AppTarget:
Can not discover interface declaration for ‘UITableView’, superclass of ‘TWOSSelectionTableTVOS’
Anticipated a kind
These above error are coming in generated header file “Expertise-Swift.h”. This file is auto-generated by compiler. I’m not utilizing @objc wherever within the code, However nonetheless the Goal-Swift.h file has the under traces:
SWIFT_CLASS("_TtC10Experience22TWOSSelectionTableTVOS")
@interface TWOSSelectionTableTVOS : UITableView
- (nonnull instancetype)initWithFrame:(CGRect)body type:(UITableViewStyle)type OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
@finish
When i’m marking above class as Non-public , this error goes away .
And in addition , if i’m defining SelectionTable class in EntryPoint library , this error doesn’t happen .
I’m utilizing comparable mannequin for an iOS challenge additionally and there i’m not going through this difficulty.
I’m utilizing :- Swift model : Swift 5.9.2 XCode model : 15.2