Open kaina404 opened 4 years ago
Hey @CameronStuartSmith and @kaina404
This problem is happening here too and the reason for that is the plugin name. When you add the plugin in the Flutter project, it has the mark922_flutter_lottie
name. Then, when you try to build the iOS project, Flutter looks for the .podspec
of the Plugin inside the following path: flutter/.pub-cache/hosted/pub.dartlang.org/mark922_flutter_lottie-0.2.1/ios
. If you check, the .podspec
is there but with a different name, thus Flutter is not able to find the file and this error is thrown.
Follow the steps to fix:
.podspec
name in the path above to mark922_flutter_lottie.podspec
.podspec
, change the s.name
value to mark922_flutter_lottie
Classes/FlutterLottiePlugin.m
and change the second import:
From:
#import "FlutterLottiePlugin.h"
#import <flutter_lottie/flutter_lottie-Swift.h>
To:
#import "FlutterLottiePlugin.h"
#import <mark922_flutter_lottie/mark922_flutter_lottie-Swift.h>
4. Have fun using Lottie for iOS
EDIT
You still need to update your Info.plist
to support iOS View Embedding:
<key>io.flutter.embedded_views_preview</key>
<true/>
@arctouch-matheusromao Thanks for pointing it out. Repo updated.
mark922_flutter_lottie: ^0.2.1
ERR0R on ios