WorryFree Computers   »   [go: up one dir, main page]

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

Deprecations: 'unarchiveObjectWithData:' is deprecated: first deprecated in iOS 12.0 - Use +unarchivedObjectOfClass:fromData:error: instead #6502

Closed
KevinVladG opened this issue Sep 19, 2020 · 6 comments · Fixed by #6512

Comments

@KevinVladG
Copy link
KevinVladG commented Sep 19, 2020

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12
  • Firebase SDK version: 6.32.2
  • Firebase Component: Database
  • Component version: 6.6.0
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

Warning for Deprecations shows up:

/Users/{$CURRENT_USER}/{$PROJECT_FOLDER}/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Persistence/FLevelDBStorageEngine.m:169:50: 'unarchiveObjectWithData:' is deprecated: first deprecated in iOS 12.0 - Use +unarchivedObjectOfClass:fromData:error: instead

Steps to reproduce:

  • Updated to Xcode version 12
  • Install/Update pods in working project
  • Update pods to Swift 5.0 framework
  • Applications Builds and Runs on iOS version 14
  • Warning for Deprecations shows up for FirebaseDatabase pod

Relevant Code:

  • Path to file: /Users/{$CURRENT_USER}/{$PROJECT_FOLDER}/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Persistence/FLevelDBStorageEngine.m

  • File name: FLevelDBStorageEngine.m

  • Line number of error: 169:50

id pendingPut = [NSKeyedUnarchiver unarchiveObjectWithData:data];
@KevinVladG
Copy link
Author
KevinVladG commented Sep 19, 2020

Temp. fix would be to set the "Deprecated Functions" setting in Pods to 'No' this will ignore the error but it's still exists.

@paulb777
Copy link
Member

@KevinVladG Thanks for the report. What's the reason for changing the pods build optoins to Swift 5 and how exactly are you doing that? Most of the Firebase pods are written in Objective C and support back to iOS 8 or 9.

We can potentially ifdef the code to address this, but I'm curious to get more context about the use case.

@KevinVladG
Copy link
Author

@paulb777 I updated the Firebase pods using Xcode 12 Issues navigator. There was an option for my current project and for the pods and such. that would be great! I just wanted to be sure you guys were aware of it on this new release.

@KevinVladG
Copy link
Author

@paulb777 Thank you Paul! I will keep checking for the merge.

@paulb777
Copy link
Member
paulb777 commented Oct 8, 2020

@KevinVladG Sorry, the fix was a bit more complicated than I initially thought and we haven't been able to prioritize yet

@KevinVladG
Copy link
Author

@paulb777 no worries I have been following along. I've silenced the warning so no worries!

@firebase firebase locked and limited conversation to collaborators Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants