HwangTaehyun / react-native-lottie-splash-screen

⚡ Lottie splash screen for your react native app!
MIT License
222 stars 62 forks source link

use of undeclared identifier 'Dynamic' [IOS] #22

Closed sainyanhtay closed 3 years ago

sainyanhtay commented 3 years ago

I already created Dynamic.Swift in the root of the ios folder. but when I try to build IOS, error shown like the following in the AppDelegate.m

error: use of undeclared identifier 'Dynamic' in Dynamic *t = [Dynamic new];

How can I solve, Thanks

sainyanhtay commented 3 years ago

it's solved by adding that file from Xcode. Thanks

ariffathur commented 2 years ago

hey @sainyanhtay can you provide where exactly the file should be put?

sainyanhtay commented 2 years ago

@ariffathur you should open the project by Xcode and create a new file in that workspace instead of creating file from file manager or vscode. it will create one file in the ios folder of your react native project.

analaurafernandes commented 2 years ago

I'm still having this issue... I created the Dynamic.swift and header files directly from xCode as you said... any other idea?

HwangTaehyun commented 2 years ago

Hi @analaurafernandes, have you ever tried the following step? https://github.com/HwangTaehyun/react-native-lottie-splash-screen#:~:text=To%20use%20swift,the%20appropriate%20names%3A

analaurafernandes commented 2 years ago

@HwangTaehyun Thanks for your answer! Curiously what solved my problem was to import "projectName-Swift.h" inside AppDelegate.h instead of inside AppDelegate.m... Now the splash screen is working very well :)

HwangTaehyun commented 2 years ago

@analaurafernandes Oh, I see! Good!!