1 Reply
      Latest reply on Sep 10, 2019 2:20 PM by lunalugo25
      lunalugo25 Level 1 Level 1 (0 points)

        I'm getting a compilation issue related to the AVAudioInteger.

         

        If I build from Xcode I don't have any issue but when I do it from console by xcodebuild it fails.

         

        /../xxxxx.swift:57:66: cannot convert value of type 'Int' to expected argument type 'AVAudioInteger' (aka 'Int32')
        
          let sessionCode = AVAudioSession.ErrorCode(rawValue: code)
          ^~~~~
        

         

        I already attempt to fix the issue with the next code:

        #if os(watchOS)
            let sessionCode = AVAudioSession.ErrorCode(rawValue: Int32(code))
        #else
            let sessionCode = AVAudioSession.ErrorCode(rawValue: code)
        #endif
        

         

        But it just change the failed line to the one inside the else.

         

        The way I run from consle is by:

        xcodebuild -workspace MyApp.xcworkspace -scheme "My Scheme"

         

        The configuration I have to build is:

        + xcode-select --print-path
        /Applications/Xcode_11.B.app/Contents/Developer
        + xcodebuild -version
        Xcode 11.0
        Build version 11M392r