meili-travel-tech / flutter_meili

Flutter plugin integrating Meili SDK
0 stars 0 forks source link

Can't build the example #3

Open lenaYeliieshvili opened 1 month ago

lenaYeliieshvili commented 1 month ago

I tried to build a sample and add your lib to my project but with no success. Could you please help me with this? Logs are provided below.

Failed to build iOS app

Swift Compiler Error (Xcode): Cannot find type 'BookingParams' in scope /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliViewFactory.swift:139:53

Swift Compiler Error (Xcode): Generic parameter 'E' could not be inferred /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliViewFactory.swift:108:79

Swift Compiler Error (Xcode): Generic parameter 'U' could not be inferred /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliViewFactory.swift:108:79

Swift Compiler Error (Xcode): Converting non-escaping value to '([String : Any]) throws(E) -> U?' may allow it to escape /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliViewFactory.swift:108:87

Swift Compiler Error (Xcode): Extra arguments at positions #2, #5 in call /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliViewFactory.swift:109:41

Swift Compiler Error (Xcode): Argument 'driverAge' must precede argument 'pickupDateTime' /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliViewFactory.swift:189:8

Swift Compiler Error (Xcode): Generic parameter 'E' could not be inferred /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliFlutterPlugin.swift:55:75

Swift Compiler Error (Xcode): Generic parameter 'U' could not be inferred /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliFlutterPlugin.swift:55:75

Swift Compiler Error (Xcode): Converting non-escaping value to '([String : Any]) throws(E) -> U?' may allow it to escape /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliFlutterPlugin.swift:55:83

Swift Compiler Error (Xcode): Extra arguments at positions #2, #5 in call /.pub-cache/hosted/pub.dev/meili_flutter_ios-0.1.2/ios/Classes/MeiliFlutterPlugin.swift:57:37

Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code

And when I added it to my project, I got this error Unable to find a specification for MeiliSDK (~> 1.0.50) depended upon by meili_flutter_ios

meili-henrique-marques commented 1 month ago

Hi, @lenaYeliieshvili

Thanks for raising the issue.

A new version of the plugin was released here: https://pub.dev/packages/meili_flutter, and the iOS implementation was updated.

When running again:

  1. Make sure you clean the caches for the pub-cache and pods
  2. You are using the new version of the meili_flutter that is 0.2.0

Please, let us know if you find any other issues.

lenaYeliieshvili commented 3 weeks ago

Thanks, I managed to build the sample and our project but meili connect widget is constantly loading without any error logs. I tried these data.

MeiliConnectWidget(
                ptid: '125.10',
                env: 'uat',
                availParams: AvailParams(
                  pickupLocation: 'BCN',
                  dropoffLocation: 'BCN',
                  pickupDateTime: DateTime.parse('2025-01-19T14:38:34.301Z'),
                  dropoffDateTime: DateTime.parse('2025-01-28T14:38:34.301Z'),
                  driverAge: 25,
                  currencyCode: 'EUR',
                  residency: 'IE',
                ),
              ),

  MeiliConnectWidget(
                  ptid: '125.5',
                  env: 'uat',
                  onBookingInfoUpdated: (final bookingInfo) {
                    print('Booking info' + bookingInfo.toString());
                  },
                  availParams: AvailParams(
                    pickupLocation: 'ARN',
                    dropoffLocation: 'ARN',
                    pickupDateTime: DateTime.parse('2024-11-07T19:38:34.301Z'),
                    dropoffDateTime: DateTime.parse('2024-11-10T19:38:34.301Z'),
                    driverAge: 25,
                    currencyCode: 'SEK',
                    residency: 'IE',
                  ),
                )
meili-henrique-marques commented 3 weeks ago

Hi, @lenaYeliieshvili

We found a bug in the current release and have a fix. Until then, you can try with MUC (Munich Airport).

Let us know if it loads with MUC.

Thanks

lenaYeliieshvili commented 3 weeks ago

Yes, it works with MUC. Thanks a lot. Can we provide an option for a fallback widget if MeiliConnectWidget fails for some reasons so it wouldn't impact whole widget tree?
Also, is any widget customisation available?

meili-henrique-marques commented 2 weeks ago
  1. Yes, we have raised a task to ensure that the user is shown a message that they should try again.
  2. For customisation, we restyle the app to match the brand guidelines provided, and any additional changes can be raised via our Help Center: https://meili.atlassian.net/servicedesk/customer/portals
lenaYeliieshvili commented 2 weeks ago

Also, is there any reason why we use ios 16 as minimum version? as we have quite a lot of users with lower OS versions