Swift Compilation Error "GCDWebServerCompletionBlock" in build time


#1

After followed ‘Using Capaitor with Ionic’ and ‘iOS Getting Started’, I always end up with these error in build time.

Value of optional type 'GCDWebServerCompletionBlock?' (aka 'Optional<(Optional<GCDWebServerResponse>) -> ()>') must be unwrapped to a value of type 'GCDWebServerCompletionBlock' (aka '(Optional<GCDWebServerResponse>) -> ()')

Value of optional type 'GCDWebServerRequest?' must be unwrapped to refer to member 'byteRange' of wrapped base type 'GCDWebServerRequest'

Value of optional type 'GCDWebServerRequest?' must be unwrapped to refer to member 'byteRange' of wrapped base type 'GCDWebServerRequest'

Value of optional type 'GCDWebServerCompletionBlock?' (aka 'Optional<(Optional<GCDWebServerResponse>) -> ()>') must be unwrapped to a value of type 'GCDWebServerCompletionBlock' (aka '(Optional<GCDWebServerResponse>) -> ()')

Also tried solution in iOS Troubleshooting, but still getting this error.

Ionic info:

Ionic:

   ionic (Ionic CLI)  : 4.1.1 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.11

System:

   NodeJS : v8.11.2 (/usr/local/bin/node)
   npm    : 6.4.0
   OS     : macOS High Sierra