-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
Cannot subscript a value of type 'DefaultsAdapter<DefaultsKeys>' with an argument of type 'DefaultsKey<String?>' #230
Comments
hey @marwamelfeky can you copy-paste a sample code that produces that error? |
Hi,
Thanks for your fast response , I appreciate your effort
This is the code:
//extension DefaultsKeys {
// public static let DIDNT_LOGIN_NOTIFICATION =
"DIDNT_LOGIN_NOTIFICATION";
// static let KEY_API_IP = DefaultsKey<String?>("API_IP");
// static let KEY_DIDNT_LOGIN_NOTIFICATION =
DefaultsKey<String?>("DIDNT_LOGIN_NOTIFICATION");
// static let KEY_SELECTED_COUNTRY =
DefaultsKey<String?>("SELECTED_COUNTRY");
// static let KEY_IS_WELCOME_SCREEN_SEEN =
DefaultsKey<Bool?>("WELCOME_SCREEN_STATUS");
//}
The code that causes the error is:
Defaults[.KEY_SELECTED_COUNTRY] = countryCode3;
and countryCode3 is a String
…On Sun, Feb 2, 2020 at 3:01 PM Łukasz Mróz ***@***.***> wrote:
hey @marwamelfeky <https://github.com/marwamelfeky> can you copy-paste a
sample code that produces that error?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#230?email_source=notifications&email_token=ABDBQVM2VN5P3GP3NYPX6QLRA272NA5CNFSM4KOYIUJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRWHYA#issuecomment-581133280>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDBQVLTNFAFHZMWVXB3VQDRA272NANCNFSM4KOYIUJQ>
.
--
Marwa Mohammed Elfeky
Senior iOS Developer
Mobile : 01225471355
|
@marwamelfeky what is the Swift version you use? Also, what version of SwiftyUserDefaults do you use? I see static keys which means probably version 4? |
Swift 5
Xcode 13.3.1
macOS Catalina 10.1.3
…On Sun, Feb 2, 2020 at 3:42 PM Łukasz Mróz ***@***.***> wrote:
@marwamelfeky <https://github.com/marwamelfeky> what is the Swift version
you usr?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#230?email_source=notifications&email_token=ABDBQVM7B724M7GHP6CD6IDRA3EUBA5CNFSM4KOYIUJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRXDNI#issuecomment-581136821>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDBQVNBDMKALIIAB3OUGXDRA3EUBANCNFSM4KOYIUJQ>
.
--
Marwa Mohammed Elfeky
Senior iOS Developer
Mobile : 01225471355
|
any progress on this one? How you have solved this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue suddenly occurs with xcode 11.3.1 any help
The text was updated successfully, but these errors were encountered: