Error in Intercom.bundle when trying to install 'Intercom' pod via Cocoapods - objective-c

When attempting to install the Intercom pod in my Xcode Project, I get an error in the console:
[Intercom] ERROR - 💥👎 The Intercom.bundle hasn't been added to your app correctly. This will result in images not appearing in the SDK's messaging UI. More information on how to correctly integrate Intercom is available here: https://developers.intercom.com/docs/ios-installation.

Seems something is not right with the way cocoapods installed Intercom. Maybe corrupt, by doing these step it will clear all the cocoapods and start fresh. Which might solve your problem.
Open your Podfile and copy the existing pods you have listed there (The Podfile is in your project directory).
Close your Xcode workspace.
Open Terminal
cd to the directory of your project.
run pod deintegrate from Terminal
delete all files and folders related to cocoapods (Podfile, Podfile.lock, Pods folder and the xcworkspace file) if there are any left.
run pod init from Terminal
add the list of pods to the Podfile in the directory save it.
run pod install from Terminal
Open xcworkspace file in your project folder.

Right click on files marked red in xcode -> delete, then it should be solved :)

Related

React Native IOS Build CFBundleIdentifier Does not Exist

I have create sample React Native project and following the tutorial as per react native website.
I have try to run the application IOS simulator, its throwing error as below ,
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Install\ Third\ Party /Users/Test/Documents/REACTJS/SampleReactNative/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/SampleReactNative.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/SampleReactNative.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
my environment setup information,
node version v9.8.0 npm version 5.6.0 react-native-cli: 2.0.1
react-native: 0.54.2 xcode 9.2
Please help us to resolve the issues.
I have the same problem right after init:
react-native init myapp
cd myapp
react-native run-ios
..although run-android was fine.
Not a solution but a workaround for the moment, maybe be to init using a lower version of RN:
react-native init myapp --version react-native#0.51.0
That builds okay.
Similar in an existing project, install an older version of RN.
Other versions before 0.54.2 might work but I haven't tried.
(edited 2018/4/2)
Found my solution from this link: https://github.com/facebook/react-native/issues/18238
RN 0.54 requires types available since iOS 11. So you have to upgrade your xcode and set minimum iOS version in your app to 11
In short, upgraded OSX & Xcode to the latest. (As of today, OSX 10.13.4 Xcode & 9.3)
This may happen because of some library files not found.You need to follow some steps That I have done and it is worked perfectly for me.
1.) go to Xcode project -> Target -> select build Phase -> Go to target dependies -> Click on + -> add "react" and press add.
2.) Xcode > Product -> scheme > manage sceme -> click on + button -> targetName(React) -> Okay -> make shared of this by select checkbox under shared column.
3.) Clean your project and try to build, If it is getting some error like "glog/logging.h file not found" or "cofig.h file not found" in Xcode and "CFBundleIdentifier not exist" then do not worry. You are just one step far. This is may occurs if you are missing config.h file, For this you need to update config.h file. For this
4.) follow below steps
a.) close your Xcode
b.) Open terminal with the project (Or you can directly left click your project and drag your folder to closed terminal, [It will automatically take the path from your that corresponding folder])
c.) write command
cd node_modules/react-native/third-party/glog-0.3.4/
d.) Run the configure scripted file by the command
./configure
e.) now close terminal and go to terminal with your project root path. now try final run your iOS project by
react-native run-ios
For XCODE 10.0,
I did two things
1) check out this answer
which basically says
Go to File -> Project settings
Click the Advanced button
Select "Custom" and select "Relative to Workspace" in the pull down
Change "Build/Products" to "build/Build/Products"
2) If (1) doesn't work for you then open your project from xcode
go to project navigator and select your project name --> go to info --> use debug for command-lines builds.
do this
3) go to terminal and react-native run-ios
Run the command:
react-native upgrade
react-native run-ios
or:
react-native run-android
Try to add CFBundleIdentifier in the Info.plist as:
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
I experienced this issue due to the xcode 12 upgrade, and I solved my problem by upgrading my rn by using this command:
react-native upgrade
then go to podfile change your:
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
to:
pod 'React-callinvoker', :path => "../node_modules/react-native/ReactCommon/callinvoker"
Do you have CFBundleIdentifier in your Info.plist?
If not than add it for eg. com.ios.learning
Usually, this error comes up due to inconsistent versions (either of react-native, OS or XCode). I had the same issue with react-native v0.57.0 on MacOS Sierra and XCode v9.x.
All I had to do was to upgrade to High Sierra and then XCode to v10.0.
Otherwise, you'd have to use an older version of react-native either by downgrading it
or by initialising a project with an older version
react-native init test --version react-native#0.x.x
In my case, just delete the build directory, Pods directory, node_modules directory and running yarn install, pod install and npx react-native run-ios solves the issue.
React Native is trying to install your app on a different app name for some reason. What you can do is in Xcode --> build settings --> packaging --> change the product name to the one given in the path which the simulator is trying to install.
Look at this: https://amala-gopal.medium.com/entry-cfbundleidentifier-does-not-exist-6098b90516f6
npm uninstall react-native
delete ios and android folder
then run :
npm install react-native
react-native upgrade

