Closed girish54321 closed 3 years ago
I think I had a similar problem in the past. Have you tried the solutions of the stack overflow articles below?
https://stackoverflow.com/questions/26328034/importing-project-swift-h-into-a-objective-c-class-file-not-found https://stackoverflow.com/questions/47679450/project-swift-h-file-not-found/47679927
First of all, it would be nice to try the following things first.
Thank you!
@HwangTaehyun ok.
@girish54321 Let me know if that worked for you. I am facing the same issue
@KawaljeetCuelogic Sure will update the issue.
Hi @KawaljeetCuelogic and @HwangTaehyun iOS build is successfully now the splash screen shows up nicely
but i want to know how can i remove the default splash view LaunchScreen.storyboard
1) default splash view LaunchScreen.storyboard
2) The react-native-lottie-splash-screen
Incase any one having issues with build this is how your project should look like
At first, I have searched many articles about changing ios's LaunchScreen.storyboard with lottie animation. However, Xcode enforces that LaunchScreen.storyboard should be static screen. So, I inserted animation code after static launch screen loading. Maybe, launch screen is essential, because it is loading screen for initial loading resource in ios. If you remove the launch screen, then ios app shows black or white screen at first loading. https://stackoverflow.com/questions/37975826/remove-launch-screen-xcode-7
Hi all, closing this issue. all of my issues are resolved now.
@girish54321 Be good if you add some pointers on the error we faced about
Hi @KawaljeetCuelogic when you create the .swift
file xcode well ask you to create Bridging-Header.h
say YES there.
and for "No such module 'Lottie'" error I didyarn add lottie-react-native
and cd ios && pod install
and after that build successfully 🎉🥂 .
my project link note :.json
is missing in the repo for iOS
@girish54321 Where in the code should we place splash.json lottie file for iOS?
@KawaljeetCuelogic loding.json Check the image below
Ok thanks @girish54321 . I am always getting
@KawaljeetCuelogic have you tried this link
Hi, @girish54321 I have seen your Github project but I am still experiencing the following issue:
Mobile-Swift.h' file not found
.
As well as this in the Dynamic.swift
:
Cannot find 'RNSplashScreen' in scope
Any suggestions?:
Here is my Dynamic.swift:
import Foundation
import Lottie
@objc class Dynamic: NSObject {
@objc func createAnimationView(rootView: UIView, lottieName: String) -> AnimationView {
let animationView = AnimationView(name: lottieName)
animationView.frame = rootView.frame
animationView.center = rootView.center
animationView.backgroundColor = UIColor.white;
return animationView;
}
@objc func play(animationView: AnimationView) {
animationView.play(
completion: { (success) in
RNSplashScreen.setAnimationFinished(true)
}
);
}
}
Here is my Mobile-Bridging-Header.h
#ifndef Mobile_Bridging_Header_h
#define Mobile_Bridging_Header_h
#import "RNSplashScreen.h" // here
#endif /* HyperMoney_Bridging_Header_h */
@mayfairr try doing yarn add lottie-react-native
after i added this package the error gone and do clean iOS project.
@mayfairr try doing
yarn add lottie-react-native
after i added this package the error gone and do clean iOS project.
Yes the problem with the [projectName]-Swift.h
was that the project name was not named correctly. To fix this I simply went to:
[projectName] > Build Settings > All > Swift Compiler General > Objective-C Generated Interface Header Name
So Error is gone @mayfairr ?
So Error is gone @mayfairr ?
Yes 🚀
@mayfairr 😄😄 Nice
@mayfairr 😄😄 Nice
i get error: "Undefined symbol: _swift_getOpaqueTypeConformance?" how to fix it?
@girish54321 How do you remove the default splashscreen ?
We can't remove @vinay-sayone I have asked @HwangTaehyun here
I am getting the same error on react-native 0.74.3. I have tried all the solutions mentioned here.
Run
react-native info
in your project and share the content.info Fetching system and libraries information... (node:22236) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use
node --trace-warnings ...to show where the warning was created) System: OS: macOS 11.1 CPU: (16) x64 Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz Memory: 26.45 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.5 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.5.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.6953283 Xcode: 12.3/12C33 - /usr/bin/xcodebuild Languages: Java: 15.0.1 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found
Whatreact-native-splash-screen
version are you using?"react-native-splash-screen": "^3.2.0",
What platform does your issue occur on? (Android/iOS/Both) Both Describe your issue as precisely as possible : 1) I folled the dosc for iOS but its says #import "AwesomeProject-Swift.h" not found is XCode 2)Join a screenshot or video of the problem on the simulator or device?
Show us the code you are using?