Custom font none installed - Xcode 11 beta - ios

After installing the new beta xCode. The custom font set in an existing project does not work. When opening the storyboard file, it says as shown in image below
After clocking ok, I'm not able to choose custom font from the attribute inspector.
It was working fine with xcode 10.2. This issue occurs only on Xcode 11 beta

I had the same issue after I switched system language, and it was fixed by restarting the system and then restarting Xcode.

I've also had this issue.
I had to change the text style to attributed, pick the font, then change back to plain.

2022 Update!
You don't need to restart your system. Just perform these simple steps to solve this issue.
Open Spotlight (Cmd + space) and type Font Book
Drag-Drop your font into the Font Book.
Restart Xcode and it'll work fine.

Related

Font not showing in Xcode Attribute Inspector

I'm using Xcode ver 13.2.1 and
Hi, I have downloaded Poppins font from fonts.google.com and the problem is it's not showing in the font family dropdown(refer to the attached picture). I have declared it in my Info.plist, Project Target and still the problem occurs
This is expected behavior. The storyboard editor knows nothing of any custom fonts you may have installed for the app.

Custom font are not showing in new storyboard

I have created my new storyboard file and added some fonts in info.plist. These fonts are showing in main.storyboard but In my created storyboard, these are not reflected. I am using Xcode 9.1.
If everything you done right then just check Target Membership if its check box check marked or not, if not then Checked it mark.
Thanks
The project was developed on another machine. So these fonts were not installed on my machine. I just double click on all fonts and clean the project and Quit the Xcode and open again. Now it's working fine.

Xcode 8 storyboard error

Anyone can help me something goes wrong with me, I cant see my storyboard View, subview, imageview. All became white and its show error like on storyboard file
"An internal error occurred. Editing functionality may be limited."
I have open my project in xcode 8 and 8.1 beta latest xcode but both have same issue.
Main thing is that this is happening with all project not just one.
For example i am opening new project that is open in xcode 8 and i cant see that storeyboad file. Old project is working fine which are not open in xocde 8 i can see that project and open in xcode 7.3.1. but if i open that in xcode 8 and convert to xcode 8 compatible and this issue happen.
I have the same problem with Xcode.
I resolved it by disabling SIP (System Integrity Protection):
Press Command-R when start hold til logo and loading status appear
Open terminal
In terminal print: csrutil disable
Restart system
I have also faced this issue and resolve it by only follow these steps:-
Go to Xcode -> Preferences
Select Locations Tab
Click on Derived Data arrow.
Trash Derived Data Folder.
Restart System
Automatic Fixed this issue.
May this help you.
They inserted autolayout a few versions ago, exactly for this foreseeable reason. It's highly discouraged to use storyboards without autolayout, if you want to work with size classes, different devices with different screen resolutions, orientations, ecc.
My suggestion is revert the project to previous commit, reopen it with xcode7, add the needed constraint and reopen with xcode8 (you will still have problems, because of the many bugs of the new storyboard but they are mostly fixable).
Another option to keep working with in xcode8 it is to use a "freeform" simulated size from the Size inspector of the view controller and adapt the sizes to the old viewcontroller dimensions, but you will have to manage compatibility with all devices sizes programmatically, as i hope it is already being done. It doesn't anyway guarantee that everything works
There are some bugs in storyboard of xcode 8 so if you are not using autolayout then you should use xcode 7. now as you said in question that you are getting problem to open storyboard in older xcode (i.e. 7.x) that because once you open project in xcode 8 then it's change some configuration of storyboard which are not compatible with older xcodes.
So now for solution Open your project in xcode 8 -> open storyboard -> File inspector -> Under Interface builder document -> select xcode 7.x instead of latest xcode 8 from Open in
It will show popup something like Saving for Xcode 7.x will close your document and data for Xcode 8.0 features will be removed. Click Save and close the xcode 8 and open project in your older xcode (7.x) and you will able to open storyboard as it was before!!!
You can refer below screenshot,
Hopefully Apple will fix issue related storyboard and in newer version of xcode 8 you will able to switch project without messing up your UI! But right now there should be a workaround as i mentioned above! Try it!!
for me I just make all the views in storyboard size to inferred
^^"

Xcode 6.3 freezes/hangs after opening XIB file

