Can not fully remove Fabric & Crashlytics - ios

Trying to remove fabric from an IOS project I'm working on. I have removed it from the pod file(s) and did a pod install. (When saying fabric onwards I mean both fabric and crashlytics)
I have removed any references to Fabric in the code by searching the project with cmd+shift+f. And clean the build folder.
Then when building I get the following error:
/Users/just_user/Library/Developer/Xcode/DerivedData/TheApp-epakvsyxjlzjjfclvjqwrljowaio/Build/Intermediates.noindex/TheAppMobile.build/Debug-iphoneos/TheAppMobile.build/Script-CF862497221C49250071D547.sh: line 2: /Users/just_user/Projects/TheApp/app/TheAppMobile/../Pods/Fabric/run: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
So obviously some reference left somewhere.
So I used Finder to search the project for any references to Fabric which resulted in a lot of references still there not visible via Xcode. I removed all of those references too.
Then cleaned cache of cocoapods, re-installed the pods again. Cleaned build folder and the result is the same as the error above.
Then I deleted the "Users/just_user/Library/Developer/Xcode/DerivedData/TheApp-epakvsyxjlzjjfclvjqwrljowaio/" folder and cleaned and build everything again. Nope, error still there.
What else could it be which isn't visible through xcode and finder searches that keeps a reference to Fabric?

From the error, it seems you forgot to remove Run script phase for Fabric under Build phases for your target:

Related

Can't archive with Xcode (error - PhaseScriptExecution failed with a non zero exit code), but the build is successful

I am sorry for the black marks in the image.
I have seen multiple posts suggesting an answer to this problem, Lock unlocks keychain (tried it), pod Update (tried it), clear build(tried it), signing, skip install in build settings(tried it) - None of them actually worked.
I built my iOS app in react native with Expo, after which I did expo eject to create the iOS folder for Xcode build and archiving, the build is successful every time and it even runs on the simulator and in my device(iPhone 7) but it always failed to archive by throwing this error - Uncategorised - Command PhaseScriptExecution failed with a non zero exit code..
Any help to point me in which direction should I go or what can be the possible mistake that I am doing will be of great help. Do let me know if, I should provide any more detail about this. Thank you!
Xcode Version - 11.0
Mac Version - 10.15 Catalina
iPhone OS - 13.1.3
Few links I tried from -
"${PODS_ROOT}/SwiftLint/swiftlint" causes "Command PhaseScriptExecution failed with a nonzero exit code" with Xcode 10
https://github.com/apollographql/apollo-ios/issues/395
https://www.reddit.com/r/iOSProgramming/comments/al9box/getting_an_error_command_phasescriptexecution/
Make sure you have installed your pods correctly. For me I removed all the pods from my pod file, updated the pod through the terminal, then re-added the pods to the pod file and installed through the terminal. This worked perfectly for me.
I had the same exact problem. What worked for me was I opened the podifle and deleted all the pods, then saved it. After that run pod update in terminal. Go back to the podfile and past the pods back into the file and save it. Then run pod update in terminal again. After that open xcode and run the cleaner and then try to Archive...it worked for me.
Based on the previous answers, the following worked for me:
Quit XCode.
Delete all relevant files: Podfile, Podfile.lok, Pods folder and .workspace file.
Recreate the Podfile and open the new .workspace file.
Cheers
PS: In my case, I hit this issue after copying an existing project (workspace) to a new machine.
Try go to accounts and press download manual profilesenter image description here

Xcode Swift Parse Framework Installation Issue (Command PhaseScriptExecution failed)

