Download of Cocoa API documentation - xcode

Is it possible to download all Cocoa API documentation? I have to work offline a lot of times and sometimes a doubt blocks all my work...

Xcode does this for you automatically, unless you've disabled it ?
Your Documentation prefs pane should look something like this:
Note that in the above case there are 4 documentation sets installed and the remaining uninstalled sets can be installed by hitting the associated Get buttons. Once you have the required documentation installed then it's available via the Help => Developer Documentation menu, even when you are off-line.

As #PaulR mentions, Xcode does this automatically. Look in the Documentation preferences. If there's no button called "Get" next in the "Mac OS X 10.6 Core Library" row, then it's already downloaded and installed.
If you still don't think it's working, then check out Ingredients.app. It's an offline documentation browser. It's pretty nice. :)

Related

How to control "Prevent App Nap" being displayed in applications "Get Info"?

When I right click on my OSX application and select "Get Info", the "Prevent App Nap" option is not there. How does one control this in Xcode or programmatically? I certainly don't remember doing anything to remove it.
I could not find anything relevant in the Apple Docs or searching online beyond users asking why a particular application did not have "Prevent App Nap" as an option. So how does a developer control that?
Or does this mean that App Nap is already disabled?
I'm not entirely sure, but it might have something to do with the base SDK used to build the application. I can build my app with a base SDK of 10.5, and for that version of the app the "Prevent App Nap" checkbox appears in Get Info. If I build the same app with a base SDK of 10.10, the "Prevent App Nap" checkbox does not appear. This is only an observation, I have not found any Apple doc that says that is actually their policy.
I’ve noticed that some applications on my 10.10.3 system do not include the “Prevent App Nap” checkbox, and some do. I thought it might be related to manually adding the NSAppSleepDisabled setting to the application plist, but that does not seem to be the case. For example, Firefox.app 38.0.5 does show the Prevent App Nap checkbox, as well as iMovie.app, but iPhoto.app and ITunes.app do not.

Accessibility broken with Preview.app in OS X 10.8.4?

We have an application that integrates with different programs (among which is the Preview.app) using accessibility. We use the AXUIElementSetAttributeValue function to programmatically select some text in a PDF document using the kAXSelectedTextRangeAttribute. This used to work fine but suddenly stopped on my Mac (nothing seems to happend). My co-worker doesn't have the issue so after trying to figure out the difference I remembered that I had just updated to OS X 10.8.4 while he hasn't. I then read about this update and among the features and fixes was the following:
Improves VoiceOver compatibility with text in PDF documents
This indicates to me that they have fiddled with the area where I am having the issue. My question is now weather this is simply a bug or if it is by design. In the case of the latter, what am I supposed to use in stead?
PS. We tried also setting the selection range using the Accessibility Inspector found under Developer tools in Xcode and it works fine in 10.8.2 but not in 10.8.4, which further indicates that this might be a bug.
This is indeed a bug. I just installed the developer preview of OS X 10.8.5 and the issue has been resolved here. In the change-log it also says that some of the changes in this version regard "PDF viewing and Accessibility".

Where can i find Icon Composer on Mac?

I am trying to locate Icon Composer, which was supposedly downloaded as part of Xcode, however I can't find it, neither in applications nor with the spotlight.
Any ideas where it might be, or if I have to download it separately? If so, where from? I tried looking for it in the App Store, but nothing found.
Edit: I am using Xcode 4.4.1 if that helps.
Icon Composer isn't supported by Apple these days, and one of the reasons is that Icon Composer doesn't allow for working with Retina Displays.
The replacement is a clunky command line tool named "iconutil". It probably gets installed as part of the "Command Line tools for Xcode" download.
You need to create your icons as PNG's, put them into a folder (which will be called an .iconset) and then run the "iconutil" tool on that folder to create an ".icns" file.
This related question has a useful answer, and it points to this Apple documentation. Once you get the hang of it though, the process of creating icons becomes straightforward.
I have it for that version of Xcode in /Applications/Development. If you don't have it, run Xcode and select the menu item "Xcode->Open Developer Tool->More Developer Tools..." and look for a graphics-related download.
Philip is right but here is a clarification, Icon Composer is still available. In XCode press the XCode menu > Open Developer Tool > More Developer Tools...
In the web site that appears you need to search for "Graphics Tools" and download the dmg file with the same name (around 120 MB). It will contain the Icon Composer app previously distributed with XCode.
Here is a link to another newer github version Icon Compositor 2x - which also does 1024, so Retina resolution.
Here is the Github Repository:
https://github.com/lemonmojo/IconComposer2x
In the following link for the original Icon Composer it says "Note: There is no longer a 1024x1024 size. That’s replaced by 512x512#2x."
The newer github version called Icon Compositor 2x does 1024 straight

Add Safari Developer Library to Xcode

Does anybody knows how to add Safari documentation to Xcode 4 (https://developer.apple.com/safari/resources/), so I could use it offline.
I tried to look at adcdocset document
developer.apple.com/rss/adcdocsets.atom
Feed for Xcode 4.1. is
developer.apple.com/rss/com.apple.adc.documentation.AppleXcode4_0.atom
For Lion Core Libraries
developer.apple.com/rss/com.apple.adc.documentation.AppleLion.atom
So I tried to substitute Safari
developer.apple.com/rss/com.apple.adc.documentation.Safari.atom
developer.apple.com/rss/com.apple.adc.documentation.Safari5_0.atom
developer.apple.com/rss/com.apple.adc.documentation.Safari5.atom
But with no luck.
Even tried to use the web url as feed url
https://developer.apple.com/library/safari/
but nothing.
Is it even possible to get the Safari Docs to be viewable offline?
It would be normal to have it in Dashboard, but Dashboard hasn't got documentation browser.
Not sure, but I do think that since Extensions are build directly within Safari and no more in Xcode there is no way to have that documentation loaded in Xcode.
However you can download PDF version from the developer site.

Where can I find RSS feeds for Xcode Documentation?

Occasionally I like to work completely disconnected from a network. In those cases it's really nice to have complete sets of documentation on my Mac. Xcode supports subscribing to feeds of documentation. I've subscribed to the sets that I'm interested in but there's a problem: It doesn't appear that the lists are up to date.
I'd like to subscribe to the feed for 10.6 but I can't find out what the url is. I've googled and searched through the documentation on developer.apple.com but no luck so far. Does anyone know what the feed url is for 10.6, or if there's a link that contains a listing of all of the feeds?
It's in Xcode. Xcode menu > Preferences > Documentation > Click the "i" button next to "Mac OS X 10.6 Core Library", and you'll see the feed url in the info window.
For future reference, it's: http://developer.apple.com/rss/com.apple.adc.documentation.AppleSnowLeopard.atom
Further information is available in my answer here: https://stackoverflow.com/questions/1658707#1658927

Resources