title: Setting the desktop background on all Spaces in Cocoa
body: <p>I'm writing a small app to change your desktop background. If the user only uses one space, then it's all fine, but when he has multiple spaces the app only works on the currently active space.</p>
  
  <p>I'm using this code</p>
  
  <pre><code>[[NSWorkspace sharedWorkspace] setDesktopImageURL:currentImageURL 
                                          forScreen:screenToChange 
                                            options:screenOptions 
                                              error:&amp;error]
  </code></pre>
  
  <p>to change the desktop background, and it looks like there's no way to change the background of another space.</p>
  
  <p>I only found answers from several years ago, and nobody asked this specific question. Is there a way to do it in objective-c?</p>