Post

Replies

Boosts

Views

Activity

tvOS / Xcode 12 Expected a type "UISplitViewControllerStyle"
I have a universal iOS / tvOS app with a mixed Obj-C/C++ and Swift codebase. The UI for the iOS & tvOS apps is mostly separate, save for a few views here & there. Using the Xcode 12 betas (currently on beta 6), I am getting an error building the tvOS app in every Obj-C class that includes my Project-Swift.h header: Parse Issue &#9; Expected a type &#9;&#9;&#9;&#9;Project-Swift.h &#9;&#9;&#9;&#9;&#9;&#9;(dozens of *.m and *.h files) This is the section of the Project-Swift.h header that is generating the error: SWIFT_CLASS("_TtC4Apex27SiteListSplitViewController") @interface SiteListSplitViewController : UISplitViewController <PCOSiteConnectionStatusChanged> (void)viewDidLoad; (void)viewDidAppear:(BOOL)animated; @property (nonatomic) CGFloat preferredPrimaryColumnWidthFraction; (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER; === // Error is on "UISplitViewControllerStyle" === (nonnull instancetype)initWithStyle:(UISplitViewControllerStyle)style OBJC_DESIGNATED_INITIALIZER SWIFT_AVAILABILITY(tvos,introduced=14.0); @end In the iOS app I use an Obj-C UISplitViewController subclass, which builds just fine. In the tvOS app I use a Swift UISplitViewController subclass. There is nothing in the UISplitViewController swift class that should be exposed to Obj-C. I'm assuming it's being added to the header because it's a UISplitViewController subclass though. I know tvOS 14 defines single and double column split views now, but even if I try to go into the story board and update the style from Undefined to anything else, I still get the error. I've also tried changing the deployment target to 14.0, but that didn't change anything either. If I build this project with Xcode 11, the offending line in my -Swift.h file (- (nonnull instancetype)initWithStyle:(UISplitViewControllerStyle)style OBJC_DESIGNATED_INITIALIZER SWIFT_AVAILABILITY(tvos,introduced=14.0);) doesn't exist. Again, I'm assuming it has something to do with the new UISplitViewController column styles in tvOS 14, but I cannot figure out what I'm supposed to do to get it to work, nor why my iOS project doesn't have this problem.
2
0
1.6k
Sep ’20
Xcode 12b3 Undefined symbol: __swift_FORCE_LOAD_$_swiftWebKit
Using Xcode 12 beta 2 and beta 3 I'm getting the following linker error: ld: warning: Could not find or use auto-linked library 'swiftWebKit' Undefined symbols for architecture x86_64:   "__swift_FORCE_LOAD_$_swiftWebKit", referenced from:       __swift_FORCE_LOAD_$_swiftWebKit_$_Apex in DurationPicker.o       __swift_FORCE_LOAD_$_swiftWebKit_$_Apex in AlertRule.o       __swift_FORCE_LOAD_$_swiftWebKit_$_Apex in VideoExportCamerasTableViewHandler.o       __swift_FORCE_LOAD_$_swiftWebKit_$_Apex in CameraListCollectionViewCell.o       __swift_FORCE_LOAD_$_swiftWebKit_$_Apex in RecorderConnector.o       __swift_FORCE_LOAD_$_swiftWebKit_$_Apex in CameraListThumbnailCell.o       __swift_FORCE_LOAD_$_swiftWebKit_$_Apex in VideoExportDetailsViewController.o       ...      (maybe you meant: __swift_FORCE_LOAD_$_swiftWebKit_$_Apex) ld: symbol(s) not found for architecture x86_64 The example is when building for the simulator, but I get the same error building for an arm device as well. I don't get this error with Xcode 11. I'm guessing there's some framework I need to import or link (SwiftWebKit, it would seem), but I'm not sure why this is an issue with Xcode 12 and not with Xcode 11. I've tried linking the WebKit.framework and import WebKit in the mentioned files, but the error remains. This is a mixed Obj-C / Swift project, and these are not the only Swift classes in the project. I have not been able to determine what's special about these particular files compared to the others in the project. Anyone know what the problem is here and how to fix it?
9
1
31k
Jul ’20