vanshg / MacAssistant

Google Assistant for macOS!
MIT License
1.61k stars 132 forks source link

Fix Build fail with Xcode 11.3 #83

Open hb2708 opened 4 years ago

hb2708 commented 4 years ago

This fixes #82

Open in Xcode 11.3 and pod update AudioKit which updates to 4.9.3 Which has a fix for Module compiled with Swift 5.0.1 cannot be imported by the Swift 5.1.3 compiler Refer https://github.com/AudioKit/AudioKit/issues/1940 for fix

hb2708 commented 4 years ago

@vanshg I have to comment the xcodeVersion in the yml

Coz was facing error with the version and was not able to set directly to xcodeVersion: '11.2.1' so using xcodeDeveloperDir: '/Applications/Xcode_11.2.1.app/Contents/Developer'

Never used the azure pipeline before but managed to do above by referring Pipeline macos doc and Doc for Xcode task

Please take look at changes

vanshg commented 4 years ago

I actually have made some updates as of last month. I need to push them still. It involves switching to Swift Package Manager and moving away from the xcworkspace format, which should allow compilation. I'll get that pushed soon.

That will probably invalidate this PR

vanshg commented 4 years ago

@hb2708 Are you able to have some more success with this branch? https://github.com/vanshg/MacAssistant/tree/SwiftPM

hb2708 commented 4 years ago

@vanshg Tried to run but getting some build errors

vanshg commented 4 years ago

With what error?

hb2708 commented 4 years ago

So my xcode Version is 11.3.1 (11C504)

1. Is in file Assistant.swift this needs to be removed that i have already removed locally. try streamCall.sendMessage(request).map(<#T##callback: (Void) -> (NewValue)##(Void) -> (NewValue)#>)

  1. lazy var service: AssistantServiceClient = AssistantServiceClient(address: ASSISTANT_API_ENDPOINT, secure: true) Extra argument 'secure' in call coz the constructor has changes the signature.

  2. service.metadata = try! Metadata(["authorization": "Bearer (Defaults.accessToken)"]) Use of unresolved identifier 'Metadata'

  3. try streamCall.sendMessage(request) { err in Ambiguous reference to member 'sendMessage'

  4. try streamCall.sendEnd() { Cannot convert value of type '() -> ()' to expected argument type 'EventLoopPromise?'

  5. let response = try streamCall.receive() Value of type 'AssistCall' (aka 'BidirectionalStreamingCall<Google_Assistant_Embedded_V1alpha2_AssistRequest, Google_Assistant_Embedded_V1alpha2_AssistResponse>') has no member 'receive'

hb2708 commented 4 years ago

Also need to run pod deintegrate and delete the workspace file.

Also i can not find the Package.swift file in this branch

guruantree commented 2 years ago

Xcode 11.3 #83