React Native build release: linker command failed with exit code 1 - ios

I'm trying to build an archive of my app developed in react native.
I keep getting the following error though:
I've browsed similar issues on github, like this one:
https://github.com/react-community/react-native-maps/issues/1691 but it's not relevant to my issue since I don't use maps.
I bet some of you have already came through this hell with releasing RN app, any help appreciated.

yes i am in this hell to! i think you have to do this:
xcode > your target > remove -IGTMSessionFetcher library from Libraries folder and "Linked Framwork and Libraries" section,hope this help

Related

IOS app development on Xcode (12 duplicate symbols for architecture x86_64

i'm following a tutorial for a login app with firebase and i have only one error i can't understand. I already searched online and i found somenthing similar here on stackoverflow but didn't understand the solution (it was too old).
This is the error:
Can you guys help me with that?
I looks like you are compiling duplicate source files.
Open PromisesObjC in the Project Navigator
Go to the Build Phases tab
Check the Compile Sources section for duplicates and remove the duplicate entry
Clean Build Folder
This occurs when you install Firebase via Swift Package Manager, and Google AdMobs SDK via CocoaPods. Unfortunately, this is how the current official documentation guides you. You end up with duplicated libraries in your project.
After trying many things, I've got rid of this issue by installing Firebase via Cocoapods as well.

React native base headers for ios not found

During the iOS linking phase, I started seeing errors for my React Native project.
React Native version: 0.41.2, 0.40, 0.39
All worked fine, I edited the Android version, React Native code didn't change, when this kind of linking errors started showing up with headers on /node_modules/react-native/React/Base/{RCTHeaderName.h} path not being found:
In file included from /Users/user/ReactNativeProject/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:9:
../react-native/React/Base/RCTBridgeModule.h:12:9: fatal error: 'React/RCTDefines.h' file not found
#import <React/RCTDefines.h>
^
In the Link Binary With Libraries I include the core React library
(libReact.a).
The location of the RCTLog.h is
PROJECTROOT/node_modules/react-native/React/Base/RCTLog.h, but the
import is #import <React/RCTLog.h>
Newly adding React.xcodeproj into Libraries doesn't help, Xcode's Product > Clean doesn't help, neither does restarting Xcode
react-native run-android works, react-native run-ios shows the error
File permissions set to the user executing react-native run-ios
Do you have Parallelize build option unchecked and React listed first in your build targets?
You can find this window in Xcode => Your project icon near the run button => Edit scheme => Build tab
Update:
solution on Facebook React-Native
https://github.com/facebook/react-native/issues/11813
============
This issue happened to me also.
It seems React.xcodeproj only recognise configuration Debug and Release. All of output of React.xcodeproj is written into Debug-iphonesimulator or Release-iphonesimulator.
That means if you have some configurations other than "Debug/Release", the output will still be written into Debug-iphonesimulator or Release-iphonesimulator, that is not what we want.
So the solution is to add a same configuration in React.xcodeproj to match the one of your own project.
For example, if you have "Debug/Release/Test/AppStore" 4 configurations in your own project, you have to make sure React.xcodeproj also has the same 4 configurations.
please click the "+" button of Configurations, then "Duplicate Release Configuration", and rename it according to you need.
It seems like there are a lot of reasons to be getting these 'missing headers' errors and I've tried a lot of things posted on Stack Overflow and nothing would work. Finally I stumbled upon the solution below that did work for me. Posting in case anyone else has the same issue ... its a bit obscure. For me it was caused by a build locations setting in Xcode that is apparently incompatible with vanilla React Native. The build locations setting that fixed this issue is shown here:
in XCode->Settings>Locations->Advanced... make sure your Build Location is not set to Legacy, it should be set to Unique
Note: the vanilla React Native application may have to be reinitialized from scratch with react-native init ... after changing this setting.
Add path/project folder/ios/Pods/Headers/Public in your Library's Build Settings -> Header Search Path. The issue will get resolved

Linker Error with SoundCloud iOS SDK

I am trying to link the frameworks needed for SoundCloud SDK based on this tutorial https://developers.soundcloud.com/docs/api/ios-quickstart#installation
It tells you to link libSoundCloudAPI.a, libSoundCloudUI.a, etc and they appear in my workspace folder when I add them but after I add them they appear red and Xcode cannot find them. When I build obviously I get a Mach -O Linker Error because Xcode cannot locate these files. I've searched through the frameworks as well and couldn't find them.
Any and all help is greatly appreciated.
I am afraid SoundCloud decided not to maintain anymore this library, so I decided to create my own one and publish it. Maybe it can help you.
ABMSoundCloudAPI on Github

Why do I get a Linker error on "-reexport_framework" while building dependencies on iOS?

I am following the instructions to test SoundCloud APIs on iOS. I added the neessary projects and the settings. But I get this error when I build the project. Can someone please decipher the error message?
Thanks!
Reference:https://developers.soundcloud.com/docs/api/ios-quickstart#installation
It looks like there's an architecture issue with your project and that framework. I think that sample project from SoundCloud is pretty old. Try setting Build Active Architecture Only to NO under Targets -> Your App -> Build Settings -> Architectures.
EDIT: I figured out some of the things you did wrong. Your project is set up a little weird. You don't have the correct Target Dependencies and binaries in Link Binaries With Libraries. Check the image below of what yours should look like:
I followed the instructions and created a sample project that builds. Feel free to check it out:
http://lieberman.nyc/sample_soundcloud_project_for_relatively_slow_on_stackoverflow.zip

iOS - GA - library not found

I am trying to add Google Analytics to my iOS app. I followed the step of Google's tutorial but now my projet doesnt compile and I have the following error message.
ld: library not found for -lGoogleAnalyticsServices
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I checked and the the library libGoogleAnalytics_debug.a is in my project folder so I dont understand where the problem comes from.
Does anyone have an idea how to fix this?
Many thanks
Go to your project > Build settings > search for the LIBRARY_SEARCH_PATHS and check their paths.
just put lGoogleAnalyticsServices.a near with myapp.xcodeproj, and drag library in your frameworks block in xcode
I also had this error and was able to fix it like this:
Go to the app project settings
Go to the General tab
Under Linked Frameworks and Libraries, drag libGoogleAnalyticsServices.a to be at the end of the list.
Order matters because if a dependency of said library isn't built first, Xcode won't be able to link it.

Resources