diff --git a/Podfile.lock b/Podfile.lock index f0b79f2e9..886cfba7a 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -307,7 +307,7 @@ SPEC CHECKSUMS: AlphaWalletAddress: 62a69f5ccc7d6d17abf878c4274f4c3d5fdc97ba AlphaWalletCore: 451c8a4dfdba1d3b59a3ac47bf0dcabcf1f4c049 AlphaWalletENS: a93a871ad5d8a8c78cd87b60eb59fccf4b23e841 - AlphaWalletFoundation: 0a4febb19ae6231165d4a2d432161529de3a27be + AlphaWalletFoundation: 53981b803199dd6d0537cbc341772c68a260105c AlphaWalletGoBack: 935efdbd98fa80039f2a350cde5b3a50cea46564 AlphaWalletOpenSea: 11ccb06ae0200dadc2b3f7c3e223f407ac3a22b4 AlphaWalletWeb3Provider: 7ca1e1c1dc841dc1915f970daace48bf34931655 diff --git a/modules/AlphaWalletFoundation/AlphaWalletFoundation.podspec b/modules/AlphaWalletFoundation/AlphaWalletFoundation.podspec index f8db344c1..3dd28b2c1 100644 --- a/modules/AlphaWalletFoundation/AlphaWalletFoundation.podspec +++ b/modules/AlphaWalletFoundation/AlphaWalletFoundation.podspec @@ -19,6 +19,7 @@ Pod::Spec.new do |spec| spec.platform = :ios, "13.0" spec.source = { :git => 'git@github.com:AlphaWallet/alpha-wallet-ios.git', :tag => "#{spec.version}" } spec.source_files = 'AlphaWalletFoundation/**/*.{h,m,swift}' + spec.resources = ['AlphaWalletFoundation/Core/Tokens/PopularTokens/known_contract.json'] spec.pod_target_xcconfig = { 'SWIFT_OPTIMIZATION_LEVEL' => '-Owholemodule' } spec.dependency 'BigInt', '~> 3.1' diff --git a/modules/AlphaWalletFoundation/AlphaWalletFoundation/Core/Tokens/PopularTokens/PopularTokensCollection.swift b/modules/AlphaWalletFoundation/AlphaWalletFoundation/Core/Tokens/PopularTokens/PopularTokensCollection.swift index 994176bdb..cfd7bedb0 100644 --- a/modules/AlphaWalletFoundation/AlphaWalletFoundation/Core/Tokens/PopularTokens/PopularTokensCollection.swift +++ b/modules/AlphaWalletFoundation/AlphaWalletFoundation/Core/Tokens/PopularTokens/PopularTokensCollection.swift @@ -94,7 +94,7 @@ public class PopularTokensCollection: NSObject, PopularTokensCollectionType { } public class LocalPopularTokensCollection: NSObject, PopularTokensCollectionType { - private let tokensURL: URL = URL(fileURLWithPath: Bundle.main.path(forResource: "known_contract", ofType: "json")!) + lazy private var tokensURL: URL = URL(fileURLWithPath: Bundle(for: self.classForCoder).path(forResource: "known_contract", ofType: "json")!) private let queue = DispatchQueue.global() private static var tokens: [PopularToken]? = .none