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

Generics.swift:17:28: 'exported: true' has no effect in '_specialize' attribute #363

Closed
jesuasir007 opened this issue Aug 18, 2021 · 10 comments
Labels
FAQ common questions tend to recur about web3 infra ready for review issue is resolved, a final review is needed before closing

Comments

@jesuasir007
Copy link

I have facing this issues when running ,this issues found in crypto swift frame work please check and fix it

@jesuasir007
Copy link
Author

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

@jesuasir007
Copy link
Author

let pkData = try! keystoreManager.UNSAFE_getPrivateKeyData(password: pw, account: ethereumAddress).toHexString()

@jesuasir007
Copy link
Author

jesuasir007 commented Aug 18, 2021

keystoreManager not found

@RaviRanjan-11
Copy link
Contributor

RaviRanjan-11 commented Aug 21, 2021

`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)
        }
    }
}`

@RaviRanjan-11
Copy link
Contributor

RaviRanjan-11 commented Aug 21, 2021

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

@RaviRanjan-11
Copy link
Contributor

RaviRanjan-11@f794d34

@HeHuiqi
Copy link

HeHuiqi commented Aug 24, 2021

update your Podfile
pod 'web3swift', :git => 'https://github.com/skywinder/web3swift.git'
then
pod update

@soharang
Copy link

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.
#330 fixes this problem.
You can refer to also this issue.

@JeneaVranceanu
Copy link
Collaborator

JeneaVranceanu commented Sep 8, 2021

update your Podfile
pod 'web3swift', :git => 'https://github.com/skywinder/web3swift.git'
then
pod 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. CocoaPods/CocoaPods#4921 (comment)

Note that there is an Unreleased version of the web3swift in CocoaPods repository that will solve this issue: https://cocoapods.org/pods/web3swift#changelog

Screen Shot 2021-09-08 at 11 35 05

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)' => 'jeneavranceanu@gmail.com' }
    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.

@JeneaVranceanu
Copy link
Collaborator

JeneaVranceanu commented Sep 8, 2021

@skywinder Maybe there is something blocking you from releasing the "Unreleased" version?

@Valter4578 Valter4578 added the ready for review issue is resolved, a final review is needed before closing label Dec 30, 2021
@Kristenlike1234 Kristenlike1234 added the FAQ common questions tend to recur about web3 infra label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FAQ common questions tend to recur about web3 infra ready for review issue is resolved, a final review is needed before closing
Projects
None yet
Development

No branches or pull requests

7 participants