React-native-splash-screen: duplicate symbol _OBJC_CLASS_$_RNSplashScreen i

Created on 10 Mar 2019  路  7Comments  路  Source: crazycodeboy/react-native-splash-screen

duplicate symbol _OBJC_CLASS_$_RNSplashScreen in:
/Users/hanwenbo/Library/Developer/Xcode/DerivedData/nairenertao-aubkufeoxnzezxaaldrybkizmwep/Build/Products/Debug-iphonesimulator/react-native-splash-screen/libreact-native-splash-screen.a(RNSplashScreen.o)
/Users/hanwenbo/Library/Developer/Xcode/DerivedData/nairenertao-aubkufeoxnzezxaaldrybkizmwep/Build/Products/Debug-iphonesimulator/libSplashScreen.a(RNSplashScreen.o)
duplicate symbol _OBJC_METACLASS_$_RNSplashScreen in:
/Users/hanwenbo/Library/Developer/Xcode/DerivedData/nairenertao-aubkufeoxnzezxaaldrybkizmwep/Build/Products/Debug-iphonesimulator/react-native-splash-screen/libreact-native-splash-screen.a(RNSplashScreen.o)
/Users/hanwenbo/Library/Developer/Xcode/DerivedData/nairenertao-aubkufeoxnzezxaaldrybkizmwep/Build/Products/Debug-iphonesimulator/libSplashScreen.a(RNSplashScreen.o)
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Most helpful comment

@hanwenbo
How did you fix this error?

Edit: I removed the Library link > pod install > added back the library & it started working.

All 7 comments

"react-native-splash-screen": "^3.2.0",
"react-native": "0.58.6",

podfile error

@hanwenbo
How did you fix this error?

Edit: I removed the Library link > pod install > added back the library & it started working.

import #import "RNSplashScreen.m" instead of #import "RNSplashScreen.h"
This fixed my issue after getting this error in this line [RNSplashScreen show];

@SimonDrew2018 could you please help in solving this issue
https://github.com/crazycodeboy/react-native-splash-screen/issues/421#issue-486302895

@devilabhi sorry for the delay replying. From what I can remember, In XCode, remove SplashScreen.xcodeproj. I then removed libSplashScreen.a from the linked libraries in my projects Build Phases. Once they were removed I ran my pod install again and linked the library back following exactly what it says in the manual installation documentation.

I hope that helps.

You need to add this to your pod file: pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mharrisweb picture mharrisweb  路  3Comments

ijry picture ijry  路  5Comments

TsuryKnox picture TsuryKnox  路  5Comments

johndo31 picture johndo31  路  3Comments

jassonha21 picture jassonha21  路  3Comments