Mac Assign Apps To Spaces
I am trying to create an Application on Mac OS X Lion which requires application to be assigned to All Desktops (Spaces). This can be manually done by Right clicking on application's dock icon and Selecting Options Assign To All Desktops.But, I need to find a way to do this via Objective C. I have two displays: iMac and a secondary monitor. I've setup a space for both displays using Mission Control. As such, I can now right-click on any app in my dock and set the option to 'Assign to Desktop on Display 2'. Unfortunately, when I restart my computer, this preference seems to be reset.

| Developer(s) | Apple Inc. |
|---|---|
| Stable release | 1.1 / August 28, 2009 |
| Operating system | Mac OS X |
| Type | Virtual desktop |
| License | Proprietary |
| Website | https://www.apple.com/.../spaces.html |
Spaces[1] was a virtual desktop feature of Mac OS X, introduced in Mac OS X 10.5 Leopard. It was announced by Steve Jobs during the opening keynote at the Worldwide Developers Conference on August 7, 2006. As of Mac OS X 10.7 Lion, it has been incorporated into Mission Control.
Overview[edit]
Spaces enables users to create multiple virtual desktops suited to the unique needs or work habits of the user. A user could, for example, create and assign a 'space' to office work, enabling him or her to leave a work-related application (such as a word processor or a spreadsheet) running full screen and then switch to a different space designated for browsing the Internet or navigating file structure in Finder windows. Up to 16 spaces can be created, and applications can be bound to specific spaces. There are various ways to navigate between spaces, including user-configured, function-key combinations, hot corners (via Exposé), or by dragging windows and applications — in the direction of the desired space — to the corresponding edge of the screen and holding for a moment until the space switches. The Dashboard functions as a separate space, on the left of the other spaces by default.
Use[edit]
In Mac OS X 10.5 LeopardSystem Preferences, a checkbox labeled 'Enable Spaces' must first be checked in the 'Exposé & Spaces' preferences, under the 'Spaces' tab. Then, as many as 16 spaces can be created by adding rows or columns. Application assignments may be added and bound to specific spaces listed, by their corresponding numbers, in the right-hand column. When an assigned application is launched, it will open on the designated space and remain in that location unless it is moved manually to another space.
There are a few settings for activating and switching between spaces. A checkbox at the bottom of the panel allows switching spaces automatically when switching between applications bound to spaces. This is achieved either by clicking on application icons in the dock, or by pressing ⌘ (Command) + Tab, and Spaces will jump directly to the space that the chosen application has been assigned to. A limitation of Spaces lies in the fact that some applications featuring tool palettes and/or multiple open document windows (such as Adobe Creative Suite or Microsoft Office applications) cannot be consistently bound to a specific (numbered) space. In such cases, the 'switching' function responds to the most recently active document, regardless of which space it has been opened upon, so it is usually more efficient to avoid assigning such applications to a specific space and to run them unassigned, opening documents in the desired space.
Function-key combinations can also be configured to activate the full-screen Spaces grid view, switch between spaces directionally, or switch directly to a specific space by number. A function allows applications or windows to be moved into (or through) adjacent spaces by dragging and holding the window (or document) at the edge of the screen. During a transition to a new space, a small, translucent image representing the Spaces grid configuration will be shown in the center of the screen for a few seconds, with arrows representing the movement, and the active space highlighted.
When viewing the full-screen grid, spaces themselves may be re-arranged by dragging and dropping (requires clicking on the blue 'desktop' area, instead of on a window within it). This does not change the application assignments, but is equivalent to manually moving a window or document to a new space. The application will retain its assignment and when launched at a later date, will run on the originally assigned space.
Spaces also works effectively with Exposé, another Mac OS X feature, where you can designate a 'hot corner' to activate the full-screen feature of Spaces, showing a 'zoomed-out' grid of scaled-down thumbnails for each space. Also, when the Spaces grid has been activated, Exposé may be additionally deployed to reveal the active windows or documents on each space.
Comparison[edit]
Although Spaces was a new feature for Mac OS 10.5, virtual desktops existed for quite some time on other platforms, such as Linux, Solaris, AIX and BeOS. Virtual desktops also existed for Windows[2] and for the Mac OS via third party software.,[3] and it has been a standard feature on Linuxdesktops for a number of years.[4] The first platform to implement multiple desktop display as a hardware feature was the Amiga 1000, released in 1985.[5] Virtual Desktops were finally added to the Windows platform with Windows 10 in 2015.
References[edit]
- ^'Leopard Sneak Peek - Spaces'. Apple Inc. Archived from the original on July 10, 2007.
- ^Multiple Desktop Support in Windows
- ^'Spaces: A look at Apple's take on virtual desktops'. ComputerWorld. November 21, 2006. Archived from the original on October 22, 2007.
- ^redhat.com: Red Hat Linux 6.1 Getting Started Guide, 1999.
- ^http://www.faqs.org/faqs/amiga/books/ Screens - Amiga Related Books FAQ, 3.3 Amiga Specific
External links[edit]
If you have multiple displays, there are two operating modes in Mavericks. You can have one big — or two independent desktops. Here's how to assign an application to a specific desktop.
__________________
First, it's important to understand the terminology. A display is a physical monitor, typically a flat panel LCD device. This article focuses on a second external monitor connected to, say, an iMac or MacBook. An OS X desktop resides on a display and has a menu bar at the top and (generally) a dock at the bottom. An OS X Space is a extension of the desktop that has a menu bar and dock where apps may reside -- either duplicated or in isolation.
Multiple Spaces assigned to a desktop.
Mavericks has two operating modes, defined in System Preferences > Mission Control. The option 'Displays have separate Spaces' determines whether your two displays act as separate desktops, each with its own menu bar and unique Spaces (checked) or, alternatively, both displays are one desktop with only one menu bar (unchecked).
A log out is required after you select this option.
In the first case, (checked) the display that has the active menu determines which independent Spaces you step through when you toggle with CTRL + Right/Left arrow. Each desktop has its own Spaces, and each space can have its own wallpaper.
Disable Spaces Mac
In the second case (unchecked), you have one desktop with one menu bar and (optionally) multiple Spaces. The Spaces stay in sync on the displays as you step through them with CTRL + Right/Left arrow. However, each can have its own wallpaper. In other words, two displays comprise one desktop. The desktop can have N number of Spaces that span both displays.
This tip refers to mode #1 (checked.)
Assignment of Apps
Let's say that in mode #1, you'd like to assign a given app to specific desktop. The way you'd normally do that is to right-click the app's icon in the dock. However, and here's the gotcha, if you only have one Space assigned to that desktop, the dock option (to make an assignment) does not appear.
With no extra Spaces defined.
The trick is to assign a second Space to the desktop. You do that by pressing the Mission Control button on your Mac keyboard (F3) or whatever you've assigned in System Preferences > Mission Control, and moving the mouse to the upper right of the display until you see a Plus (+) icon. Click it to create a new Space.
After you've created a second Space, your dock option will change. Now you'll see this:

AFter a second space has been defined.
Now you can assign the app to the Desktop of your choice, typically either the desktop on display #1 or display #2.
Why you have to create a second Space for that desktop before you can assign an app to the desktop is not understood by the authors at this time.
Moreover, the behavior of the 'Assign to' function appears to change across apps. For example, if you were to assign an app to desktop #1, and then move it to desktop #2 right before a log out, it may honor the assignment on log in or it may stay where you put it.
The assumption here is that the election has been made to have the app relaunch when logged back in. Otherwise, it has to be relaunched manually (unless you've designated it as a launch item in System Prefererences > Users & Groups > Login Items).
Option to relaunch curent apps & windows at log in.
We have discovered that some apps honor the assignment made in the dock no matter what after a log out/log in sequence or a restart and some stay where you put them. Experimentation is recommended. This tip is really focused on getting to the assignment mode in the dock in the first place.
Apple's implementation could have been cleaner, but the authors suspect that various apps have not been recoded to honor the Mavericks way of doing things.
How To Free Up Space On Mac
_______________________
Mac Assign Apps To Spaces List
MacBook Air teaser image via Apple.