When i open terminal why automatically show /Users/avijit/.zshrc:10: no such file or directory: /Users/avijit/.rbenv/bin/rbenv? - macos

When i open terminal why automatically show /Users/avijit/.zshrc:10: no such file or directory: /Users/avijit/.rbenv/bin/rbenv ?
Take a look at this image:

Related

How to access files, created by Laravel Sail with PhpStorm?

In the documentation there are instruction on how to work with Laravel Sail files with VSCode. How can I access files with PhpStorm?
In PhpStorm, you can directly open a project stored in the WSL file system and work with it like with any other project.
Click Open on the Welcome screen or select File | Open from the main menu.
In the Select Path dialog that opens, select the folder in the WSL file system that contains the project to open, or type the path to the \\wsl$ project location manually.

XCode Instruments can't open .trace file: The file couldn't be opened because there is not such file

I shared .trace file that I created with XCode 12.5 Instruments and sent it to the other developers to analyze but they can not open it because of next error:
I don't have this file on my mac and don't know how to find it but I can open my file successfully.
How to share a .trace file?
You can find 0B463CA7-E796-4DB1-B46B-EEBE0B1664E7 file from inside your .trace file.
Open your_file.trace (i.e. 'Show Package Contents' in Finder)
Unzip your_file.trace/shared_data/1.run/0B463CA7-E796-4DB1-B46B-EEBE0B1664E7.zip
Then you can find the second your_file.trace in the unzipped folder e.g.: Users/user/Downloads/your_file.trace
Open the second .trace file and find 0B463CA7-E796-4DB1-B46B-EEBE0B1664E7 e.g: your_file.trace/shared_data/1.run/0B463CA7-E796-4DB1-B46B-EEBE0B1664E7
Copy 0B463CA7-E796-4DB1-B46B-EEBE0B1664E7 file to your_file.trace/shared_data/1.run of your root .trace file.
As a result you must have both 0B463CA7-E796-4DB1-B46B-EEBE0B1664E7 and 0B463CA7-E796-4DB1-B46B-EEBE0B1664E7.zip at the same location inside your .trace file and now it is available to open anywhere.
If you open this file on your mac steps to unzip and find this file are made automatically by Instruments because the zip file have a folder structure that points to your user but this doesn't work for an other user so may be it's a bug of Instruments.

Xamarin component.exe is not opening on Windows

I have downloaded the XPGK .zip archive to be able to upload my component to the Xamarin Store. I have done so by following the first step of this guide.
But when I click the .exe file a command prompt file just appears and disappears? What's the issue?
Did you follow the guide? It doesn't mention that you should click the .exe file to open it. Instead, the .exe file is used to generate the directory structure required for your component.
Use the xamarin-component.exe to create the base structure by typing the following into the console/terminal where is the base folder for your component.
Note: you will need to change the path to the location where you extracted the ".exe” file.
This means that you should first extract the .exe file to a directory where you want your solution to be placed (most likely your workspace).
Then, using a console/terminal, navigate to the directory in which you extracted the .exe file and type the following:
For Windows:
xamarin-component.exe create <foldername>
for OS X:
mono xamarin-component.exe create <foldername>
Where <foldername> is the name you want your directory to be.

How to symbolicate crash report from Apple received in .txt format not .crash format

