przelewy24 / p24-mobile-lib-flutter

Other
11 stars 1 forks source link

ApplePayRegistrarChannel.swift:14:29 - Swift Compiler Error (Xcode) #13

Closed lunching-patryk-konieczny closed 2 years ago

lunching-patryk-konieczny commented 2 years ago

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.1, on macOS 12.6 21G115 darwin-arm, locale en-PL)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.2.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'

pubspec.yaml

environment:
  sdk: '>=2.12.0 <3.0.0'
p24_sdk: ^1.0.48

flutter run gives error:

Swift Compiler Error (Xcode): Value of optional type '[String : Any]?' must be unwrapped to refer to member 'subscript' of wrapped base type '[String : Any]'
/Users/patrykkonieczny/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/p24_sdk-1.0.48/ios/Classes/ApplePay/ApplePayRegistrarChannel.swift:14:29

1.0.38 is last version successfully compiled

mareklat commented 2 years ago

@lunching-patryk-konieczny Thank you for all informations. Have you checked if you have the same error in our example?

lunching-patryk-konieczny commented 2 years ago

Yes, I have checked and the example app was working fine. The only difference I found was with swift_version in Xcode settings. Setting it to version 5 fixed the problem with p24 lib, but to do that I have to recreate iOS platform in flutter project, (but that was some problem with old version of flutter that we first used when starting our project 3 years ago).