After upgrading to Xcode 6.3 (release version), Xcode now freeze every time I open a XIB/Storyboard file that includes an IB_DESIGNABLE view that uses a custom font for any projects and includes a custom font (not necessarily to have reference to that font in that XIB/Storyboard). The freeze occurs after opening the .xib file and then attempting to switch to any other file. Xcode hangs and must be force quit.
I have opened a bug report with Apple. (Bug 20483867).
Right now, I have two work arounds.
Download and use Xcode 6.2 from Apple.
Remove the IB_DESIGNABLE tags from the custom view header files.
This is likely an Apple bug, but does anyone have a better work around or solution?
I've already suggested an edit for a more accurate description.
It only happens when your project contains a custom font.
It'll freeze just by visiting any Storyboard/XIB that contains an IBDesignable custom view, not even referencing to that font in your Storyboard/XIB.
My workaround is to use have an older version of Xcode also installed (Xcode 6.3 beta or Xcode 6.2) and use that to update your Interface Builder files, and never open it in 6.3. open those Storyboard/XIB in a new window in Xcode with option+shift+click the file in the project tree.
Whenever you encounter the freeze, I use this command to clear the saved state just for that project.
rm -rf YourProject.xcodeproj/project.xcworkspace/xcuserdata
Xcode 6.3.1 fixes the problem with custom fonts and IB_DESIGNABLE views in a Storyboard. Update via the Mac App Store, and you should be good.
Response from Apple: Link to Developer Forums on Apple
Thank you all for your reports. We are tracking this on our end and working hard to resolve it. Unfortunately we don't have a great workaround, but here are two options to get you going:
If Xcode is hanging on launch because a storyboard/XIB using a custom font/IBDesignable was previously open: remove the "UserInterfaceState.xcuserstate" file inside the xcodeproj of the project you are opening, it would be at a path like this: My App.xcodeproj/project.xcworkspace/xcuserdata/yourusername.xcuserdatad/UserInterfaceState.xcuserstate
If you really need to edit the storyboard/XIB file containing the custom font with Xcode 6.3:
Make a copy of your storyboard/XIB file as a backup
Open the storyboard/XIB file in a text editor
Remove XML tags named "fontDescription" that reference your custom font, for example: . Removing this tag will revert the font to the standard system font.
Make outlets to the objects using the custom font and at runtime set the font of those objects to your custom font, for example in an override of viewDidLoad or awakeFromNib on your view controller
IMPORTANT NOTE: we never recommend hand editing storyboard/XIB files. However we recognize this issue is preventing many of you from editing your documents and wanted to provide a workaround with the caveat that any hand editing may result in corruption of your document.
Same problem for me. Removing IB_DESIGNABLE fixes the problem.. Going back to 6.2 doesn't work for me as I'm testing apps on device with iOS 8.3 - Xcode 6.2 can't run apps on devices with iOS 8.3 :(
Another workaround is to change the file extensions to all of your font files and load the changed file names from Info.plist.
This way you can keep IBDesignables and still use your custom fonts, but wont be able to see them in the Font Picker in Interface Builder.
All custom fonts that were peviously set from Interface Builder will continue to work, but in order to change them or to set another custom fonts, you will have to do it either from code or to modify the Storyboard or Nib files from text editor in order to set the font name.
I don't have an answer but found out that simply force-quitting and restarting will re-launch Xcode in the exact same situation. To just be able to restart Xcode, remove the folder ~/Library/Saved Application State/com.apple.dt.Xcode.savedState.
This bug has been fixed in the 6.4 Xcode beta that came out today. Go to the dev center and log in to download it.
Xcode 8.1 - if you have a view with Navigation (in my case it was top Bar opaque Navigation Bar), just try to set property "top Bar" to None.
As a workaround,I just commented out all the #IBDesignable markup in my handful of custom components that use this. When I did that, yes I lose ability to tweak the settings in Interface Builder, but it allowed me to at least open the .xib files w/out XCode crashing.
I will simply un-comment those #IBDesignable lines when Apple comes up w/ a fix.
#O. Kurnenkov's answer worked for me. It didn't have anything to do with IB_Designable nor custom fonts, Cocoapods, etc.
For some reason having an "Opaque Navigation Bar" causes the nib file (it doesn't seem to affect storyboards) to constantly change y position; this can be seen in the Size Inspector where the y position will flicker between 0 and 64. This is happening to me with Xcode 8.2 (8C38).
My guess here is that this causes Xcode to constantly update the layout thus draining resources and causing it to hang/freeze.
The solution is to use any of the "Translucent" options, Inferred, or None.
Hope this helps!

Certain fonts not working for UIButton in XCode

When visually editing my app using the Storyboard in XCode 6 (also available in XCode 5) I can change the font of UIButtons using the Attributes Inspector. I can change from "System - System" to "Custom" which allows me to change the Family. However, it appears only some families work, as when I try to select others such as "Iowan Old Style" the selection doesn't stick and it shows the previous font. Is this a bug or are fonts restricted in some way that I'm not aware of?
This is a bug in Beta 5. I've experienced the same issues and verified that they programmatically work just setting them via UIFont. This is also a regression since this was working in Beta 4.
Unfortunately, it looks like we're gonna just have to wait until the next beta release (beta 6) for a fix.

Resources