web3swift
web3swift copied to clipboard
Generics.swift:17:28: 'exported: true' has no effect in '_specialize' attribute
I have facing this issues when running ,this issues found in crypto swift frame work please check and fix it
pod 'web3swift', :git => 'https://github.com/lvyikai/web3swift'
I have used but it's fixed ,it's show some bugs Cannot find 'keystoreManager' in scope
let pkData = try! keystoreManager.UNSAFE_getPrivateKeyData(password: pw, account: ethereumAddress).toHexString()
keystoreManager not found
`private var aKeyStoreManger: KeystoreManager?
fileprivate func getPrivateKey() {
DispatchQueue.main.async {
self.walletAddressLabel.text = self.walletAddress
}
guard let manager = FilestoreWrapper.getKeystoreManager() else {
print("Manager not found ")
return
}
aKeyStoreManger = manager
self.walletAddress = self.aKeyStoreManger?.addresses.first?.address
if let address = self.walletAddress {
let ethereumAddress = EthereumAddress(address)
print(ethereumAddress, " is the ethereum addess ")
do {
let privateKeydata = try aKeyStoreManger?.UNSAFE_getPrivateKeyData(account: ethereumAddress).hex
print(privateKeydata as Any, " iss the private key ")
if let key = privateKeydata {
self.privateKeyString = key
}
} catch {
print(error.localizedDescription)
}
}
}`
Create another file for keystore and you can use anywhere
class FilestoreWrapper: NSObject { static func getKeystoreManager () -> KeystoreManager? { let userDir = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] let path = userDir+"/keystore/" let userLoginType = UserDefaults.standard.value(forKey: KeyConstants.UserDefaults.kUserLoginType) as? String ?? "create" return KeystoreManager.managerForPath(path, scanForHDwallets: true, suffix: "json") } static func getWalletAddress () -> String? { return getKeystoreManager()?.addresses.first?.address } }
PLEASE LET ME KNOW IF THERE SNY ISSUE
https://github.com/veerChauhan/web3swift/commit/f794d34ec62d508030c2dbd143649d5aba3199ea
update your Podfile pod 'web3swift', :git => 'https://github.com/skywinder/web3swift.git' then pod update
This problem is caused since the latest official release of web3swift is a bit old and uses CryptoSwift 1.0.0. If you can update CryptoSwift from 1.0.0 to ~> 1.3.2, the problem must be solved. https://github.com/skywinder/web3swift/pull/330 fixes this problem. You can refer to also this issue.
update your Podfile
pod 'web3swift', :git => 'https://github.com/skywinder/web3swift.git'
thenpod update
This is a good solution and will work when you use Podfile
in a project whose dependencies are managed by CocoaPods.
Here is the same issue but in a different place.
When developing a framework and using *.podspec
there is no option to specify the source URL (correct me if I'm wrong) making it impossible to use web3swift
as a dependency because it fails on pod lib lint
. https://github.com/CocoaPods/CocoaPods/issues/4921#issuecomment-801286927
Note that there is an Unreleased version of the web3swift in CocoaPods repository that will solve this issue: https://cocoapods.org/pods/web3swift#changelog

Here is my podspec:
Pod::Spec.new do |s|
s.name = 'my-framework'
s.version = '0.1.0'
s.summary = 'My first framework'
s.description = <<-DESC
My first framework: the main goal is to learn.
DESC
s.homepage = 'https://github.com/JeneaVn/my-framework'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Evghenii Vranceanu (JeneaVn)' => '[email protected]' }
s.source = { :git => 'https://github.com/JeneaVn/my-framework.git', :tag => s.version.to_s }
s.ios.deployment_target = '11.0'
s.swift_version = '5.0'
s.source_files = 'my-framework/Classes/**/*'
s.dependency 'Alamofire', '~> 5.4'
s.dependency 'web3swift', '~> 2.3.0'
end
Here is the output of pod lib lint --no-clean
:
$ pod lib lint --no-clean
-> my-framework (0.1.0)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Building targets in parallel
- NOTE | xcodebuild: note: Using codesigning identity override: -
- NOTE | xcodebuild: note: Build preparation complete
- NOTE | [iOS] xcodebuild: note: Planning build
- NOTE | [iOS] xcodebuild: note: Analyzing workspace
- NOTE | [iOS] xcodebuild: note: Constructing build description
- NOTE | [iOS] xcodebuild: Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Starscream' from project 'Pods')
- NOTE | [iOS] xcodebuild: Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'secp256k1.c' from project 'Pods')
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/Generics.swift:17:28: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/Generics.swift:35:28: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/Generics.swift:36:28: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/Generics.swift:37:28: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/Generics.swift:38:28: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/Generics.swift:39:28: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/Generics.swift:40:28: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift:18:32: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift:23:32: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift:27:32: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift:32:32: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift:18:32: error: 'exported: true' has no effect in '_specialize' attribute
- ERROR | [iOS] xcodebuild: CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift:23:32: error: 'exported: true' has no effect in '_specialize' attribute
- NOTE | [iOS] xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
- NOTE | [iOS] xcodebuild: Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'PromiseKit' from project 'Pods')
- NOTE | [iOS] xcodebuild: Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'CryptoSwift' from project 'Pods')
- NOTE | [iOS] xcodebuild: Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'BigInt' from project 'Pods')
Pods workspace available at `/var/folders/3z/855j620160l9bh2l3tfq547r0000gn/T/CocoaPods-Lint-20210908-87862-1tgfi88-my-framework/App.xcworkspace` for inspection.
[!] my-framework did not pass validation, due to 14 errors.
@skywinder Maybe there is something blocking you from releasing the "Unreleased" version?