Xcode storyboard showing osX object library. I want IOS object library - xcode

I develop mainly IOS apps but, recently, I worked on an OSX app. Both are possible with Xcode (I use 8, with swift).
Unfortunately, when I switched back to my already-existing IOS project (after restarting Xcode), the storyboard selection menu for the object library shows only OSX objects, not IOS (e.g. UIImageView).
I have googled without success and tried restarting Xcode, also without success. Can anyone help me fix this?

I did a lot more searching and came up with:
Xcode is loading in OS X objects instead of iOS objects
There there are other solutions proposed but the one that worked for me was to close the assistant editor and then, in the file list ( leftmost window in Xcode 8), I double clicked on the storyboard file. Problem solved. I am surprised that this bug still exists in this latest version...it is very troublesome.

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.

Archived macOS app launches with blank window

I have a macOS app with a ViewController that renames and resizes the app window, has several buttons, and a WKWebView that loads a default webpage on launch.
The project itself is an .xcworkspace file, since it includes the CocoaPod SwiftSoup for HTML scraping.
The app runs great in the simulator. When it launches, it looks like this:
I want to run this app on my Mac outside of Xcode. I am not planning on releasing it to the App Store, it is just for my personal use.
I archive the project with Products > Archive, then select "Distribute App", then "Copy App" to create a directory with the archived app. This all works great.
When I launch the app, I just get an incorrectly sized blank title-less window, without the buttons or WKWebView from my Storyboard:
The app isn't hanging. I can open the "About" menu item, etc., so I know the app is running. it just doesn't seem to be using my Storyboard to draw the UI.
What would cause an archived app to differ from the app running in the simulator?
The funny thing is that I WAS able to archive this same app back in November under High Sierra, so I'm guessing the issue is either Cocoa Pods and/or Mojave related.
My debugging leads me to suspect either CocoaPods or Mojave related
My debug:
1) While debugging, I restored a version of the project from November. When I archive that restored project, I get the same blank non running app.
2) I AM able to archive another brand new project that doesn't use Cocoa Pods, so my guess is that this is either CocoaPods and/or Mojave related issue...
Any suggestions on how to proceed debugging, or help resolving this would be greatly appreciated!
I am using Xcode 10.2.1 under Mojave 10.14.5.
This problem is caused by WKWebView.
So, you need remove WKWebView from IB and then create it with code and add it to the view.
REFER:
https://forums.developer.apple.com/thread/116047
http://www.openradar.me/23699297

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

NSToolbar items hidden using xibs migrated on Xcode 7

We are using xib files to show a window + toolbar.
Compiling a Mac OS app with the latest Xcode (7 or 7.1) makes our toolbars items to be hidden for Yosemite 10.10.5, but it works fine on El Capitan.
If I click the area, the actions are taken, so only the labels and images are hidden.
I have recreated the xib file from scratch with Xcode 7.1 but the issue is still there.
FYI: going back in our code history, before Xcode 7 was launched, and compiling the app without migrating xibs to Xcode 7 the issue is not reproducible.
It seems that the issue was generated by a missing font which seems that broke the whole CoreText and that's generated the missing toolbar items. Really strange issue.

Xcode 6.1.1 crashed changing TableView to Static Cells

I am trying to create a Table View Controller in my storyboard and when I change from "Dynamic Prototypes" to "Static Cells" Xcode stops responding until it eventually crashes.
What I tried so far:
Re-installing Xcode;
Clear Xcode folders under ~/Library (including DerivedData);
Creating in a new project (still crashes);
Ask a colleague to create a Table View Controller with static cells in the same project. He can do it on his computer. I can see the Table View on my computer and even edit rows, but I cannot add sections.
Tried both Swift/Obj-C projects, with or without Core Data;
I am using XCode 6.1.1 (6A2008a), the same as my colleague.
Please help! Thanks!
Yes , I have faced similar problem .please try with Xcode 6.3.x or later version .
Not a fix but may help some. I noticed this was only happening to me when I had two windows of my current project open. Was reworking a storyboard, so I had the old and new side by side. When I closed the windows of my project that I was not currently editing, Xcode did not crash. With more than one window open, editing a Static Table View would crash Xcode EVERY time.
I found a temp Fix. I also noticed that my dock isn't working fine (I can drag and drop things into it or in it). So I rebooted the mac and this fixed the dock problem, I tried quickly in Xcode and it worked. I guess it's something with Mac OS not just Xcode

Resources