Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value of optional type 'ConsentConfigurable?' must be unwrapped to refer to member 'consentStatus' of wrapped base type 'ConsentConfigurable' In Migrator.swift #10

Open
pawarn opened this issue Jun 10, 2021 · 4 comments

Comments

@pawarn
Copy link

pawarn commented Jun 10, 2021

I'm using below flutter and Dart version

Flutter 2.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 02c026b03c (13 days ago) • 2021-05-27 12:24:44 -0700
Engine • revision 0fdb562ac8
Tools • Dart 2.13.1

Tealium Version: tealium: ^2.0.0

Value of optional type 'ConsentConfigurable?' must be unwrapped to refer to member 'consentStatus' of wrapped base type 'ConsentConfigurable'

Chain the optional using '?' to access member 'consentStatus' only for non-'nil' base values

Force-unwrap using '!' to abort execution if the optional value contains 'nil'

@christinasund
Copy link
Contributor

Thanks @pawarn! We will take a look and get back to you.

@christinasund
Copy link
Contributor

@pawarn We are unable to reproduce this on our end, but I am wondering if maybe your Xcode version is a bit older. Swift fixed the double optional unwrapping in a recent compiler release, so is it possible you are building with old build tools/old swift version? Please let us know what version of Xcode you have downloaded.

Another thing to check would be the Swift Language Version in the build settings of yourflutterapp/ios/Runner.xcworkspace. To do this, open the xcworkspace, click on the project in the top left corner of the project navigator, click on the build settings tab, then search for "language version". You should see Swift 5 there.

Runner_xcodeproj

Thanks!

@pawarn
Copy link
Author

pawarn commented Jun 16, 2021

@christinasund
Thanks for your response I'm using Xcode version 12.4 and Swift version 4

@christinasund
Copy link
Contributor

Thanks @pawarn, have you tried updating the yourflutterapp/ios/Runner.xcworkspace to use Swift 5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants