1

This used to be working, but since migrating to Swift 5 from Swift 3, the following errors occurs: Property 'amplitude' not found on object of type 'TunerOutput *'

This is the objective c code:

-(void)tunerDidUpdate:(Tuner * _Nonnull)tuner output:(TunerOutput * _Nonnull)output{
    if (output.amplitude < 0.001) { // Compilation error here    
        // Don't show too low volume
    }
}

This is the TunerOutput class:

@objc public class TunerOutput: NSObject {

  public fileprivate(set) var amplitude: Double = 0.0
  fileprivate override init() {}

}

Any ideas how to solve? Thanks.

TomV
  • 1,157
  • 1
  • 13
  • 25

0 Answers0