Copy URL from simulator's safari and Paste to Mac - ios-simulator

I want to copy a URL from simulator's safari app and paste it outside in my mac. Is there a way to do that?

This problem was already solved. You can use Copy and Paste Options in the Edit Menu from the Simulator in OS X. They let you share the contents of the system clipboard and the simulator clipboard.
I flagged the question as duplicate.

Related

Mystery of the broken Google Chrome

Note: I'm using an M1 Apple Silicon MacBook
Not sure if this is linked:
So I was using Atom to do some CSS editing last night. When trying to close it, Atom wouldn't close and the computer actually crashed. The file wasn't saved anywhere and was just a throw away copy paste editing file.
Today I started up my computer and opened Google Chrome and everything is busted. I've attached some images, one showing what it looks like in the inspect window, with a giant red box around everything, this has not been added, this is what it looks like in my Chrome > Dev Tools. It seems like the CSS of Chrome has been damaged in some way? I'm not a very experienced programmer.
I tried to reinstall Chrome and delete all Chrome Application Support files but the issue remained.
Also checked the Dev Tools > More Tools > Changes window
Does anyone know how this is happening?
Fixed this with the following:
Deleting chrome from Applications and emptying bin
Did a search for all files with "Google" and deleted 3 remaining files named "Google".
Deleted the Google files found in Application Support
Ran an Avast scan (found nothing)
Did a full cache/history clear

Xamarin.Form how do i get the ios project from PC to Mac?

form project on my PC
and i have my mac paired.
But i cant figure out how i get the ios project to my mac so i can make a IOS file that i can upload to appstore. Dont need help upload the app. Just to get it over to mac so i can make the file.
Have search for answered but nothing helpes
thanks for the help guys
When you do everything right, you should be able to click on that "IPA" icon and you'll see the file on the Mac.
But before that you've got a lot to learn: https://learn.microsoft.com/en-us/xamarin/ios/deploy-test/app-distribution/app-store-distribution/publishing-to-the-app-store?tabs=windows
I just uploded the project to dropbox and then downloaded it on my mac. Easy way out

Why is the r code changed to be unrunnable after I renamed the file in windows explorer?

After I renamed the r-file in windows explorer (ending was not changed) and open the r file in the RStudio again, the code added these red dot between every single characters as shown below.
I can not copy out the red dot to do a find/replace.
Are there any solution to this problem? Why does this happen?
I run RStudio on Windows 10. I am using the newest version now.
Open the file in text editor, then refer to this answer, will solve the problem.

getting chromebook file to move or contents to paste

On a Chromebook (Dell Chromebook 11), using Vim, I saved a file to /home/user/filename.txt . How can I get that content anywhere else in the world?
gmail attach a file does not let me go to /home/user
copy with Ctrl-C within Vim does not result in my text being in the paste buffer
I can see file:///home/chronos/user/Downloads/ in a browser, so if I could save content to /home/chronos/user/Downloads from Vim, I could get text out, but I can't do that.
In sum, I'd like any way to get the content of filename.txt anywhere outside the machine (cut and paste available in a browser, moving the file, resaving to a thumb drive). Thanks for any help.
file:///home/chronos/user/Downloads/ is literally the same Downloads folder. However, you can do that with terminal as well (if you're linux geek, this should be pretty simple)
Since you said you were using Vim, I assume that developer mode is on. In the shell, you can make use of mv linux command to move it to downloads.
mv /your/path/to/file.txt ~/Downloads/file.txt
Cheers!

error: failed to attach to process ID 0

