nativescript-community / ui-lottie

NativeScript plugin to expose Airbnb Lottie
https://github.com/airbnb/lottie-android
Other
177 stars 57 forks source link

CocoaPods could not find compatible versions for pod "lottie-ios" #103

Closed kamilkafoor closed 1 year ago

kamilkafoor commented 1 year ago

I am working with Nativescript with Angular. Somehow '@nativescript-community/ui-lottie' didn't work and only 'nativescript-lottie' import worked along with the imports below in main.ts file:

`import "@angular/compiler";

import { platformNativeScript, runNativeScriptAngularApp } from '@nativescript/angular'; import { AppModule } from './app/app.module'; import { registerElement } from "@nativescript/angular"; import { LottieView } from '@nativescript-community/ui-lottie';

runNativeScriptAngularApp({ appModuleBootstrap: () => platformNativeScript().bootstrapModule(AppModule), });

registerElement('LottieView', () => LottieView);`

I am currently using the following package.json

"dependencies": { "@angular/animations": "^12.2.0", "@angular/common": "^12.2.0", "@angular/compiler": "^12.2.0", "@angular/core": "^12.2.0", "@angular/forms": "^12.2.0", "@angular/platform-browser": "^12.2.0", "@angular/platform-browser-dynamic": "^12.2.0", "@angular/router": "^12.2.0", "@nativescript/angular": "^12.2.0", "@nativescript/core": "~8.1.1", "@nativescript/theme": "~3.0.1", "crypto-js": "^4.1.1", "lottie-ios": "^3.1.9", "nativescript-lottie": "^5.0.4", "nativescript-oauth2": "^3.0.9", "nativescript-phone": "^3.0.2", "nativescript-ui-listview": "^10.0.2", "rxjs": "~7.3.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "^12.2.0", "@angular/cli": "^12.2.7", "@angular/compiler-cli": "^12.2.0", "@nativescript/android": "8.1.1", "@nativescript/ios": "^8.4.0", "@nativescript/schematics": "^11.2.0", "@nativescript/types": "~8.1.1", "@nativescript/webpack": "~5.0.0", "@ngtools/webpack": "^12.2.0", "sass": "^1.42.1", "typescript": "~4.3.5" }

In android it all works fine and neat. But when it comes to iOS compilation, it says: `[!] CocoaPods could not find compatible versions for pod "lottie-ios": In Podfile: lottie-ios (from https://github.com/farfromrefug/lottie-ios.git)

Specs satisfying the lottie-ios (fromhttps://github.com/farfromrefug/lottie-ios.git) dependency were found, but they required a higher minimum deployment target. 'arch install' command failed.`

I am not able to solve this in any way.

farfromrefug commented 1 year ago

It tells you what to do. New Lottie versions on iOS require a higher minimum iOS version. You can force it in your app Podfile

kamilkafoor commented 1 year ago

Hi @farfromrefug , but my minimum iOS version is kept at version 11 and tried increasing it to till 16 and is not accepting it in the following Podfile: -

`post_install do |pi| pi.pods_project.targets.each do |t| t.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end end end

post_install do |installer| installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end end`

farfromrefug commented 1 year ago

@kamilkafoor you need to add something like this platform :ios, '13.0'

kamilkafoor commented 1 year ago

@farfromrefug Thank you. It works now. It was kept for iOS version 9.0. That's the reason why it was not working. Once I updated as above it worked.