Hide Swift documentation in Xcode help viewer - ios

When I browse online iOS docs for classes, it has an option to show swift, obj-c, or both. I have mine currently set on obj-c (I peek at Swift from time to time, but in my day to day work, it just clutters the docs).
Is there a way to do similar in the integrate help viewer for Xcode 6? Every time I browse a class document, I have to mentally filter out all of the swift variants.

The documentation is just a set of HTML files. If it's downloaded, you can edit a CSS file to completely hide Swift or Objective-C code.
Open Documentation window.
Select "Editor" > "Share" > "Open in Browser" menu.
Copy the corresponding part of the address of the page that opens up:
/Users/XXX/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.XXX.docset/Contents/Resources/Documents/
Switch to Finder, and use "Go" > "Go to Folder" menu to open up the folder.
Browse to Resources/XXXX/CSS folder and edit "xcode5.css" file. You should add either of these blocks to hide Swift or Objective-C:
div .Swift {
display: none !important;
}
div .Objective-C {
display: none !important;
}
Restart Xcode and enjoy reduced clutter.

One way is to choose Editor -> Share -> Open in Browser. You can also make a shortcut via Preferences... -> Key Bindings or the Keyboard System Preferences.
It still opens Safari, but it is just one step, so it might be a good solution to your problem.

I navigated to the bottom of those folder trees, located the files specified (one for iOS docs, one for Mac OS X docs), duplicated each file for a backup (command D in Finder), opened each file and pasted :
div .Swift {
    display: none !important;
}
at the end of each file.
Rock and Roll! Thank you pointum, you made my day.
Ref: My file path was like this. Note that your path may differ by the number just before the /CSS/
Mac OS X Documentation File (yours may differ by the 1058)
~/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.OSX.docset/Contents/Resources/Documents/Resources/1058/CSS/xcode5.css
iOS Documentation File (yours may differ by the 1081)
~/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.iOS.docset/Contents/Resources/Documents/Resources/1081/CSS/xcode5.css

Related

How to change localisation from storyboard to strings file

TLDR: Xcode generated storyboards for each language, however I want the "old"(?) *.strings files. How?
I am currently in the process of localising my storyboards. After I enabled everything, Xcode generated another storyboard alongside the original (english) one for me to localise. I was surprised, I expected a Localizable.strings file, like the apple documentation still states as of April 3, 2021:
For storyboard and XIB interfaces, select the user interface files (files with a .storyboard or .xib filename extension). Xcode adds a strings file to the localization folder that contains the text to translate, as well as comments that describe the user interface components. For example, if you add German to an iOS app that uses storyboards, LaunchScreen.storyboard becomes a group containing a LaunchScreen.storyboard (Base) and LaunchScreen.strings (German) file.
I searched around the internet, in apple developer forums, watched both WWDC18 and 19 talks about localisation in Xcode, but did not find a single mention of translated storyboards.
After the initial translation, which works great due to the simplicity of just filling everything in, it gets frustrating however, since every layout change needs to be repeated for every language. This can't be intended, there must be a better way, right? Sadly, I didn't find anything. Even a hint to a piece of documentation regarding these storyboard copies would be greatly appreciated. Thanks!
There are some screenshots of the possibility to convert these two formats via a dropdown, like the third picture in this post. However for me, there is no dropdown next to the language item when I click the storyboard, neither on the group, nor individual base or localised ones:
Is this a bug or am I missing something here? I am using macOS Big Sur 11.2.3 with Xcode 12.4 (12D4e).
Turns out, you need to use the Base Localization feature, the dropdown then appears and you can convert existing storyboards to *.strings files.

Template Dialogue Box not showing up when trying to create a new file in a Xcode Workspace

When I right click to add a new file (or do File -> New -> File), I don't get a dialogue box asking me which Template I want to use. It just creates a blank file like this:
I tried renaming it to a .swift file and adding in all the necessary code to start off, but two things happen:
First, the autocomplete function is one step behind. So when I've already typed import UIKit and moved on, it starts trying to autocomplete UIKit. And when I've already typed class className: UICollectionViewController {
} and moved on, it starts trying to autcomplete UICollectionViewController
After I manually type in the bare minimum needed to make a swift file into a UICollectionViewController with a colored background, I can't reference it in my other files.
I can only assume this is because of the lack of a template dialogue box, but maybe I'm wrong. Is there any way to toggle this template dialogue box on or off?
This problem is only happening with this particular project since I updated to Xcode 10.1
I can't seem to find anyone else online who's already had this issue. The only similar questions I found online were referring to creating reference folders rather than groups. I didn't find anything regarding the file template dialogue box not showing up.
I fixed this and I'll post the answer in case anyone else comes across this problem.
It was tedious, but I:
Created a new project
Initialized my podfile, added what was in the previous one, and installed it
Opened up the new workspace
Added each file one by one
Maybe there's an easier/quicker way to do it, but after looking through all the settings and not finding anything, I ended up doing this and it worked.
Check that in the left hand pane displaying your project structure you are adding the new file to a folder which comes under your application (identified by a blue Xcode application icon) instead of a general folder as your top level (identified by a blue folder icon). I can't add images yet so please see link.

Localizations files not available on Xcode 6

Well, I received this project from a buddy that used to work with me and now I am responsible for it Internalization. I need to transform the language of the app to English, that is currently Portuguese.
Although i was researching for some tutorials but all of them include one step i cannot make. I have noticed there were no files localized in any of the languages, and no folders .Iproj too.
In the info tab > Localizations shows up, in each language added in my "Resources" Tab, "0 Files Located".
as Soon as i click "Use Base Internationalization" or the "plus" button there is no file i can reference it to.
I need to follow with this project and cannot create another one, there is lots of code and configurations that need to stay in this one. Is there any solutions?
Thanks!
PS: StackOverflow won't let me post images yet :(
Have you ever visited this panel?

Editing files contained in iPad app directly from PC without jailbreaking the iPad

I have some CSS in my hybrid iPad app files that I would like to edit. I came across iFunBox and iExplore, which allows me to move the file between iOS and macOS. But I cannot edit the files directly. I am doing the following:
Open and Edit the file in TextWrangler by clicking on the file in iFunBox UI
Reveal the file in finder
Copy the file to iPad by dragging it to iFunbox
It appears that it should be easy iFunBox or similar to automate this process and hance make the file editable directly.
Anyone aware of an app which achieves this?
Attached is a screenshot of my cluttered Desktop, showing the iExplore, TextWrangler and Finder window. Ideally, I would like to see an Edit option alongwith Open and Quick Look options.
Wait, do you just want to be able to edit files via FTP? If so use, Gusto

Restrict 'Open Quickly's scope to currently open project in Xcode?

CMD+Shift+O ( ⌘⇧O ) brings up the 'Open Quickly' feature of Xcode. Much like CMD+T in Textmate & Sublime Text 2. Its scope of search seems to include system headers outside of my project.
Is there a way to restrict this scope to the currently open project? I can't find anything in Xcode preferences. This feature would be much more useful if this were possible.
Quick open lost its value to me. What you can do until the bug is fixed / scope can be specified:
Use: Cmd + Shift + J
Then type the file you want to 'Quick open'. This is restricted to the files in the project Navigator.
I suspect that the scope is based on which navigator is currently chosen. When I start getting weird results, I go select the project navigator, then try again and get the results I expected.

Resources