I have been reading the forums and so far none of the solutions suggested works for me. I'm running Xcode 4.4.1 and testing in iPhone 5.1 simulator. The simulator won't open the apps anymore and I'm getting the above error. Any thoughts or solutions pls?
Go to IOS Simulator tool bar and click Reset Content and Settings...
I've met the same problem
1.you can delete the App directy under
~/Library/Application Support/iPhone Simulator/6.0/Applications
and ~/Library/Developer/Xcode/DerivedData
2.then you can start Xcode ; in the menubar you can find Project -> Clean
EDIT: before copy/pasting 1 above change the Simulator Version to what
you are using!
Click on Simulator and reset the simulator by going to the “iOS Simulator” main menu and choose “Reset Content and Settings…
Back in XCode, choose the menu "Product" > "Edit Scheme". On the left menu panel, click on "Run _Your_Project_Name_.app" > "Run _Your_Project_Name.app". The info display on the right should have the "Debug Process As" radio button picked as "Me (your-user-name)". If not, make sure you do not login as root. On Stackoverflow there are many reports of running as root will have problems
Next, still in Xcode, go to the menu "Window" > "Organizer". On the top menu, click on "Projects". Go ahead and delete "Derived Data".
Finally, go to "~/Library/Application Support/iPhone Simulator/6.0/Applications" and delete everything that’s in there
Finally, I found out the problem was I had a folder called "resources" that I used to store all my images. When I changed the name of the folder to something less likely to be used by XCode somewhere else, I did the whole delete derived data/clean/restart XCode and it worked!
Nothing from mentioned above helped me.
But as I found that few moments before, I (or some other entity) had somehow removed records from my /etc/hosts file and I got the same error.
You should check whether you have in your /etc/hosts file the line "127.0.0.1 localhost".
As this line is missing, the LLDB debugger is generating issues.
So just add 127.0.0.1 if you have it missing in your /etc/hosts.
This helped me!
Delete the app on the iOS simulator.
It works for me.
Reset Simulator and quit simulator then Rebuild-Run.Its works for me
Cleaning (either deleting folders, or Product->Clean) did not worked.
I saw that in my .plist the bundle id had been removed. Thanks to git. I checkouted-- the file, and bam! deployed to simulator no problem.
Just sharing...
Sometimes this problem arises from having two targets in a project, both using the same bundle identifier but building products with distinct names.
Deleting the application on the device/simulator solves the problem, as it has been said earlier.
This happend to me after changing the Product name.
After resetting the simulator, cleaning the project, and restarting XCode, nothing worked. After shutting down and restarting the simulator everything worked as expected.
I guess there exists someone who is in case the matter happens only in a project, not in every project and failed to resolve the matter after doing a lot of solutions posted on this Question page, such as 'deleting the App directy under ~/Library/Application Support/iPhone Simulator/6.0/Applications and ~/Library/Developer/Xcode/DerivedData', 'Cleaning all the logs by doing Project -> Clean' and 'Cleaning all the log and contents in the iOS Simulator Menu' and anything else.
Yes, I also finally failed to resolve that.
For you, It might be a solution if you are in the problem I mentioned above:
Create a new project with a similar name, and copy and paste all of your classes and resourse files existing in your previous project folder to the new one and link the references between your new project and the copied files in Xcode.
Then, clean the build logs by pressing 'Shift + Command + K'.
In my case, this made me able to continue my work...
My App didn't have a proper BundleID after deleting some xcconfig files.
I had the same problem and I found that you can't be using the root account on your Mac. If you are logged in as root you are not able to attach process to the Simulator. You have to be logged in as a different account.
Every time I have this issue (that is quite often actualy), I uninstall the app from the simulator (like a user would on the device) and do a clean on XCode. Next build and run works.
I can also reset the simulator content and settings to make it work but this seems like using a bazooka to kill a fly.
This also happens if you prepare your file for enterprise distribution and end up saving the resulting .ipa and .plist in the project directory, thus overwriting your project plist. When that happens you'll know because the version information and main window in your project configuration will be blanked. If this happens restore your old plist from source control... and save your product files elsewhere !
This happens when you switch between versions of xcode.
Simple solution is to quit xcode and simulator.
Relaunch xcode and at the same time clean the simulator befor running. This should solve the problem.
I had this problem because I had another user on the same machine running the iOS simulator. Logging in as the other user and quitting the simulator (and Xcode) solved it in my case.
Step1: ping
$ ping localhost
This should return something like
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.028 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.048 ms
...
If this works, this answer won't fix your problem, try something else.
If ping return something else for example: ping: cannot resolve localhost: Unknown host something is screwed up with your /etc/hosts file, go to Step 2
Step2: Check /etc/hosts
Check that the top of your /etc/hosts file looks like this
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
If it doesn't have these entries in the file, enter them at the top of the file, flush the dns cache using $ dscacheutil -flushcache and go back to Step 1, otherwise continue to Step 3.
Step3: Correct File Format: It should be unix or LF *
$ file /etc/hosts
This should return: /etc/hosts: ASCII English text
If it returns something like /etc/hosts: ASCII English text, with CR line terminators then the file is in the wrong format and is likely being ignored.
Change the file line endings to unix or LF using your favorite text editor.
In Sublime Text 2 this can be done throught the view menue: View > Line Endings > Unix
Flush the dns cache ($ dscacheutil -flushcache) and go back to step 1
Embarrassing late-night moment, but just for completeness... when you click "reset content and settings" on the emulator, of course the big blue default button says "DON'T reset", and the little white other button says "reset". If you're not paying attention it can be quite difficult to remember to read the buttons. I can't believe I'm admitting this but hey, happens to us all (right? :))
I restart the simulator and it worked for me
Some times it happens because you have two projects with same name. Try this:
go to xCode preference choose location and click on DerivedData delete the DerivedData
Reset and force Quit Simulator
Force Quit The Xcode and restart
If it has not worked than restart your PC.
and another one for the record: (none of the suggestions worked for me)
Mountain Lion: XCode 4.6.3
I moved the whole Application to Trash and deleted following other folders
/Users/[USERNAME]/Library/Developer
/Users/[USERNAME]/Library/Caches/com.apple.dt.XCode
/Users/[USERNAME]/Library/Application Support/iPhone Simulator
reboot System and reinstall XCode

Resources