I'm having lots of trouble installing the 'Parse' Cocoapod library/framework on Xcode. (version 10.3)
What I did:
After initializing a podfile with "pod init", and adding "pod 'Parse'" into the file, I ran "pod install" from terminal and integrated the pod into Xcode. There are no compiler errors and the pod library is showing up and looking fine with autocomplete working on it as well
The issue:
Upon trying to run the app, it gives me an error:
Command PhaseScriptExecution failed with a nonzero exit code
More specifically, it gives me:
[filepath].../Pods-Real Estate App-frameworks.sh: eval: line 131: unexpected EOF while looking for matching `''
Things I've tried already:
Completely reinstalling and reintegrating pods
Restarting Xcode
Restarting my computer
Unlocking and relocking the login keychain
I tried installing pods and bolts just by downloading the framework files but they generated different errors (I think because the two frameworks weren't linked together properly doing it that way? I couldn't figure out how to fix that either)
Weird solution that I don't even know how I came across:
The issue was that a directory that contained my project had an apostrophe in it. I fixed it by renaming the directory, and then deleting the derived data folder in my project, cleaning the project and then running it.

iOS Swift No Such File or Directory In Debug-iphoneos

Somebody please save me.
This is the error I'm getting. I've tried cleaning, doing a build clean, pod installs and updates. I have not found a solution.
Shell Script Invocation Error Group
/Users/arthuraraujo/Library/Developer/Xcode/DerivedData/Anti-Social_Club-gizjofrkxroutxezxlbuadlvpwbo/Build/Products/Debug-iphoneos/Anti-Social: No such file or directory
I have similar issues in the past and doing the following work for me. Hope your problem is same as mine:
Close xCode
Go to this folder Group
/Users/arthuraraujo/Library/Developer/Xcode/DerivedData/Anti-Social_Club-gizjofrkxroutxezxlbuadlvpwbo/Build/Products/Debug-iphoneos/
and delete Anti-Social.
Restart xCode, clean & build.
It is hard to really tell you the solution with just the information provided. However, the first thing I would try is deleting the derived data, as CodeBender stated. You should also look at your search paths in your project's building settings to make sure your pods are correct/ connecting your pods files to your project.
Possible duplicate of:
Xcode 8 Shell Script Invocation Error
Here is what I did when I got this:
Used this site to completely remove All Versions of cocoapods:
https://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine
Re-installed current stable version of cocoapods (v1.1.1 for me)
Deleted podlock and pods directory
Deleted old .xcworkspace file (this was key for me).
Did "pod install"
Opened xcode and cleaned project and deleted derivedData.
Go to your build phases and remove libReact.a from the linked libraries.
Then add libReact.a but select this one:
libReact.a from 'React' target in 'Pods' project

Fabric fails to install

I'm trying to add Fabric to my project, which is using CocoaPods with Carthage. What I did:
In Fabric app, I've created a new app
In the project I've created new run script called 'Fabric', copied the code from Fabric app (the script is the last script in my project!)
Because the framework file couldn't be found, I've added proper path to Framework Search Paths.
I've also added Fabric framework to my project Link Binary with Libraries stage.
The project still does not build. The error:
2015-07-14 10:51:30.161 run[46263:967908] Fabric.framework/run 1.3.16
2015-07-14 10:51:30.169 run[46263:967908]
Fabric: dSYM Error
Unable to process MyApp.app.dSYM at path
/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gmgvycoixcnkriauasdffkzvdg/Build/Products/Debug-iphonesimulator/MyApp.app.dSYM
Make sure your project build settings are generating a dSYM file.
DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations.
This could also be a timing issue, make sure the Fabric run script build phase
is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it.
Command /bin/sh failed with exit code 1
What is wrong..? How to fix it?
Got it. When moving framework to different folder I forgot to change run script from:
./Fabric.framework/run ...
to:
./Frameworks/Fabric.framework/run ...
Everything is working now.

xcodebuild failure clang:error no such file or directory:

Having a problem when building with xcodebuild. My project/app builds fine with the Xcode - gui. It simply isn't finding/building the libcryptopp library which is part of the build process.
The error is:
clang: error: no such file or directory: '/Users/builder/repo/ioskpay/xcode-cryptopp/cryptopp/build/Release-iphoneos/libcryptopp.a'
This particular file should be derived from another project inside the main app - xcodebuild simply isn't correctly pointing at the right file folder which should be:
~/Library/Developer/Xcode/DerivedData
Any ideas?
To fix this, go to your project settings, go to Targets and select your main project target. Then go to Build phases. Under Target dependencies add the static library project.
This way, when you compile the main project, the static library subproject gets compiled before the main project and your static library will be available.
I had the same problem, but for a resource file .m
I opened target -> build phases -> Compile sources
and I found the file the compiler was tell it can't find duplicated: one with strange icon and the other with a normal icon. I simply removed the one with strange icon and it worked. ( I added the file multiple times and I had a merge conflict before that which made something wrong in the project file)
For your case I think you need to remove the lib from target dependencies list and add it again. This may work for you.
In Xcode Version 9.2 (9C40b) this happened when I drug a bunch of files into the project, some of which were duplicate. Rather than simply not adding the duplicates, it added them again and only the name, not the path.
In Target > Build Phases > Compile Sources each of the duplicates showed with no "...in" after them. Each one caused the clang error.
After removing all of the duplicates that Xcode collected, the project compiled and ran.
It makes you use the Project Navigator instead of managing your source files in the Finder. Then the Project Navigator can't replace duplicates like any decent file management system (ahem Finder). 🤨
My xCode info is:
I faced similar errors during xcode building projects (native swift, flutter, react native, native script) in which I got error messages related to clang compilar. Errors like:
clang-4.0: error: no such file or directory: '/Users/xxxxxxxx/Library/Developer/Xcode/DerivedData/xxxxxxxxxxxxxxx/Index/Data Store'
clang-4.0: error: cannot specify -o when generating multiple output files
others
Despite of errors related with DerivedData for native apps can be fixed by deleting the directory and, eventually, restart xCode and even restart the machine... in this case, you will see that after deleting the directory and start building process again, the error comes back.
Then, is the moment of checking the clang installation by running clang --version. The normal output will be something like:
as you can see the InstalledDir is incorrect for xCode. In my case, some days ago I needed to install Anaconda app (R, Python, etc) and, now, I remember that I had to install some dependencies and one of them was clang and its installation was altered.
To fix this problem (in my case that I will not need anaconda any more): (edited)
1.- Delete anaconda and all its dependencies (I recommend to use App Cleaner).
2.- Re-install xCode
After reinstalling xCode, if you type again clang --version, you'll get this:
More info at: https://github.com/flutter/flutter/issues/32457#issuecomment-496161092
Hopefully, this info helps some else.
Best
Ok so by simply adding the correct -target -configuration and -scheme parameters I got this to run correctly. However due to my running this in Jenkins for autobuild purposes it still doesn't work as I'd like - getting stuck in exactly the same place. It's odd because I have the exact same code being built in another job that isn't having this problem. There is no rhyme or reason for it at this point. I will keep shooting rubber bands at it and update when I have an answer...
Sometimes Xcode performs weird.
You have to find that static library project e.g.. "filename.a" under 'Link Binary With Libraries' in Build Phase and then remove it and add it again.
I had the same problem while I was archiving my target. I removed the library and the build succeeded.
For me it was because I had removed a package or pod. I ran pod install and it fixed it
Look for the missing file in the Xcode project i.e the files may be deleted or miss placed.
add the missing files to the xcode, then everything will work fine.
Run this command :
$ conda deactivate

Resources