robreuss / VirtualGameController

Software-based game controllers for iOS, tvOS, OS X and watchOS in Swift 4.2.
MIT License
462 stars 44 forks source link

Dosen't compile under Xcode 11 - VgcController.swift #36

Closed RustyMoyher closed 3 years ago

RustyMoyher commented 4 years ago

VgcController.swift fails to compile with Xcode 11. I get the following two errors:

Swift Compiler Error Group VirtualGameController-master/Source/Framework/VgcController.swift:2052:13: Setter for 'value' with Objective-C selector 'setValue:' conflicts with method 'setValue' from superclass 'GCControllerButtonInput' with the same Objective-C selector /GameController.GCControllerButtonInput:11:15: Method 'setValue' declared here

VirtualGameController-master/Source/Framework/VgcController.swift:2125:13: Setter for 'value' with Objective-C selector 'setValue:' conflicts with method 'setValue' from superclass 'GCControllerAxisInput' with the same Objective-C selector /GameController.GCControllerAxisInput:5:15: Method 'setValue' declared here

RustyMoyher commented 4 years ago

Update: I was able to build with Xcode 10.3, which was released on July 16, 2019. Looks like it was a semi-recent Xcode/iOS SDK change that broke it. The build was failing with Xcode 11.3.1, the latest as of now.

timothycosta commented 3 years ago

You can use @nonobjc override var ... to get for those two errors. The examples seem to run ok with the change, though they still need some minor tweaks to compile.

robreuss commented 3 years ago

Thanks @timothycosta and @RustyMoyher. Was distracted by other projects but plan now to get it updated for Xcode 12 and Swift 5.3. Going to implement the frameworks using SPM as well.

robreuss commented 3 years ago

@RustyMoyher @timothycosta Quick question for you guys. I've been playing with game controller-based haptics recently and was thinking it might be useful if VGC offered support for haptics. Does that sound like something that should be implemented at the VGC level or should it be left to the developer to implement that at the App-level?

I think there may be other advancements in GCGameController that could be added to VGC, particularly the new profiles, that might be useful to support. Any specifics you would be seeking, please let me know.