My app got rejected from Apple and I have got crash reports in .txt format instead of .crash format.
How can I symbolicate or read the crash report ?
When you get your crash report as a .txt file just follow these
steps :
Change the file extension .txt to .crash (eg mycrash.txt to mycrash.crash).
Create a new folder in desktop and copy the mycrash.crash file to the
newly created folder.
Copy the .dSYM file:
update: download all DSYMs from appstoreconnect activity- they are properly named with their UUIDs
Unzip DSYMs, then copy the App and Sybolicate script as defined below:
https://appstoreconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/[appID]/activity/ios/builds/[version]/[build]/details
Open the Archives window in Xcode by navigating the menus: xcode -> window -> orgnizer or xcode -> product -> Archive:
Select any Archives of your app Right click on it, then select Show in Finder
Right-click on appname.xcarchive and select Show Package Contents.
Open the dSYMs folder and get the .dSYM file, and paste it too in the newly created folder.
Copy the .app file from the same xcarchive to the new folder.
Go to path /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/
Finder hotkey (⇧ + ⌘ + G) and just paste in the path.
Copy the symbolicatecrash file to the newly created folder.
The folder should now have:
mycrash.crash
myapp.app
myapp.app.dSYM
symbolicatecrash
Open terminal, navigate to your folder path and then run:
$ export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
Then run the symbolicate command on your crash like so:
$ ./symbolicatecrash mycrash.crash > symbolicated.crash
Change the file extension .txt to .crash
Make sure your device is plugged in.
Go to xcode -> window -> devices and simulators -> view device logs.
Drag the file that of the crash log and drag it to the left side of that windows.
Now you can see the log and what happen there.
Can't add a comment to Shakti's answer, but I had trouble with steps 5 and 6 as it was complaining about DEVELOPER_DIR not being specified.
Some googling later I found out that the part 5 should have been:
5 now open terminal cd your folder path and then type this
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
So, the "export" is also a keyword and a part of the command, just in case anyone else gets the same problem.
It worked for me ,might help some one else also
Apple gives you crash log in .txt format , which is unsymbolicated
**
With the device connected
**
Download ".txt" file , change extension to ".crash"
Open devices and simulators from window tab in Xcode
select device and select device logs
drag and drop .crash file to the device log window
We will be able to see symbolicated crash logs over there
Please see the link for more details on Symbolicating Crash logs
By dragging the .crash file in organiser was not completely symbolicating my crash. So i tried another way of doing it.
If archived builds is already on your computer. Then you don't need to give .app and dsym file. Just run below commands in terminal.
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
Hit enter
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash /Your/Crash/File/Path/c.crash > /Your/Symbolicated/Crash/File/Path/c.crash
Hit enter and check the path you have given.

myProject is locked for editing and you may not be able to save your changes?

I get the following error messages when I moved my code from my laptop to my Mac Mini and opened it over there:
myProject is locked for editing and you may not be able to save your changes?
myProject is currently locked because you are not the owner of the file and do not have write permission.
The file "xxx.xcuserdatad" could not be unlocked.
Could not add write permission to the file because you do not own it. Try modifying the permission of the file in the Finder or Terminal.
I did a search with Finder: What came up was a file called UserInterfaceState.xcuserstate inside of xxx.xcuserdatad... GetInfo showed the file not to be locked.
However looking at the path(from GetInfo) showed the file to be within "xxx.xcodeproj" and further within "project.xcworkspace/xcuserdata/xxx.xcuserdatad"
I can't find this anywhere, and I don't know how to use my project on another computer.
Go to the Folder in Finder where the xcode project is and right click -> Get info. The permissions and the bottom should be set to read/write and in my case they were. The trick is to click the settings icon at the bottom and select "Apply to enclosed items". The chmod method shown above doesn't change the permissions of the contents within the folder.
go to the folder in finder
right click on folder and click the "Get info"
go down to the bottom and click the lock and write administrator password
now click on the settings icon and press "Apply to enclosed items..."
Please note that I had to add the recursive command flag and sudo to get it to work for me:
$ sudo chown -R Roger my_app_folder/*
And:
$ sudo chmod -R 774 my_app_folder/*
Because I was getting this error:
chmod: Unable to change file mode on my_app_folder: Operation not
permitted
Have you tried copying the contents like suggested in this answer?:
Unable to unlock file for editing in Xcode 4?
Alternatively you could use the console to set yourself a writing permission on all the files for your xcode project:
http://www.mac-terminal.com/files-and-folders/permissions/chmod/

Resources