React-native Xcode build fails -> 'RCTAssert.h file not found'

I did exactly the steps which are described here in the React-native getting started guide:
https://facebook.github.io/react-native/docs/getting-started.html
When I open the Project and build it, the build fails:
RCTAssert.h file not found' in MyProjectNameTests.m .
What am I missing?
Here are the steps from the getting started guide:
Requirements
OS X - This repo only contains the iOS (7+) implementation right now,
and Xcode only runs on Mac.
Xcode 6.3 or higher is recommended.
Homebrew is the recommended way to install io.js, watchman, and flow.
Install io.js 1.0 or newer. io.js is the modern version of Node.
Install nvm with its setup instructions here. Then run nvm install
iojs-v2 && nvm alias default iojs-v2, which installs the latest
compatible version of io.js and sets up your terminal so that typing
node runs io.js. With nvm you can install multiple versions of Node
and io.js and easily switch between them.
New to npm?
brew install watchman. We recommend installing watchman, otherwise
you might hit a node file watching bug.
brew install flow. If you want to use flow. We recommend
periodically running brew update && brew upgrade to keep your
programs up-to-date.
Quick Start
npm install -g react-native-cli
react-native init AwesomeProject
In the newly created folder AwesomeProject/
Open AwesomeProject. xcodeproj and hit run in Xcode. Open index.ios.js
in your text editor of choice and edit some lines. Hit cmd+R in your
iOS simulator to reload the app and see your change!
The test application can't find the header because it's not in the header search path.
In the left hand file list, hit the top left "folder" icon, then select your application at top left. In this case "AwesomeProject".
To the right of that, where the application icon appears, hold down to change to AwesomeProjectTests.
On the right side, click on the 'Build settings' tab.
Then scroll down to Header Search Paths and change "$(SRCROOT)/node_modules/react-native/React" to "$(SRCROOT)/../node_modules/react-native/React".
The app should now compile.
I got the same issue as daniel but I already have the right path in xcode ...
0.10.0 is my version
It's an issue in 0.10.0, and it has been fixed just now.
You need to re-generate your project. Refer to this PR: https://github.com/facebook/react-native/pull/2474
seeing same issue here and it seems react-native is latest on 0.10.0, i was using 0.8.0 and was running fine. May be to disable the test target for now?
Before testing any option from the above mentioned solutions, just clean your xCode and build the app again. That helped me
I had the same issue (I just had changed my apple ID password). I needed to redo the code signing configuration.
This happened to me on a React Native project.
I rolled back my code to a version that I knew built successfully and still got this error. How is this even possible? There's two hours of my life I'll never get back. I write this here on the chance I save you from the same fate.
In my case when I jump from my IDE in which I code my react-native project over to Xcode I open it from Spotlight.
At this point it is so easy to click the wrong icon on the right hand side. I accidentally clicked on the Xcodeproj file instead of the Xcworkspace. Easy to do, once it loads everything looks exactly the same, I was none the wiser.
The only indication that something had gone wrong was the build errors. Worse this error looks like a dependency management issue sending you down completely the wrong path in a resolution attempt.
This is not just a React Native specific issue, but something all Cocoapod users need to remember.
ADD the React Path to Podfile
platform :ios, '9.0'
target 'YourProject' do
...
pod 'React', :path => '../node_modules/react-native'
end
target 'RNFirebaseTests' do
...
pod 'React', :path => '../node_modules/react-native'
end

