sunshinejr / SwiftyUserDefaults

Modern Swift API for NSUserDefaults
http://radex.io/swift/nsuserdefaults/static
MIT License
4.85k stars 365 forks source link

Update to 5.0 failed #232

Closed lm2343635 closed 3 years ago

lm2343635 commented 4 years ago

Hi, @sunshinejr

I am trying to update from 4.0 to 5.0. I've updated my code as your guideline. https://github.com/MuShare/Httper-iOS/commit/ffbba16830851b440548262af79d9923110c3140

But the app is crashed after updating.

dyld: Symbol not found: _$s18SwiftyUserDefaults0C4KeysVAA0C8KeyStoreAAWP
  Referenced from: /Users/meng/Library/Developer/CoreSimulator/Devices/B0B37570-FE90-40B2-B403-C99BE99612C9/data/Containers/Bundle/Application/C2DB9456-072C-4A9C-A3BE-ACE9F0360F89/Httper.app/Httper
  Expected in: /Users/meng/Library/Developer/CoreSimulator/Devices/B0B37570-FE90-40B2-B403-C99BE99612C9/data/Containers/Bundle/Application/C2DB9456-072C-4A9C-A3BE-ACE9F0360F89/Httper.app/Frameworks/SwiftyUserDefaults.framework/SwiftyUserDefaults
 in /Users/meng/Library/Developer/CoreSimulator/Devices/B0B37570-FE90-40B2-B403-C99BE99612C9/data/Containers/Bundle/Application/C2DB9456-072C-4A9C-A3BE-ACE9F0360F89/Httper.app/Httper
(lldb) 

When I removed the app from simulator, and run the latest code again, it works. However, upgrading from the old version(4.0) does not work.

sunshinejr commented 4 years ago

Hey @lm2343635! Just wanted to confirm, it crashes after the update, but then you removed the app and it works again with version 4.0 right? It seems like the symbols are not there in the framework, could you clean the build/remove derived data and try building again? I'm pretty sure the symbols are there, so this might be just the problem with cache.

lm2343635 commented 4 years ago

@sunshinejr Thank you for your reply!

Do you mean the following steps?

sunshinejr commented 4 years ago

@lm2343635 yes, if it crashes still crashes then maybe removing the app will help since it should force remove the bundled framework (with old symbols) & install a new one.

lm2343635 commented 4 years ago

I've followed the steps and it works. I will check it again by updating the app with TestFlight. Thanks!

sunshinejr commented 4 years ago

@lm2343635 no problem, let me know if it works in TF as well :)

RomanPodymov commented 3 years ago

Hello @lm2343635 Any news from TestFlight?

lm2343635 commented 3 years ago

Thanks. works now