Open dgalitsyn opened 1 year ago
Hi @dgalitsyn. Can you provide next information:
file /path/to/libVirgilCrypto.a
Hi @SergeySeroshtan,
Thank you for your reply.
- output of command file /path/to/libVirgilCrypto.a
-rw-r--r-- 1 denisgalitsyn staff 644696 24 May 16:52 libVirgilCrypto.a denisgalitsyn@Deniss-MacBook-Pro VirgilCrypto % file libVirgilCrypto.a libVirgilCrypto.a: current ar archive
- package manager that is used in the project: spm, cathage, cocoapods
I use cocoapods
- version of the ClaySDK
We have access to their newer version of the their SDK from their gitlab. Version 2.0.1. I think one of the devs from clay said they have a dependency on VirgilCrypto 6.1.0
- ideally provide example xcodeproject that reproduce this error
Unfortunately I cannot provide our version of the project. However there is a sample claysdk demo ios app from their gitlab, which has a simple podfile as follows, but you need gitlab username/password from clay to get access, which I am not sure if you do have.
source 'https://github.com/CocoaPods/Specs.git'
source 'https://{YOUR_REPO_USER}:{YOUR_TOKEN}@gitlab.com/claysolutions/public/clay-sdk-artefacts'
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
target 'Demo' do
platform :ios, '13.0'
pod 'ClaySDK', :git => 'https://gitlab.com/claysolutions/public/clay-sdk-artefacts', :tag => '2.0.1'
pod 'AppAuth'
end
target 'DemoWatchOS WatchKit Extension' do
platform :watchos, '7.0'
pod 'ClaySDK', :git => 'https://gitlab.com/claysolutions/public/clay-sdk-artefacts', :tag => '2.0.1'
end
Thanks. πΊπ¦πΊπ¦πΊπ¦
Just an addition to the above, if its any help. I had to set the Build Libraries for Distribution to NO for all of our pods as setting this to YES breaks the build and never compiles. Not sure if thats any help or not.
And our minimum target ios version is 13.
Hi @SergeySeroshtan, any update?
I'm a volunteer on this project. So responses and solving will be delayed for sure. Please, wait for a while. Thank you for understanding.
Hi @dgalitsyn. I've created a demo project based on VirgilSDK only, and it compiles and runs on iOS simulator. Please to reproduce this demo locally.
platform :ios, '13.0'
target 'VirgilSDKdemo' do use_frameworks! pod 'VirgilSDK', '~> 8.2' end
3. Put next content to `ContentView.swift`
```swift
import SwiftUI
import VirgilCrypto
extension Data {
struct HexEncodingOptions: OptionSet {
let rawValue: Int
static let upperCase = HexEncodingOptions(rawValue: 1 << 0)
}
func hexEncodedString(options: HexEncodingOptions = []) -> String {
let format = options.contains(.upperCase) ? "%02hhX" : "%02hhx"
return self.map { String(format: format, $0) }.joined()
}
}
struct ContentView: View {
func getHash() -> String {
do {
let greating = "hello"
let data = greating.data(using: .ascii)
let crypto = try VirgilCrypto()
let digest = crypto.computeHash(for: data!, using: .sha512);
return "sha512('\(greating)') = \(digest.hexEncodedString())"
} catch {
return "crypto error: \(error)"
}
}
var body: some View {
VStack {
Text("πΊπ¦πΊπ¦πΊπ¦");
Text(getHash())
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
pod install
Hi @SergeySeroshtan,
I think I have raised the issue on the wrong repo.
Can you try Xcode 14.3 and VirgilCrypto ~> 6.1.0 building for ios 13+ and without useframeworks?
This is the setup we use and I am getting the result I first described.
Thanks.
Hi @SergeySeroshtan,
I'm not sure if this is the correct repo to raise the issue.
I am getting a library not found error when compiling our app on XCode 14.2 or 14.3, please see below:
etc
This library is included by another dependency we use. However, not matter what I try, I am always get this error. However when I check the derived data folder, there is a VirgilCrypto folder with the following files in there: 96 24 May 13:09 Swift Compatibility Header 316 24 May 10:09 VirgilCrypto-umbrella.h 356 24 May 13:09 VirgilCrypto.modulemap 192 24 May 13:09 VirgilCrypto.swiftmodule 644696 24 May 13:09 libVirgilCrypto.a
This is a react native project, so not sure if this is something to go by. I am not an ios dev so not sure how to proceed here. Do you have any idea?
Regards, Denis.