React native RTCRootView.h not found

I'm trying to use React native and I am getting an error in xcode that says "Lexical or preprocessor error 'RTCRootView.h' not found." I have checked and this file is in the framework folder and I have tried moving it into the project as well and still have not been able to eliminate the error and successfully build.
In the example directory, run npm install to install the dependencies.
Then, open swipeoutExample.xcodeproj and run.
react-native-swipeout#15.
edit (2015-10-12):
react-native-swipeout has been updated to use the latest react-native including ./ios and ./android directories.
iOS: Open the xcode project in the ./ios directory and run it.
Android: Start a simulator, then run react-native run-android in project root directory. (note: swipeout is currently incompatible with Android, but will be soon.)
Running npm install might work for some people, but it didn't work for me.
What worked for me was in XCode > Product > Clean
Sometimes it might be because the node_modules folder is missing in your project directory.
Move the node_modules folder to your project
run npm install in your project directory
Just faced with the same error. In my case it was because of typing error. I replaced RTCRootView.h with RCTRootView.h (RCT is an abbreviation of ReaCT).

cocoa-pods failed to install pods for braintree framework in my app

I'm working on project in which I need to install braintree,
actually braintree was integrate and work fine but yesterday, it failed to compile with my project.
I am integrating Braintree SDK via Cocoa-pods and always open workspace instead of opening project file.
In start, it shows me issue regarding missing of library "-lPods-myProject-braintree"
then I delete cocoa-pods (uninstall it) again install it and repeat the whole cycle of integrating braintree SDKs via Pods but now it showing me issue,
First Time I also get this type of errors but finally it solved by one line.
please run following commands in Terminal
go to your project folder.
Be sure you have installed cocoapods in your system.
create pod file with command - nano podfile
write pod 'Braintree' in your podfile.
save podfile and run command pod install
If you get failed to install pod.
then run command pod try Braintree
You will surely get your pod installed in your project with xcodeworkspace file.

Facebook sdk framework not found ios7, xcode5

I am new to Facebook SDK with iOS. I want to send invitation to friends on Facebook for using my app for this I am using Facebook (developer.facebook.com)sdk api I have registered my app installed sdk and imported framework. After importing got error as,
ld: warning: directory not found for option '-
F/Users/vijaywebsolutions/Documents/FacebookSDK'
ld: framework not found FacebookSDKkk
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Why don't you try CocoaPods for your projects its the dependency manager for Objective-C projects.
Refer CocoaPods
Simple Setup
Open Terminal and type sudo gem install cocoapods
Once installed you need to create a simple Pod file in your project directory and add the dependency to that file example.
Go to your project root directory and create Pod File by typing in terminal touch Podfile
Once created add the following line to the podfile.
platform :ios
pod 'Facebook-iOS-SDK', '~> 3.11.0'
Save the file and then in the terminal(where pod file exist) run pod install
Now it will install the requested dependencies and will create a Workspace for your project, you don't need to take any effort to configure it.
Its the best way to manage your dependencies. Give it a try you won't regret.
First you have to include facebook sdk in you project, steps as follows :
click on your project folder in xcode.
go to general tab and find Linked framework and libraries.
in that click on + sign and provide path to FacebookSDK.framework
These steps will facebook sdk in your project.
Then you have to import it in any of .m file where you want to use is it. like following line :
#import <FacebookSDK/FacebookSDK.h>
I also ran into similar error when integrating FacebookSDK into my app. I have added the framework in the Link Binary with Libraries, however, error persisted. One important thing to note when app is built, is it should be build against source Facebook iOS SDK and NOT binary SDK. I got latest source from here Facebook iOS SDK, downloaded Bolts-iOS and XCTOOL and then ran build_framework.sh Once completed, copied FacebookSDK.framework to my app and everything worked perfect.