lottie-ios | iOS library to natively render | Animation library

 by   airbnb Swift Version: 4.4.1 License: Apache-2.0

kandi X-RAY | lottie-ios Summary

kandi X-RAY | lottie-ios Summary

lottie-ios is a Swift library typically used in User Interface, Animation, React Native applications. lottie-ios has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

An iOS library to natively render After Effects vector animations
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              lottie-ios has a medium active ecosystem.
              It has 24113 star(s) with 3512 fork(s). There are 471 watchers for this library.
              There were 7 major release(s) in the last 6 months.
              There are 24 open issues and 1217 have been closed. On average issues are closed in 105 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of lottie-ios is 4.4.1

            kandi-Quality Quality

              lottie-ios has 0 bugs and 0 code smells.

            kandi-Security Security

              lottie-ios has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              lottie-ios code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              lottie-ios is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              lottie-ios releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lottie-ios
            Get all kandi verified functions for this library.

            lottie-ios Key Features

            No Key Features are available at this moment for lottie-ios.

            lottie-ios Examples and Code Snippets

            Custom Lottie animation not working in React Native
            JavaScriptdot img1Lines of Code : 9dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            yarn add lottie-react-native@3.0.2
            yarn add lottie-ios@3.0.3
            
            npm i --save lottie-react-native@3.0.2
            npm i --save lottie-ios@3.0.3
            
            react-native link lottie-ios
            react-native link lottie-react
            copy iconCopy
            yarn add lottie-react-native@3.0.2
            yarn add lottie-ios@3.0.3
            
            npm i --save lottie-react-native@3.0.2
            npm i --save lottie-ios@3.0.3
            
            react-native link lottie-ios
            react-native link lottie-react

            Community Discussions

            QUESTION

            How to unit test iOS package with `swift test`?
            Asked 2022-Mar-07 at 14:58

            I have an iOS library with Swift package manager. I am trying to run unit tests with swift test The reason why I am not using xcodebuild is, I am trying to remove the .xcodeproj from my source control. Also, there is a warning when we create xcodeproj with spm, that generate-xcodeproj will be deprecated soon. TL;DR This library depends on Lottie I tried just running swift test in the root directory, but it gives lot of errors. like /.build/checkouts/lottie-ios/lottie-swift/src/Public/Animation/AnimationView.swift:859:11: error: cannot find 'superview' in scope I tried

            ...

            ANSWER

            Answered 2022-Mar-07 at 14:58

            swift test only works for macOS testing. It does not support cross builds for iOS.

            You do not need an existing Xcode project to use xcodebuild. Run the command, xcodebuild -list to initialize a Package.swift file for testing.

            See the example here.

            Source https://stackoverflow.com/questions/71357915

            QUESTION

            XCODE 13 create own framework with dependencies
            Asked 2021-Oct-13 at 09:59

            i am creating my custom framework with dependency(Alamofire,SVGKit,lottie, etc)

            my problem is when i created it and import locally it works fine but when i import via pod its not working.

            [![enter image description here][1]][1]

            when i import it like above picture its working

            then i created podspec file like below, passed the validation then i pushed framework and podspec file on github.

            ...

            ANSWER

            Answered 2021-Oct-13 at 09:59

            I have added below code in my test.podspec file and upload on my github address with podfile and podfile.lock and it worked.

            Source https://stackoverflow.com/questions/69524569

            QUESTION

            bash Match contents of 2 files and append string to matching lines
            Asked 2021-Sep-22 at 07:43

            I am working on Mac OS and I am new to shell. I am having 2 files one Main.txt its contents are :

            ...

            ANSWER

            Answered 2021-Sep-22 at 07:43

            This matches each line from Modules.txt in Main.txt and appends , :binary => true to the line. It's fragile but assuming that the input data would be in a similar format to the one given in the question, it will work fine.

            Source https://stackoverflow.com/questions/69279378

            QUESTION

            No podspec found for `react-native-image-picker` in `../node_modules/react-native-image-picker`
            Asked 2021-Aug-22 at 08:16

            I got clone to a repo and I installed node modules correctly without any errors, but when I run pod install in the command line, I get that error,

            Ignoring unf_ext-0.0.7.6 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.6 Auto-linking React Native modules for target maltevinder: RNCAsyncStorage, RNCMaskedView, RNDateTimePicker, RNFastImage, RNGestureHandler, RNReanimated, RNScreens, RNVectorIcons, lottie-ios, lottie-react-native, react-native-cookies, react-native-document-picker, react-native-restart, and react-native-safe-area-context Analyzing dependencies Fetching podspec for DoubleConversion from ../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec Fetching podspec for Folly from ../node_modules/react-native/third-party-podspecs/Folly.podspec Fetching podspec for glog from ../node_modules/react-native/third-party-podspecs/glog.podspec [!] No podspec found for react-native-image-picker in ../node_modules/react-native-image-picker

            That's my Podfile

            ...

            ANSWER

            Answered 2021-Aug-22 at 08:16

            first make sure that you installed react-native-image-picker library, or delete that part if you don't want to use that library

            Source https://stackoverflow.com/questions/68844420

            QUESTION

            The following Swift pods cannot yet be integrated as static libraries
            Asked 2021-Aug-17 at 20:41

            Whenever I tries to do pod install it gives me this error

            Downloading dependencies
            Installing BVLinearGradient (2.5.6)
            Installing CocoaAsyncSocket (7.6.5)
            Installing DoubleConversion (1.1.6)
            Installing FBLazyVector (0.64.0)
            Installing FBReactNativeSpec (0.64.0)
            Installing Flipper (0.75.1)
            Installing Flipper-Boost-iOSX (1.76.0.1.11)
            Installing Flipper-DoubleConversion (1.1.7)
            Installing Flipper-Fmt (7.1.7)
            Installing Flipper-Folly (2.6.9)
            Installing Flipper-Glog (0.3.6)
            Installing Flipper-PeerTalk (0.0.4)
            Installing Flipper-RSocket (1.4.3)
            Installing FlipperKit (0.75.1)
            Installing GoogleMaps (3.1.0)
            Installing GooglePlaces (3.1.0)
            Installing JGProgressHUD (2.2)
            Installing MDFInternationalization (2.0.0)
            Installing MaterialComponents (124.2.0)
            Installing MotionAnimator (4.0.1)
            Installing MotionInterchange (3.0.0)
            Installing OpenSSL-Universal (1.1.1100)
            Installing Pulsator (0.6.0)
            Installing RCT-Folly (2020.01.13.00)
            Installing RCTRequired (0.64.0)
            Installing RCTTypeSafety (0.64.0)
            Installing RNCAsyncStorage (1.15.2)
            Installing RNCCheckbox (0.5.7)
            Installing RNDeviceInfo (8.1.2)
            Installing RNGestureHandler (1.10.3)
            Installing RNImageCropPicker (0.36.0)
            Installing RNReanimated (2.1.0)
            Installing RNSVG (12.1.1)
            Installing RNScreens (3.1.1)
            Installing RNVectorIcons (8.1.0)
            Installing React (0.64.0)
            Installing React-Core (0.64.0)
            Installing React-CoreModules (0.64.0)
            Installing React-RCTActionSheet (0.64.0)
            Installing React-RCTAnimation (0.64.0)
            Installing React-RCTBlob (0.64.0)
            Installing React-RCTImage (0.64.0)
            Installing React-RCTLinking (0.64.0)
            Installing React-RCTNetwork (0.64.0)
            Installing React-RCTSettings (0.64.0)
            Installing React-RCTText (0.64.0)
            Installing React-RCTVibration (0.64.0)
            Installing React-callinvoker (0.64.0)
            Installing React-cxxreact (0.64.0)
            Installing React-jsi (0.64.0)
            Installing React-jsiexecutor (0.64.0)
            Installing React-jsinspector (0.64.0)
            Installing React-perflogger (0.64.0)
            Installing React-runtimeexecutor (0.64.0)
            Installing ReactCommon (0.64.0)
            Installing ReactNativeART (1.2.0)
            Installing ReactNativeLocalization (2.1.6)
            Installing TOCropViewController (2.6.0)
            Installing Yoga (1.14.0)
            Installing YogaKit (1.18.1)
            Installing ZIPFoundation (0.9.11)
            Installing boost-for-react-native (1.63.0)
            Installing glog (0.3.5)
            Installing iDenfySDK (6.3.0)
            Installing idenfy-react-native-sdk (1.6.0)
            Installing libevent (2.1.12)
            Installing lottie-ios (3.2.3)
            Installing react-native-google-places (3.1.2)
            Installing react-native-image-picker (3.3.2)
            Installing react-native-image-resizer (1.4.4)
            Installing react-native-maps (0.27.1)

            The Swift pod iDenfySDK depends upon MaterialComponents and JGProgressHUD, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

            If anyone know how to solve this issue

            ...

            ANSWER

            Answered 2021-Aug-17 at 20:41

            Doesn't it tell you already how to solve the issue?

            To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

            Source https://stackoverflow.com/questions/68823477

            QUESTION

            sed append string to the end of matching lines
            Asked 2021-Jul-08 at 09:09

            I am new to sed, I have a file which has below contents

            ...

            ANSWER

            Answered 2021-Jul-08 at 09:09

            EDIT: After working with OP, following version is working one. Which will do inplace save into Input_file itself. Will match the lines with matching pattern and add new value string to them.

            awk '/pod \047.*\047,[[:space:]]+(\047([0-9]+\.){1,}[0-9]+\047?)/ || /pod[[:space:]]+\047[[:alnum:]]+\047,[[:space:]]+:git[[:space:]]+=>[[:space:]]+\047git.*:(commit|branch)[[:space:]]+=>[[:space:]]+\047[[:alnum:]]+\047/{$0=$0 " :binary => true"} 1' file > temp && mv temp file

            Explanation of regex:

            • /pod \047.*\047,[[:space:]]+(\047([0-9]+\.){1,}[0-9]+\047?) Checking if line has pod(string) followed by ' till ' followed by comma space(s) followed by ' digits(1 or more occurrences) followed by .(this whole group's 1 or more occurrences) followed by [0-9]+\047? digits '(optional).
            • pod[[:space:]]+\047[[:alnum:]]+\047,[[:space:]]+:git[[:space:]]+=>[[:space:]]+\047git.*:(commit|branch)[[:space:]]+=>[[:space:]]+\047[[:alnum:]]+\047 explanation:

            Source https://stackoverflow.com/questions/68281111

            QUESTION

            Xcode error 'building for iOS Simulator, but linking in dylib built for iOS .. for architecture arm64' from Apple Silicon M1 Mac
            Asked 2021-Jun-14 at 09:55

            I have an app which compiles and runs fine in older Macs with Intel processors in physical devices & iOS simulators.

            The same app also compiles and runs fine from newer Apple Silicon Mac with M1 processor with physical iPhone devices, but, it refuse to be compiled for iOS simulator.

            Without simulator support, debugging turn around time gets gets really long so I am trying to solve this issue. Not to mention Xcode preview feature isn't working either which is annoying.

            The first error that I encountered without making any changes (but moved from Intel Mac to M1 Mac) is like below.

            building for iOS Simulator, but linking in dylib built for iOS, file '/Users/andy/workspace/app/Pods/GoogleWebRTC/Frameworks/frameworks/WebRTC.framework/WebRTC' for architecture arm64

            The Cocoapods library that I am using is GoogleWebRTC, and according to its doc, arm64 should be supported so I am baffled why above error is getting thrown. As I have said before, it compiles fine in real device which I believe is running on arm64.

            According to the doc..

            This pod contains the WebRTC iOS SDK in binary form. It is a dynamic library that contains the armv7, arm64 and x86_64 slices. Bitcode is not supported. Our currently provided API’s are Objective C only.

            I searched online and it appears there appears to be 2 workarounds for this issue.

            1. The first one is by adding arm64 to Excluded Architectures
            2. The second option is to mark Build Active Architecture Only for Release build.

            I don't exactly understand if above are necessary even when I am compiling my app on M1 Mac which is running under arm64 architecture, because the solution seems to be applicable only for for Intel Mac which does not support arm64 simulator, as for Intel Mac, simulators might have been running in x86_64, not with arm64, so solution #1 is not applicable in my case.

            When I adapt the second change only, nothing really changes and the same error is thrown.

            When I make both changes and tried building, I now get the following 2nd error during build. (not really 100% sure if I solved the 1st error / I might have introduced 2nd error in addition to 1st by adapting two changes)

            Could not find module 'Lottie' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator

            The second library that I am using is lottie-ios and I am pulling this in with a swift package manager. I guess what is happening is that because I excluded arm64 in build setting for iOS simulator, Xcode is attempting to run my app in x86_64. However, library is not supported running in x86_64 for some reason, and is throwing an error. I don't have much insights into what dictates whether or not library can run in x86_64 or arm64 so I couldn't dig to investigate this issue.

            My weak conclusion is that GoogleWebRTC cannot be compiled to run in iOS simulator with arm64 for some reason (unlike what its doc says), and lottie-ios cannot be compiled to run in iOS simulator with x86_64. So I cannot use them both in this case.

            Q1. I want to know what kind of changes I can make to resolve this issue...

            The app compiles and runs perfectly in both device & simulator when compiled from Intel Mac. The app compiles and runs fine in device when compiled from Apple Silicon Mac. It is just that app refuse to be compiled and run in iOS simulator from Apple Silicon Mac, and I cannot seem to figure out why.

            Q2. If there is no solution available, I want to understand why this is happening in the first place.

            I really wish not to buy old Intel Mac again just to make things work in simulator.

            ...

            ANSWER

            Answered 2021-Mar-27 at 20:15

            Answering my own question in a hope to help others who are having similar problems. (and until a good answer is added from another user)

            I found out that GoogleWebRTC actually requires its source to be compiled with x64 based on its source depo.

            For builds targeting iOS devices, this should be set to either "arm" or "arm64", depending on the architecture of the device. For builds to run in the simulator, this should be set to "x64".

            https://webrtc.github.io/webrtc-org/native-code/ios/

            This must be why I was getting the following error.

            building for iOS Simulator, but linking in dylib built for iOS, file '/Users/andy/workspace/app/Pods/GoogleWebRTC/Frameworks/frameworks/WebRTC.framework/WebRTC' for architecture arm64

            Please correct me if I am wrong, but by default, it seems that Xcode running in Apple M1 silicon seems to launch iOS simulator with arm arch type. Since my app did run fine on simulators in Intel Mac, I did the following as a workaround for now.

            1. Quit Xcode.
            2. Go to Finder and open Application Folder.
            3. Right click on Xcode application, select Get Info
            4. In the "Xcode Info Window" check on Open using Rosetta.
            5. Open Xcode and try running again.

            That was all I needed to do to make my app, which relies on a library that is not yet fully supported on arm simulator, work again. (I believe launching Xcode in Rosetta mode runs simulator in x86 as well..?? which explains why things are working after making the above change)

            A lot of online sources (often posted before M1 Mac launch on Nov/2020) talks about "add arm64 to Excluded Architectures", but that solution seems to be only applicable to Intel Mac, and not M1 Mac, as I did not need to make that change to make things work again.

            Of course, running Xcode in Rosetta mode is not a permanent solution, and Xcode slows down lil bit, but it is an interim solution that gets things going in case one of libraries that you are using is not runnable in arm64 simulator.. yet.

            Source https://stackoverflow.com/questions/65978359

            QUESTION

            CocoaPods could not find compatible versions for pod "Firebase/Everything"
            Asked 2021-May-22 at 10:44

            I am getting this error when I am trying to run my React Native app in iOS:

            ...

            ANSWER

            Answered 2021-Feb-02 at 20:08

            run command from the project root folder.

            if npm

            rm -rf node_modules package-lock.json

            if yarn

            rm -rf node_modules yarn.lock

            remove ^ from every package

            set package version from the concerned library if that version exists then ok, otherwise set version that actually exists

            run command

            npm install or yarn install

            then

            cd ios

            run command from ios folder

            rm -rf Pods Podfile.lock

            then

            pod install

            Source https://stackoverflow.com/questions/66016300

            QUESTION

            WatchOS: SDWebImageLottieCoder load new animation while watch app is running
            Asked 2021-Mar-24 at 09:23

            I'm following this tutorial to use Lottie animations library on WatchOS. It's working until I try to change the animation while the app is running. Even though I change it, the animation stays the same until I run the watch app from Xcode. (If I simply close the app and open again it doesn't change.) What I tried:

            • clearing the cache from the watch file system
            • clearing URLCache
            • clearing SDImageCache memory and disk
            ...

            ANSWER

            Answered 2021-Mar-24 at 09:23

            You were right that caching causes your problem. However, you didn't go deep enough.

            You use SDWebImageLottieCoder to display your animations, which in turn uses rlottie.

            According to their readme: "rlottie is a platform independent standalone c++ library for rendering vector based animations and art in realtime."

            The point is that the animation is cached by the rlottie framework, so neither clearing URLCache nor SDImageCache will solve this.

            The easiest way to solve this is to modify the code in the rlottie C++ library. In your Xcode project navigate to Pods -> Pods -> librlottie and look for the following file: lottieanimation_capi.cpp

            In this file search for the following code:

            Source https://stackoverflow.com/questions/66448091

            QUESTION

            Cannot load underlying module for 'Lottie' in a mult-iproject workspace
            Asked 2021-Feb-21 at 20:25

            I'm following this tutorial of clean swift But now I'm facing issues working with cocoapods. In summary I have a workspace created after run pod init and then I added 3 projects: presentation layer, domain layer and data layer.

            As you can see in the pictures, the RadarAir-15 is the original project(before run pod init).

            Podfile

            ...

            ANSWER

            Answered 2021-Feb-21 at 20:25

            Finally I had to add use_frameworks! :linkage => :static and all my problems are gone :)

            Source https://stackoverflow.com/questions/66275095

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install lottie-ios

            You can download it from GitHub.

            Support

            Lottie is a mobile library for Android and iOS that natively renders vector based animations and art in realtime with minimal code. Lottie loads and renders animations and vectors exported in the bodymovin JSON format. Bodymovin JSON can be created and exported from After Effects with bodymovin, Sketch with Lottie Sketch Export, and from Haiku.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i lottie-ios

          • CLONE
          • HTTPS

            https://github.com/airbnb/lottie-ios.git

          • CLI

            gh repo clone airbnb/lottie-ios

          • sshUrl

            git@github.com:airbnb/lottie-ios.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link