0

I recently removed Instabug from my React Native 0.53.3 project, but when I run react-native run-ios I get a build failure:

ld: framework not found Instabug
clang: error: linker command failed with exit code 1 (use -v to see invocation)



** BUILD FAILED **


The following build commands failed:

    Ld /Users/danale/Library/Developer/Xcode/DerivedData/build/Build/Products/Debug-iphonesimulator/NFIBEngage.app/NFIBEngage normal x86_64
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/NFIBEngage.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/NFIBEngage.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

How can I completely remove Instabug from my project so it's not looking for it on iOS build?

So far I have completely removed it from App.js file, but it's still being referenced in build.gradle, MainActivity.java, MainApplication.java, settings.gradle, project.pbxproj and yarn.lock file. I don't even use yarn by the way.

How do I completely clean this up?

halfer
  • 19,824
  • 17
  • 99
  • 186
Daniel
  • 14,004
  • 16
  • 96
  • 156
  • did you try removing podfile and installing it again? – Muhammad Iqbal May 31 '19 at 19:09
  • @MuhammadIqbal, I am not familiar with a podfile and how to remove it and install it, I just know its a Ruby file that has some configuration in it and I don't know what is the connection to `Instabug`. I am also just now noticing it has `platform :ios, '9.0'`, is that a problem when working with Xcode 10.1? – Daniel May 31 '19 at 19:14
  • 1. Remove Instabug entries from Build Settings > Header Search Paths 2. Remove bash script from Build Phases > Strip FrameWorks – Hariks May 31 '19 at 19:17
  • Remove from Framework Search Paths too in Build Settings. You can refer this to undo all the RN link changes [https://github.com/Instabug/Instabug-React-Native/blob/48f00cdc86bc98bee8e1f5b553b27e53faf253c5/link.rb] – Hariks May 31 '19 at 19:24
  • @Daniel, Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. I faced this issue and solved it by removing Instabug from podfile,run pod install, adding Instabug again, and finally running another pod install. – Muhammad Iqbal May 31 '19 at 19:25
  • @Hariks, are there some commands that can automate this? `gradle build` or anything along those lines? – Daniel May 31 '19 at 19:26
  • @MuhammadIqbal, I don't see `Instabug` referenced in the `Podfile` at all, I don't want to add `Instabug` at all, I want my project to forget `Instabug` ever existed and I have tried `pod install` in the past and it is not a recognized command. – Daniel May 31 '19 at 19:27
  • Ideally react-native unlink instabug-reactnative should do the trick – Hariks May 31 '19 at 19:29
  • But It didn't work for me So I manually undid all the react-native link changes – Hariks May 31 '19 at 19:30
  • @Hariks, you helped me solve 99% of it. I also had to remove it all manually, but I still get this particular error: `ld: framework not found Instabug clang: error: linker command failed with exit code 1 (use -v to see invocation)`. Does this mean its linked somewhere? I tried that `react-native unlink instabug-reactnative` but it did not work. – Daniel May 31 '19 at 19:52
  • Did you clean the project and removed derived data? – Hariks May 31 '19 at 19:58
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/194267/discussion-between-daniel-and-hariks). – Daniel May 31 '19 at 20:02

1 Answers1

0

If react-native unlink instabug-reactnative didn't work try removing all react-native link changes manually.

You may refer these pages to remove all references

Instabug rn link checklist

Instabug Documentation

Clean the project once every reference is removed.(Deleting Xcode derived data may be needed sometimes)

Hariks
  • 1,852
  • 1
  • 19
  • 34