How to remove / delete a CocoaPod? - cocoapods

I have a CocoaPods published on cocoaPods.org say 'ABC'. I want to remove it and delete it, in a way that anyone else can use the same name 'ABC' when publishing a new pod.What are the steps in doing so? Any help would be appreciated.

You can use the following command to delete pod.
pod trunk delete
Reference: https://guides.cocoapods.org/terminal/commands.html#pod_trunk_delete
More Command: https://guides.cocoapods.org/terminal/commands.html#group_trunk

Related

How do I use `chpldoc` on GitHub

When running chpldoc and pushing to github, the themes are corrupted. Do I need to set a flag to allow github to insert a theme?
== UPDATE ==
A specific example is here I ran this with chpldoc src/*.chpl -o docs
It looks like an empty .nojekyll file is required, see this link:
https://daler.github.io/sphinxdoc-test/includeme.html#add-a-nojekyll-file

You cannot create a branch at '' because a branch already exists at ''. If '' is not a branch convert it back to a folder and retry the operation

We keep getting this error whenever i try to create a new branch.
You cannot create a branch at $/Power Web Portal/UTMBSolutionsMaster/ProVostWebApps because a branch already exists at $/Power Web Portal/UTMBSolutionsMaster/ProVostWebApps/EmployeePortal-Teaching. If $/Power Web Portal/UTMBSolutionsMaster/ProVostWebApps/EmployeePortal-Teaching is not a branch convert it back to a folder and retry the operation.
I tried the tf delete command but its not able to find that branch as it has already been deleted. Here is a screenshot of the deleted branches
Can anyone please suggest how i can get rid of this error ?
i tried to 'Undelete' the branch first and then i converted it to a folder(Rightclick > Branch > ConvertToFolder) and then deleted it again.
This worked for me.
To show deleted folder you need to go to 'Tool > Options > Source Control > Visual Studio TFS' and tick 'Show deleted items'. Then follow Surya's advice.

Composer [UnexpectedValueException] error will trying to use composer to install a github project

I am trying to install a github project using composer and get the following error
Composer [UnexpectedValueException]
Your Github oauth token for github.com contains invalid characters: ""
Can anyone explain what I need to do to correct this error?
I am using the following command
composer create-project --prefer-dist --stability=dev vova07/yii2-start yii2-start
Thank you
I started getting a similar error and the reason was that Github recently changed the format of their auth tokens:
https://github.blog/changelog/2021-03-31-authentication-token-format-updates-are-generally-available/
To resolve the error:
Find the composer/auth.json file (if you're running the project in a container, you'll have to bash into it and find the file in there)
Remove its github.com entry. Your file will probably look like the following after removing the entry: {"github-oauth": {}}
Run composer self-update. The issue got resolved in version 2.0.12. See the first item in the changelog for that version here: https://getcomposer.org/changelog/2.0.12
After that, you can restore your composer/auth.json file to its initial state as the newer version of composer will recognize the new key format.
You can try Basic Auth instead:
Change this (oauth):
"github-oauth": {
"github.com": "ghp_[YOUR-PERSONAL-TOKEN]"
}
To this (basic auth):
"http-basic": {
"github.com": {
"username": "[YOUR-GITHUB-USERNAME]",
"password": "ghp_[YOUR-PERSONAL-TOKEN]"
}
}
You can find instructions on how to create a Personal Access Token
Inspired from github docs. Apparently, you can use Basic Authentication with a Personal Access token instead of oauth in some cases (e.g. like mine: installing a private git repo with composer).
I fixed it.
Goto C:\Users\XXXXX\AppData\Roaming\Composer
Open the auth.json
delete the github.com entry under "github-oauth": {}
That's it.
Update answer for Masiorama and Ruchir Mehta:
If you looking for file auth.json but don't know how, use this command:
locate auth.json
And here's the result:
You can see that auth.json will look like this:
/home/{your user name}/.config/composer/auth.json
Then you could use this command to edit the file:
sudo gedit /home/dev/.config/composer/auth.json
And remove content inside github-oauth.
If you're on MacOS, the auth.json file is at ~/.composer/auth.json. Then from there, you can remove the value for github-oauth. I tried fully deleting the file but I got a parse error, Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['. Your auth.json file should look like this:
{
"github-oauth": {}
}
This is similar to other answers posted but I wasn't able to use the locate command on MacOS so this might be helpful to other Mac users
This error recently popped up from nowhere.
Simply deleting the whole auth file worked for me..! Not sure why / when it appeared in the first place.
~/.composer/auth.json
As far as I know (I'm a beginner with composer too), the problem is with your authentication, so you have to fix your credentials in auth.json inside path-to-composer/.composer/
Inside you will find a json which will probably looks like:
{
"github-oauth": {
"github.com": null
}
}
Fix that and you should be ok ;)
The solution is just to upgrade your Composer version
using command composer self-update.
Go to C:\Users\UserName\AppData\Roaming\Composer
Open the auth.json file.
Clear everything and paste the below code
{
"bitbucket-oauth": {},
"github-oauth": {},
"gitlab-oauth": {},
"gitlab-token": {},
"http-basic": {},
"bearer": {}
}
I hope it will be solved
I run in the same problem after upgrading githup api token to the new format.
The answer is you need to upgrade composer version 1.10.21 or higher that fixes this problem.
Same solution as the answer of Paulina Khew but with command lines on MacOS :
cd ~/.composer/
nano auth.json
Delete what is inside th bracket :
{
"github-oauth": {}
}
When you're ready to save the file, hold down the Ctrl key and press the letter O
Press the Enter key on your keyboard to save.
When finished, press Ctrl + X to close nano and return to your shell.
Edit the composer authentication configuration file ~/.composer/auth.json
Then replace the following.
"http-basic": {
"github.com": {
"username": "[YOUR-GITHUB-USERNAME]",
"password": "ghp_[YOUR-PERSONAL-TOKEN]"
}
}
Now run the command composer install
That's a bug.
If you have Debian or Ubuntu, try this patch. Otherwise read the last line.
Quick copy-paste patch
If you have Debian 10 buster or Ubuntu 20.LTS or similar distributions, try this copy-paste command:
wget https://gist.githubusercontent.com/valerio-bozzolan/84364c28a3bba13751c504214016adcf/raw/c1356d529c89c10de4c959058e2e86ffe58fa407/fix-composer.patch -O /tmp/fix-composer.patch
sudo patch /usr/share/php/Composer/IO/BaseIO.php /tmp/fix-composer.patch
If it does not work, write it in the comments.
Step-by-step explaination
Your Composer version has a bug: you are able to save a valid GitHub token, but then it's not able to read that token again because Composer thinks that your GitHub token cannot contain underscores or stuff like that. Moreover, it's strange that Composer checks its syntax only the second time. Why? that's another story.
The fix is simple. You can temporary disable that wrong validation in your Composer version. Also because GitHub is a proprietary service and their specifications can change over time (as you demonstrated today). So it makes sense not to validate the syntax of GitHub tokens. The only person who should hard-validate GitHub tokens is GitHub itself, not Composer.
If you installed Composer via apt install composer, probably you will not have any update available and surely you cannot use self-update because Composer is read-only for security reasons (and for a similar reason, you should not execute Composer from root). Instead, you can create a safe hot-patch to fix that specific issue.
To create a patch, create a file called /tmp/fix-composer.patch with this exact content:
103,105c103,105
< if (!preg_match('{^[.a-z0-9]+$}', $token)) {
< throw new \UnexpectedValueException('Your github oauth token for '.$domain.' contains invalid characters: "'.$token.'"');
< }
---
> // if (!preg_match('{^[.a-z0-9]+$}', $token)) {
> // throw new \UnexpectedValueException('Your github oauth token for '.$domain.' contains invalid characters: "'.$token.'"');
> //
That content can also be seen from here:
https://gist.github.com/valerio-bozzolan/84364c28a3bba13751c504214016adcf
Then run this command to apply that patch:
sudo patch /usr/share/php/Composer/IO/BaseIO.php /tmp/fix-composer.patch
If it does not work, probably you have not installed composer via apt.
In short, whatever operating system, and whatever installation method, locate the file BaseIO.php in your Composer and comment out the validation check.

Xcode 6 beta 3: invalid virtual filesystem overlay file

After updating to Xcode 6 beta 3 the compiler keeps crashing with the following error:
/[Long-path-goes-here]/all-product-headers.yaml:4:13: error: Could not find closing ]!
'roots': [
^
fatal error: invalid virtual filesystem overlay file '/[Long-path-goes-here]/all-product-headers.yaml'
1 error generated.
Solved by doing the following:
Find the /[Long-path-goes-here]/all-product-headers.yaml (Go to Folder... in Finder)
Replace the contents with the code below.
Save and lock the file. (Get info for file, check locked.)
{
'version': 0,
'case-sensitive': 'false',
'roots': []
}
After this Xcode will complain about not being able to write the file with this error this is expected and doesn't seem to affect the build. Edit: For most people. If it prevents you from running try disabling Defines Module in Build Settings of your Target:
Unable to write to file /Users/user/Library/Developer/Xcode/DerivedData/.. (You don’t have permission to save the file “all-product-headers.yaml” in the folder “Pods.build”.)
Hat off to the discussion on Apple Developer forums. Also, this is the relevant issue in CocoaPods issue tracker.
Try setting "Defines Module = YES" in your app target. Works for my project.
Clean (command-shift-K), and clean-build-folder (command-alt-shift-K) and build again worked for me.
I had this problem because I deleted some old archives and files from my mac to make more space. However running pod install for this project solved it.
Perhaps your path to .yaml file contains ' character. It makes the parser confused. Using TextWrangler, you can see your path has different colors (red & black).
That's my case, and moving project to another path (which doesn't contain ') solved my problem.
I solved it by delete the current project's DerivedData folder by (Xcode 8):
Xcode > Preferences > Locations tab > Click on the right arrow under
DerivedData > inside the folder DerivedData delete the project folder.
Better to do hard clean also by Shift+Cmd+Alt+K.
And build.
Can fix with one shell command:
echo "{\n\t'version': 0,\n\t'case-sensitive': 'false',\n\t'roots': []\n}" > /[Long-path-goes-here]/all-product-headers.yaml
Where the path is copied out of the Xcode error.
See Daniel Schlaug's answer for background info
I tried all the answers above/below. None worked.
However, Restarting Xcode did it.
Try that before going into the madness of trying to fix the actual situation of the missing file. All the rest is madness. Heck, If that doesn't fix it. I would even try restarting every time you do one of the strategies listed here. Maybe one of those fix it but Xcode gets stuck until you restart it.
Nothing else to do, Xcode is just too buggy at times.
I get this error too frequently, so I've made a simple bash script based on Daniel Schlaug's answer. I've never needed to lock the file. Just copy the file referenced in your error log and use it as the only parameter. Don't forget to chmod +ux before running.
#!/bin/bash
if [ "$#" -eq "0" ]
then
echo "No arguments supplied"
exit
fi
rm -rf $1
echo "
{
'version': 0,
'case-sensitive': 'false',
'roots': []
}" > $1

converter-sample.c contains duplicate main

I'm trying to deploy an application on the mac app store.
I'm working through the process of adding the code to validate the recipts
In accordance to the documentation I've compleated the follwing steps
Installed asn1c using sudo port install asn1c
Created a file modlule.asn1 in a directory asn1c_dir from listing 1-1.
cd asn1c_dir
asn1c -fnative-types module.asn1
Then in Xcode "add existing files" and add the asn1c_dir directory
Try building, but I get ~900 errors
In the target build settings, I check the box next to "Always Search User Paths"
I now get a single error saying "Duplicate symbol _main in /foo/bar/ppc/converter-sample.o and /foo/bar/ppc/main.o
I've tracked this to the fact that it looks like the file converter-sample.c declares it's own int main() function which is bad right?
any help would be appreciated.
So for metric reasons, I'll answer this question.
converter-sample.c is an unnecessary file. Delete it. Go about your life a happy person.

Resources