Xcode 12 - Storyboard screens showing up empty/black (using m1 macbook) - xcode

We have tried both iOS 14 and 13. In both cases, the storyboard screens show up like this.
Has anyone else faced this issue and was able to solve it? Or should we revert back to xcode 11 or 10 in order to solve this?
Empty storyboard screens

I have similar issue with Xcode 12.4 on M1 Macbook Pro. As a workaround disable Rosetta Mode when working with storyboard. Follow the below steps
Quit Xcode and open finder and go to Applications folder
Right click on Xcode App and select Get Info
Uncheck "Open using Rosetta" option
Open Xcode, storyboard will work now
Note: With Rosetta Disabled, I wasn't able to build/run the app. So I was toggling the Rosetta mode. I think Apple will fix it sooner.
UPDATE
Xcode 12.5+ fixed this issue.

I tried on Xcode 12.5 beta on my M1 pro is work well. That's Xcode issue with 12.4 on M1.

Selected a device from the list in Device in Xcode fixed it for me:
Tap Device:
Then select a device:

Related

Cannot paste text on mac into ios simulator Xcode 12?

I am using Xcode 12.5, and I am trying to paste some text from a file into my ios Simulator (iPhone 11 ios 14.5). This does not work. Any thoughts or ideas on how to fix this?
I have looked at a number of other posts but they all seem outdated and don't work for me.
Also I am using an Apple M1 Mac mini ...if that makes a difference. I am also building my application with Xamarin.
The steps I took:
I turn of Automatically Sync Pasteboard
Copy the text (which is just letters from a .txt file)
Click send pasteboard from the edit menu.
Click on my Editor control and select paste
The outcome is that it shows the bubble at the top saying myappName pasted from CoreSimulatorBridge. However, it doesn't actually paste the text.
I answered this elsewhere, but it took so long to find I am repasting a couple places I looked first. Essentially, with Apple M1 Silicon, iOS 14+ pasting doesn't work. Switching to a simulator running 13.7 or earlier fixed it.
it seems it was an issue that Apple fixed in the latest XCode updates, copy/paste works with me on a simulator with IOS 16.2 and XCode 14.2
Now with XCode 14 I'm not being able to build 13.7 or earlier.

Xcode 10 storyboard UI components are not visible and painfully slow?

My code was working fine (showing UI properly) when I had Xcode 9 and I removed it from the application folder (could not update as it had installed using another apple id) and reinstall the Xcode 10 from the Appstore.
Now Xcode storyboard not showing any added UI elements colors or anything and I removed Xcode 10 and installed Xcode 9 again but problem remains same.
UI screen shot of storyboard.
I tried removing Xcode in this way:
/Applications/Xcode.app
/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
~/Library/Application Support/Xcode
~/Library/Developer/Xcode
~/Library/Developer/CoreSimulator
Then I tried installing macOs Mojave and install XCode 10 again from the Appstore. Issue still remains. I tried cleaning derived data, xuserdata and everything.
Try cleaning your project using "Command + K"
and run your project again!
Hope it works!
I encountered the same issue that you are facing in my case i had xCode 10.0 installed and everything was working fine. As soon as I installed version 10.1 I faced the same issue that you're facing but the good thing was i had xCode 10.0 installed at the same time so I switched back and everything was working fine.
From my point of view my system(Mac-mini mid 2011) was lacking hardware specification that was required for xCode 10.1 also had very low graphic processor in my mac mini. If you install the same version in a MacBook or any other system having higher specification you'll face the issue. I hope that helps.
I was stuck on this all day. One of my coworkers suggested removing occurrences of IB_DESIGNABLE & #IBDesignable. This fixed the issue for me. It still lags sometimes but doesn’t go invisible anymore.
If you have multiple xib files then just try to switch between or Try moving to launchScreen storyboard and then switch to main storyboard. I think this is just loading issue.
Reinstall Xcode. That worked for me.
Click on library button(Circular Button) which is left to hamburger sign(Top Bar Right Side). Elements will be popup on your screen then you can choose elements.
try
xcrun simctl erase all
it helped me with the same problem

XCode 7. iOS simulators missing and not installable

