Xcode Swift Parse Framework Installation Issue (Command PhaseScriptExecution failed) - ios

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.

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

framework not found RealmSwift

I was installing Realm and imported to my project but when I run the app it shows me an error:
ld: framework not found RealmSwift
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There can be multiple reasons for this issue.
To get the exact issue you can follow the below step :
Right click on error and select 'Reveal in log'. This will give you more insight about the reason of error.
One of the solution is to setting the 'Enabled Bitcode' to No. For this go to Build settings in your target and search 'Bitcode' in the search field.
I have faced this issue multiple times and one of the below solution may work for you.
After installing the pods make sure that you're opening the workspace instead of Xcode project file.
Restart Xcode
Remove derive data for your application
Reintegrate pods using pod deintegrate and pod install for your project
Reset simulator(If you are viewing the output in simulator)
Ensure proper linking of Framework in your project
Restart simulator
Clean project etc.
Hope this may help you.
I was having the same issue.
Initially, I was trying to import the files (Realm.framework and RealmSwift.framework) from download folder but then i was getting the same error like yours.
What i did then, i copied the folder containing the (Realm.framework and RealmSwift.framework) into the project folder and then i imported the files from there. That resolves my issue.
In my case, I've updated the Cocopods to the latest version (1.1.0) via this command sudo gem install cocoapods
is it possible that you are still running the .xcodeproj file. You should run .workspace file in your xcdoe

Can not fully remove Fabric & Crashlytics

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:

Xcode 8.3 Archive error: Linker command failed with exit code 1

I started getting this error only after upgrading from Xcode 8.2 to Xcode 8.3, and only when making an archive build (debug builds work fine).
When I do the archive via Xcode, the only message I get is "Linker command failed with exit code 1 (use -v to see invocation).
I build with the command line xcodebuild -scheme MyProduct
When I built this way, I found a number of issues (again, only when doing Archive):
I had to add import UIKit to practically every swift file.
all the pods had issues
remove everything from app-Bridging-Header.h
add a few things back into app-Bridging-Header.h
My current issue is with the AWS pod, using version 2.5.3
So my app-Bridging-Header.h has #import <AWSS3/AWSS3.h>
Here is the error from the command line build:
error: 'AWSS3/AWSS3.h' file not found with <angled> include; use "quotes" instead
#import <AWSS3/AWSS3.h>
^
The error log continues after that. I also tried the crazy suggestion of switch in the import to "AWSS3/AWSS3.h"...that didn't work either.
What is going on?
More INFO
This really appears to be an issue with one of my pods. I built a new solution, imported a subset of my pods and everything built. Then when I updated with the full list of pods it broke.
For me it is coming due to Bitcode enable in my project and i have used a custom framework with disabled bitcode.
Two things you can do :
Either disable bitcode in your project
OR
Build framework with bitcode enable
NOTE: If you click on error and it doesn't show anything then right click on error and select Reveal in Log. You will get error for this issue
At long last I was able to figure out this was a pod issue...just had to figure out which one it was.
I created a brand new project and started adding my pods in one by one (actually, 3 by 3...one by one would have taken too long).
Conclusion: localytics 4.3.1 has a bug in it somewhere. I downgraded to 4.3.0 and the problem went away.
I got a problem like this. My suggestion is that you should remove the version of 8.3 and download any old version from this link: https://developer.apple.com/download/more/
I hope that it will work.

Xcode from Unity: "Linker command failed with exit code 1 (use -v to see invocation)"

I am getting a "Linker command failed with exit code 1 (use -v to see invocation)". As far as I understand, it is telling me that I am missing some framework.
1. I have added all the frameworks manually:
:
After cleaning and trying again, the error still persists but it complains about another framework!
2. I have also set the 'Search Path' in 'Build Settings' to recursive:
Every time I try and built it on my ipad I get the same error but complaining about a different framework despite 1&2. Has come across this?
I am working on Xcode Version 7.3.1
The error screenshot:
Directort Structure:
UPDATED Search Path:
I think that Can You check Project Target>Buil Phases>Link Binary with librarys in more than one time it is define or podfile is define multiple time some frameworks.
I was having the same issue w/ my project. I install my pods via CocoaPods, once I open up the workspace project created, I import the modules to the file. At first there will be an error, but once you Build the project, it will sweep the error. That's how I fixed my issue.
In the end, removing the all the problematic frameworks (those starting with QT) allowed me to build the app and didn't cause any noticeable issues. Its not a particularly satisfying solution, but it worked ...

Resources