ClaySolutions / ClaySDK

This SDK for iOS contains the most up-to-date frameworks for integrating Mobile Key technology into your own iOS applications.
https://saltoks.com/developers/connect/mobile-sdk-introduction/
MIT License
1 stars 1 forks source link

compiler error swift version #14

Open jhirshland-dackinc opened 2 years ago

jhirshland-dackinc commented 2 years ago

same as issue #2. running into again with Xcode 14 beta and the release of Swift 5.7

this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)', while this compiler is 'Apple Swift version 5.7 (swiftlang-5.7.0.113.202 clang-1400.0.16.2)'). Please select a toolchain which matches the SDK.

jakov-clay commented 2 years ago

Hi @jhirshland-dackinc , SDK should work with any swift compiler version. Which version are you using? 1.10.0? Do you have latest JustIN SDK from dropbox/drive folder?

hasibul-hasan-shuvo commented 2 years ago

Hi @jakov-clay , Hope you are doing well. I am getting the below error after Xcode 13.4.1 update.

Could not build the precompiled application for the device. Swift Compiler Error (Xcode): Compiling for iOS 11.0, but module 'VirgilCrypto' has a minimum deployment target of iOS 13.0: /Users/bs23/AndroidStudioProjects/entree_flutter/build/ios/Debug-dev-iphoneos/VirgilCrypto/VirgilCrypto.framework/Modules/VirgilCrypto.swiftmodule/arm64-apple-ios.swiftmodule /Users/bs23/AndroidStudioProjects/entree_flutter/build/ios/Debug-dev-iphoneos/XCFrameworkIntermediates/ClaySDK/ClaySDK.framework/Modules/ClaySDK.swiftmodule/arm64-apple-ios.swiftinterface:7:7

Swift Compiler Error (Xcode): Failed to build module 'ClaySDK'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)', while this compiler is 'Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)'). Please select a toolchain which matches the SDK. /Users/bs23/AndroidStudioProjects/entree_flutter/ios/Runner/AppDelegate.swift:2:7

jakov-clay commented 2 years ago

@hasibul-hasan-shuvo do you set minimum deployment target for you libraries in your Podfile? I can see VirgilCrypto requires minimum deployment target 9.0 (https://github.com/VirgilSecurity/virgil-crypto-x/blob/master/VirgilCrypto.podspec) I think after you resolve your issue with VirgilSDK, ClaySDK issue should also go away.

hasibul-hasan-shuvo commented 2 years ago

I had to set a minimum deployment target of 13.0 because of some other library. Is it mandatory to use 9.0?

jakov-clay commented 2 years ago

No, 9.0 is minimum, you can use any above. Your error says that you are compiling for 11 and you set min for your CocoaPods to 13.

jhirshland-dackinc commented 2 years ago

@jakov-clay I'm using pod 'ClaySDK', '~> 1.10.0'

Redownloaded JustIN SDK from March 2022 and experiencing same issue.

Also, I noticed another error: Compiling for iOS 11.0, but module 'VirgilCrypto' has a minimum deployment target of iOS 13.0

alistra commented 2 years ago
  installer.pods_project.build_configurations.each do |config|
    if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 13.0
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
    end
  end

@jhirshland-dackinc this in Podfile may fix your issue

alistra commented 2 years ago

Actually it doesn't fix the issue - it for some reason works with 9.0, but if we bump the post install script to 13.6 our app doesn't compile. It starts compiling with BUILD_LIBRARY_FOR_DISTRIBUTION set manually on the pod targets, but crashes at startup with.

CrashReporter Key:   d379174d34903447058ca951caaa81146cdd4613
Hardware Model:      iPhone12,8
Process:             SpaceOS [6377]
Path:                /private/var/containers/Bundle/Application/C193E042-F64E-4EAE-AB42-C116180DBBFF/SpaceOS.app/SpaceOS
Identifier:          io.spaceos.spaceos
Version:             8.5.0 (1)
AppStoreTools:       13F17a
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           io.spaceos.spaceos [670]

Date/Time:           2022-07-21 17:23:58.5239 +0200
Launch Time:         2022-07-21 17:23:58.4831 +0200
OS Version:          iPhone OS 16.0 (20A5312j)
Release Type:        Beta
Baseband Version:    3.50.04
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 4 Symbol missing
Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E
Referenced from: <F2F18A46-B18A-3769-A84D-B9330EDA3D4C> /Volumes/VOLUME/*/SpaceOS.app/Frameworks/ClaySDK.framework/ClaySDK
Expected in:     <94CAF510-5CAD-39D2-8E11-57258607F665> /Volumes/VOLUME/*/SpaceOS.app/Frameworks/VirgilCryptoFoundation.framework/VirgilCryptoFoundation
(terminated at launch; ignore backtrace)

Triggered by Thread:  0

Thread 0 Crashed:
0   dyld                                   0x21c7ea000 __abort_with_payload + 8
1   dyld                                   0x21c7f362c abort_with_payload_wrapper_internal + 104
2   dyld                                   0x21c7f3660 abort_with_payload + 16
3   dyld                                   0x21c798be4 dyld4::halt(char const*) + 328
4   dyld                                   0x21c796918 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 4088
5   dyld                                   0x21c79487c start + 2172

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000006   x1: 0x0000000000000004   x2: 0x000000016d36b410   x3: 0x00000000000001d7
    x4: 0x000000016d36b010   x5: 0x0000000000000000   x6: 0x000000016d369f10   x7: 0x000000016d36a9f8
    x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x0000000000000001  x11: 0x000000000000000a
   x12: 0x0000000000000000  x13: 0x0000000000000036  x14: 0x0000000107312283  x15: 0x000000016d36a1b8
   x16: 0x0000000000000209  x17: 0x000000021c7e68ec  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000016d36b010  x21: 0x00000000000001d7  x22: 0x000000016d36b410  x23: 0x0000000000000004
   x24: 0x0000000000000006  x25: 0x000000016d36f508  x26: 0x0000000000000000  x27: 0x0000000104d6ff88
   x28: 0x0000000227e2f700   fp: 0x000000016d36afe0   lr: 0x000000021c7f362c
    sp: 0x000000016d36afa0   pc: 0x000000021c7ea000 cpsr: 0x00000000
   far: 0x0000000227e301f0  esr: 0x56000080  Address size fault

Binary Images:
       0x21c77f000 -        0x21c800ad3 dyld arm64e  <3458f9136eef37d3b7a1e7b9a51df077> /usr/lib/dyld

EOF

@jakov-clay can you provide a version update recompiled with the BUILD_LIBRARY_FOR_DISTRIBUTION setting set to true? I think this should fix all our issues here.

I believe this also has to go to VirgilCrypto dependencies.

jakov-clay commented 1 year ago

@alistra Hi, since 1.9.0 version we are building ClaySDK with BUILD_LIBRARY_FOR_DISTRIBUTION set to true. Virgil libraries also have this. Maybe there is some script in your project or something else that deletes those frameworks? Are you building for simulator or real device? if it's real device which one? It might be that you are removing some archs from libraries? We are supporting arm64 for devices and arm64_x86_64 for simulator. Which version of Xcode are you using?

I can not reproduce your issue, for me all versions of ClaySDK (from 1.9.0) work on newest Xcode.

mlepicki commented 1 year ago

@mxndev This can be relevant for you