Can't see any iOS 9.0 simulators. In previous Xcode 7 beta 3 all was OK.
Can't install iOS 8.3 simulator.
Also I can't add any simulator from 'Organizer'. By pressing "Create" nothing happened.
Each time when I'm trying to download iOS simulator I see next thing:
One possible issue is that there may be old leftover simulators installed, which are not compatible with the new XCode, and their presence causes the whole Simulator to fail. To get rid of them, delete the simulators in /Library/Developer/CoreSimulator/Profiles/Runtimes (for me there was an iOS 7 simulator there which was the issue). Relaunch XCode after this.
Then try to run the simulator from XCode->Open Developer Tool->Simulator. Assuming this succeeds, verify that you have the simulators under the iOS Simulator menu Hardware->Device->Manage Devices… – if not, you should be able to click the + in the bottom bar to add yourself some iOS 9 simulators. Relaunch XCode again and they should show up in the menu.
In my case was with Xcode 8.2, what it worked to me was changing Deployment Version:
After setting another different than 10.0 then appeared back all simulators again.
Have you tried going to Xcode > preferences > downloads and trying to re-download the simulators you want?
For me it was only showing one simulator,
and when I go to Xcode > Preferences I can see the simulator is already downloaded but it is not showing up in the list,
if you're facing something similar. This is how you should add required simulator,
From the Xcode menu, open Windows > Devices, shown in the image below
you should see this screen,
notice there is only one simulator (ref: first image)
Now to add required simulator, you should click on the + (in the left corner)
You should see this,
You can choose the simulator from the list, In my case it is iPhone 6s Plus.
In Xcode you can see additional simulator iPhone 6s Plus,
I was also not able to see simulators.Reason is,I have not restarted system after upgrading Xcode.I restarted & simulator started displaying as routine.
There is a bug in the latest El Capitan beta which causes a process to crash when dlopen() fails to mmap() a dynamic library. Such mmap() failures can occur due to code signature verification failures.
These mmap() failures will occur if older iOS Simulator runtimes are present on disk (ie: installed from Xcode 6.x), and that is the reason why Xcode 7 beta release notes have indicated that earlier runtimes are not working in Xcode 7. The iOS 8.x Simulator runtimes were updated in newer downloads, but if the older versions are present on disk, they will cause the mmap() failure, which in the latest El Capitan beta, unfortunately results in the CoreSimulatorService repeatedly crashing which in turn results in no simulators being available.
If simulators are suddenly disappeared:
Just consider decreasing Deployment target to a minor version below current version in Project > Build Settings > Deployment Info > Deployment Target
P.S. Usually you see a place holder text showing the selected version (in gray) in the box denoted above. If for example the gray text says 9.3, then decrease it to 9.2.
Look at seancook's response in the middle of this page... it seems to have fixed this issue for several people.
https://forums.developer.apple.com/thread/11706
Edit:
This can also be fixed by booting into recovery mode (CMD - R) and reinstalling El Capitan.
Go to Windows. Select Devices. Select '+' from left bottom and add all simulators one by one.
I had changed the name of my Project from Finder. I clicked on the old project name (between the Play Button and and the selector for the desired Simulator or Device), selected edit schemes, selected the Targets Tab, and realised that the old scheme was missing so I just added my new Project name by clicking on the plus button and the simulator list reappeared.

Xcode not detecting my device

I upgraded my iPad device OS version recently to 5.1.1 (9B206). From that my Xcode is not detecting my device. Am just getting iOS Device and simulator options in my Xcode. But am getting my device in older version of Xcode and iTunes. For this i updated my MAC OS version to 10.7.4 and Xcode version to 4.3.3. But still am facing the same problem. Now how to make my Xcode to detect my device?
This Worked for me.
Quit Xcode.
Disconnect the device.
In a terminal window, type: sudo pkill usbmuxd (it will be restarted
again automatically)
Restart Xcode
Connect the device
Your device should now be visible again in Xcode!
Open the Organizer in Xcode, go to devices, find your device and click the option to use for development
I just plugged into another USB port and it detected by device.
In another case, check the "iOS Deployment Target" in "Build Settings",
if the target iOS version number is great than the version of device,
then the device will not show in the list.
Say that, the "iOS Deployment Target" == 7.0, and the version of device is 6.0,
to solve the problem by change the "iOS Deployment Target" to 6.0 or lower.
If the chosen answer still does not work for you try this:
Select the project in project explorer
Select the target on the main window
Select Build Settings
Select Deployment
Select iOS Deployment Target. Change it to the version of your device. (e.g. iOS 5.1)
I was also faced the same issue in Xcode, my device was not detected after update the Xcode latest version(7.3.1)
Done so many things what suggested in the web-search but still the device was not detected.
Finally, I just quit and open the Xcode my device was detected(oh my bad).
This SO answer solved it for me https://stackoverflow.com/a/56054170/5813473 .
sudo killall -STOP -c usbd
did the magic.
Well later I had to unplug/plug in again at occasions, but that 'killall' really solved the original issue.
Most recently, Xcode 8.3 and iOS 10.3 seems to have more security around Xcode accessing the iPad/iPhone. My sequence:
Rebooted the machine,
Attached the iPad,
Gone through a "trust this computer" security cycle on both iMac and iPad
Xcode can now see the device
Sometimes restarting Xcode helps. Give it a shot.
In my case, restarting Mac worked and no other solution.
I updated my iPad (it's in Settings -> General -> Software Update, near the top) and restarted my computer and Xcode sees it now.
FWIW I tried all the tips in this thread and nothing would work: from reboots, command line statements, unplugging, different USBC ports, etc. I also tried something not mentioned here (yet) by going to "Settings > General > Reset > Reset Location & Privacy" ... however even this didn't work.
Later on in the evening I was in a different room of the house and out of nowhere I got the "Trust This Computer" prompt on my iPad. I of course tapped "Trust" or whatever and then magically my Mac laptop finally sees my iPad.
I realize I'm not really giving a helpful tip/fix here - just sharing how things went for me in case anyone finds useful.
iPad: iOS 13.4.1 | Macbook laptop: OSX 12.3.1
Recently (2022) I've noticed that the iPad prompt to "Trust this Computer" won't appear unless using an Apple USB-C cable. Apple reps assure me they aren't doing any funny business here, but I have tried every cable I can find, including several thunderbolt 3 and 4 cables and Anker cables. Worth trying an Apple cable if still having problems.
Just simple, close the project on your XCode. Just right-click on the XCode in the taskbar and give a quit option. After open the XCode from the directory, it will detect your device. It also work on Xcode version 11.2.1
close your project or XCode.
Give Right click on the Xcode in MAC tabbar and give the Quit option.
Reopen the project from your finder(project place).
The device will be automatically detected.
Open the Windows in Xcode, go to devices. If Device is visible in Left side, Right click and select "Show in Destination Menu".
Enjoy..

iPad does not show in xcode

I have just updated my iPad with iOS 5 and now when I am connecting my device to my macbook it does not appear in xcode. It used to appear in xcode earlier when I had not updated my iPad but now it just does not show in xcode. can someone please help me?
Thanks
Pankaj
I didn't knew after updation of os in iPad i had t again make changes through Organiser and click on button use for development. I just did it and it started working. :):)
there is an option called use for development.You have to do that now.

Resources