AlphaWallet / alpha-wallet-ios

An advanced Ethereum/EVM mobile wallet
https://www.alphawallet.com
MIT License
601 stars 372 forks source link

Repeated crypto implementation #3744

Closed eviltofu closed 2 years ago

eviltofu commented 2 years ago
objc[8348]: Class _TtC11CryptoSwift20AEADChaCha20Poly1305 is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c12c98) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efd3b8). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift3AES is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c12e30) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efd560). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift14BlockDecryptor is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13058) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efd778). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift14BlockEncryptor is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13150) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efd870). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift13CCMModeWorker is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c134a0) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efd9f8). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtCV11CryptoSwift13CTRModeWorker10CTRCounter is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c139a8) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efdc68). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift3GCM is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13aa8) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efdd30). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift13GCMModeWorker is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13b70) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efddf8). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwiftP33_B13760B67F74EDA1901BCF8168C3A85A2GF is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13c68) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efdef0). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift3OCB is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13f38) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efdfe0). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift13OCBModeWorker is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c14000) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe0a8). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift8Blowfish is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13240) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe1f8). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift6CBCMAC is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13358) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe2e8). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift4CMAC is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c138a8) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe3e8). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift8ChaCha20 is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13700) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe4d8). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift8Checksum is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c137c8) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe5a0). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift4HMAC is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13d58) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe6f0). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift3MD5 is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c13e48) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe7e0). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift8Poly1305 is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c141a8) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe908). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift6Rabbit is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c14270) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efe9d0). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift4SHA1 is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c144f8) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efeaa8). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift4SHA2 is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c145e0) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efeb90). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift4SHA3 is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c146d0) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efec80). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift6Scrypt is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c14358) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efed58). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift11SecureBytes is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c14450) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efee50). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift15StreamDecryptor is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c14790) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efeef0). One of the two will be used. Which one is undefined.
objc[8348]: Class _TtC11CryptoSwift15StreamEncryptor is implemented in both /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/Frameworks/CryptoSwift.framework/CryptoSwift (0x108c14848) and /private/var/containers/Bundle/Application/50A6D437-FCBB-441F-855A-9F939CF51414/AlphaWallet.app/AlphaWallet (0x105efefa8). One of the two will be used. Which one is undefined.
eviltofu commented 2 years ago

@oa-s @hboon It appears that a library is being embedded twice?

hboon commented 2 years ago

I think it's included as both a pod by us directly and as Swift Package by another Swift Package (WalletConnect v2 SDK)

hboon commented 2 years ago

Since SPM seems to work for us now, try replacing our CryptoSwift dependency in the Podfile and into SPM? Remember to try to build for both simulator and device?

eviltofu commented 2 years ago

Maybe it's easier just to remove the SPM version? @hboon Podfile Podfile

hboon commented 2 years ago

@eviltofu We can't remove the SPM version because the WalletConnect v2 SDK specifies it.

Oh, maybe we can't remove the pod version for the same reason?

Any ideas? Otherwise, let's keep them both around and make sure the version number always sync (not the best idea of course!)

eviltofu commented 2 years ago

Ok I've checked the entire Podfiles list and it seems like only a handful are not supported on SwiftPackageManager. Blockie, Charts, StatefulViewController, QRCodeReaderViewController, PaperTrailLumberjack, and one or two more.

Maybe shift everything to SwiftPackageManager?

@hboon

hboon commented 2 years ago

Yes, originally wanted to. But like you said not everything third party dependency we use supports SPM. and it looks like SPM can't have dependencies on pods, so we are going to have a mixture anyway. So it doesn't seem like the right time to move completely (or as much as we can) to SPM.

But are you suggesting we move only those pods that depend on CryptoSwift over to SPM? If that's the case, isn't it possible that we might in the future add a dependency that is only available on Cocoapods and we are back to the same problem?

eviltofu commented 2 years ago

Why not move WalletConnect to the pod file?

hboon commented 2 years ago

Because it's a third party library that only supports SPM. One way to go about it is to create PR to add support for Cocoapods.

eviltofu commented 2 years ago

So this issue cannot be resolved right now. I'm going to close it if there's nothing else. @hboon

hboon commented 2 years ago

Ok. Let’s close it for now. Maybe we can see if we can add support to the WC SDK for cocoa pods later.