flutter_string_encryption
flutter_string_encryption copied to clipboard
xcode 10 build issues
Hi.
I just installed the plugin and get the following:
(my podfile has:) platform :ios, '9.0'
Xcode's output: ↳ === BUILD TARGET SCrypto OF PROJECT Pods WITH CONFIGURATION Debug === /Users/sam/dev2/chess6/client/chesstime/ios/Pods/SCrypto/Source/SCrypto.swift:107:111: warning: using '!' is not allowed here; treating this as '?' instead typealias Function = (_ data: UnsafeRawPointer, _ len: CC_LONG, _ md: UnsafeMutablePointer<UInt8>) -> UnsafeMutablePointer<UInt8>! ^ ~ ? === BUILD TARGET flutter_string_encryption OF PROJECT Pods WITH CONFIGURATION Debug === /Users/sam/dev2/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_string_encryption-0.2.0/ios/Classes/FlutterStringEncryptionPlugin.m:2:9: fatal error: 'flutter_string_encryption/flutter_string_encryption-Swift.h' file not found #import <flutter_string_encryption/flutter_string_encryption-Swift.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Could not build the application for the simulator. Error launching application on iPhone 8 Plus.
Same here. Did you find a solution to this?
Same error,Have any solution?
Have you added use_frameworks! inside the Podfile?
i add use_frameworks! also has this error,
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET webview_flutter OF PROJECT Pods WITH CONFIGURATION Debug ===
/DATA/Work/DEV/Dart/Flutter/workspace/apcc_wallet/ios/Pods/SCrypto/Source/SCrypto.swift:107:111: error: using '!' is not allowed here; perhaps '?' was intended?
typealias Function = (_ data: UnsafeRawPointer, _ len: CC_LONG, _ md: UnsafeMutablePointer<UInt8>) -> UnsafeMutablePointer<UInt8>!
^ ~
?
/DATA/Work/DEV/Dart/Flutter/workspace/apcc_wallet/ios/Pods/SCrypto/Source/SCrypto.swift:188:5: warning: 'public' modifier is redundant for instance method declared in a public extension
public func MD2() -> Self {
^~~~~~~
/DATA/Work/DEV/Dart/Flutter/workspace/apcc_wallet/ios/Pods/SCrypto/Source/SCrypto.swift:198:5: warning: 'public' modifier is redundant for instance method declared in a public extension
public func MD4() -> Self {
^~~~~~~
/DATA/Work/DEV/Dart/Flutter/workspace/apcc_wallet/ios/Pods/SCrypto/Source/SCrypto.swift:208:5: warning: 'public' modifier is redundant for instance method declared in a public extension
public func MD5() -> Self {
@sroddy
Same problem. Anyone found the solution?
Not sure what caused this problem, but I think I found the solution :
- make sure your create a fresh, empty Flutter project with the Swift support ON MAC (you choose this when you create the project in Android Studio). If you created the project on Windows, this error will still show.
- copy pubspec.yaml, everything from lib folder and any other directories and files your project needs into the new freshly created project on MAC
- open ios/workspace file in XCode and set your signing info - and everything else necessary
- edit Podspec inside iOS dir and just uncomment "platform :ios, '9.0'". No need to change anything else
- connect your device/emulator and type "flutter run" - it should work
Tried on latest Catalina 10.15 and latest XCode 11.3.1
Hi there - just in case anyone is still searching: It's due to an update of the Swift language. You can change the language version in Xcode to use the old version instead. Make sure to change it for Pods > SCrypto.
See:
https://github.com/dart-lang/crypto/issues/85#issuecomment-584256548
To change this in the Podfile, see: https://stackoverflow.com/questions/50458556/flutter-swift-version-must-be-set-to-a-supported-value
Adding
config.build_settings['SWIFT_VERSION'] = '4.2' # required by scrypto
to post_install worked for me.
Hi there - just in case anyone is still searching: It's due to an update of the Swift language. You can change the language version in Xcode to use the old version instead. Make sure to change it for
Pods > SCrypto. See: dart-lang/crypto#85 (comment)To change this in the Podfile, see: https://stackoverflow.com/questions/50458556/flutter-swift-version-must-be-set-to-a-supported-value
Adding
config.build_settings['SWIFT_VERSION'] = '4.2' # required by scryptoto
post_installworked for me.
@KarimGeiger thankyou it was work for me