Thursday, April 4, 2019

ReactNative, pod install, Archive faliled with duplicate *.o

I resolved this issue and succesfully implemented GMaps on IOS simulator by the followings:
(ref.: http://stackoverflow.com/questions/24298144/duplicate-symbols-for-architecture-x86-64)
  1. Open Xcode > Pods > Targets Support Files > Pods-{TARGET-NAME}
  1. find "OTHER_LDFLAGS" and remove only "-ObjC" in these two files:
  1. Pods-{TARGET-NAME}.release.xcconfig & Pods-{TARGET-NAME}.debug.xcconfig
  1. Go to project main target > Build Settings > Other Linker Flags:
  1. Make sure no "-ObjC" is left in the value
  1. I deleted the build/Build folder in ios and run-ios again. It works now.
  1. Also make sure you have enable Google Maps SDK for iOS on Google APIs console (only enabling API key will not success)
Side effects from the link above: the app may become larger as there may be duplicated symbols during compile
Hope can help you.
P.S. Not yet try on real device

No comments: