I did every step you mentioned in the installation (https://docs.microsoft.com/en-us/appcenter/sdk/getting-started/react-native) and all looked good until i tried to run-ios and got BUILD FAILED:
ld: framework not found AppCenter
clang: error: linker command failed with exit code 1
Im using:
"react-native": "^0.51.0",
"react": "^16.0.0",
"appcenter": "^1.1.0",
"appcenter-analytics": "^1.1.0",
"appcenter-crashes": "^1.1.0",
@rutmus
Can you provide the output of your
react-native link
command?
Configuring AppCenter
? What is the Android App Secret? *
App Secret for Android written to android/app/src/main/assets/appcenter-config.json
rnpm-install info Linking appcenter android dependency
rnpm-install info Android module appcenter has been successfully linked
rnpm-install info Linking appcenter ios dependency
rnpm-install info iOS module appcenter has been successfully linked
? What is the iOS App Secret? *
App Secret for iOS written to ios/paidit/AppCenter-Config.plist
Added code to initialize iOS AppCenter SDK in ios/paidit/AppDelegate.m
Setting up CocoaPods master repo
$ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
Cloning into 'master'...
remote: Counting objects: 1812898, done.
remote: Compressing objects: 100% (431/431), done.
remote: Total 1812898 (delta 202), reused 35 (delta 35), pack-reused 1812415
Receiving objects: 100% (1812898/1812898), 502.21 MiB | 1.48 MiB/s, done.
Resolving deltas: 100% (991238/991238), done.
Checking out files: 100% (205061/205061), done.
Setup completed
Analyzing dependencies
Downloading dependencies
Installing AppCenter (1.1.0)
Installing AppCenterReactNativeShared (1.1.0)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use paidit.xcworkspace for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
[!] Automatically assigning platform ios with version 8.0 on target paidit because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Configuring AppCenter Analytics
? For the Android app, should user tracking be enabled automatically? Enable Automatically
rnpm-install info Linking appcenter-analytics android dependency
rnpm-install info Android module appcenter-analytics has been successfully linked
rnpm-install info Linking appcenter-analytics ios dependency
rnpm-install info iOS module appcenter-analytics has been successfully linked
iOS App Secret is ** set in ios/paidit/AppCenter-Config.plist
? For the iOS app, should user tracking be enabled automatically? Enable Automatically
Added code to initialize iOS Analytics SDK in ios/paidit/AppDelegate.m
Analyzing dependencies
Downloading dependencies
Installing AppCenter 1.1.0 (was 1.1.0)
Using AppCenterReactNativeShared (1.1.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
[!] Automatically assigning platform ios with version 8.0 on target paidit because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Configuring AppCenter Crashes
Android App Secret is * set in android/app/src/main/assets/appcenter-config.json
? For the Android app, should crashes be sent automatically or processed in JavaScript before being sent? Automatically
rnpm-install info Linking appcenter-crashes android dependency
rnpm-install info Android module appcenter-crashes has been successfully linked
rnpm-install info Linking appcenter-crashes ios dependency
rnpm-install info iOS module appcenter-crashes has been successfully linked
iOS App Secret is * set in ios/paidit/AppCenter-Config.plist
? For the iOS app, should crashes be sent automatically or processed in JavaScript before being sent? Automatically
Added code to initialize iOS Crashes SDK in ios/paidit/AppDelegate.m
Analyzing dependencies
Downloading dependencies
Installing AppCenter 1.1.0 (was 1.1.0)
Using AppCenterReactNativeShared (1.1.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 2 total pods installed.
[!] Automatically assigning platform ios with version 8.0 on target paidit because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Running ios postlink script
"CodePush.h" header already imported.
"jsCodeLocation" already pointing to "[CodePush bundleURL]".
Could not determine correct xcode proj path to retrieve related plist file, there are multiple xcodeproj under the solution.
"CodePushDeploymentKey" already specified in the plist file.
Running android postlink script
"getJSBundleFile" is already overridden
"codepush.gradle" is already linked in the build definition
rnpm-install info Linking assets to ios project
rnpm-install info Linking assets to android project
rnpm-install info Assets have been successfully linked to your project
According to this output, appcenter pod dependencies have been installed correctly. Can you check if AppCenter framework was actually downloaded? It should be located here: YourProject -> ios -> Pods -> AppCenter -> AppCenter-SDK-Apple -> iOS. See if all 3 frameworks are there. If not you can try running pod install manually. Can you also list your pod file contents?
Hey, I reinstall and it worked perfectly! Not exactly sure what caused the issue. Thanks for the quick response!
I had this and resolved by making sure my frameworks search path included $(inherited) which it didn't. In XCode go to your main iOS target (then go over your other targets) in Build Setting search for 'framework search' find the 'Framework Search Path' and make sure you have $(inherited) in there.
@Amosel cool dude, I was just gonna post the very same thing.
I really think this should be documented somewhere in the readme, since it seems to be a common error. @bmourat If you would like, I can send a PR or something like that with that troubleshooting.
Hi, github is really not the central place for SDK documentation, our README will redirect you to http://docs.microsoft.com/en-us/appcenter which is the single place where we want to document everything to avoid having disconnects between multiple documentation locations.
Sure, no problem! Sorry about that and thank for clarifying !
If you want to contribute to docs, it's also an open source project, clicking the edit button on any page will bring up the github file that can be edited.
For example you can edit https://docs.microsoft.com/en-us/appcenter/sdk/troubleshooting/react-native
@Amosel thank you. I have been looking for this solution for a while. I came here from:-
Most helpful comment
I had this and resolved by making sure my frameworks search path included $(inherited) which it didn't. In XCode go to your main iOS target (then go over your other targets) in Build Setting search for 'framework search' find the 'Framework Search Path' and make sure you have $(inherited) in there.