Get NSDictionary of System Info

Asked by Tristan Seifert

Sparkle offers an option to send system statistics to the server when checking for updates. I have seen lots of apps have a button next to that checkbox that changes that option, which opens a sheet with a NSTableView showing the exact data sent.

I have my NSTableView hooked up to an NSDictionaryController, but don't have the slightest idea on how to get it to show the Sparkle information that it sends to the server. I was unable to find a call that gets these parameters in some form while looking through the docs. I know this must be possible since there IS apps out there that do this.

Question information

Language:
English Edit question
Status:
Solved
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Solved by:
Andy Matuschak
Solved:
Last query:
Last reply:
Revision history for this message
Best Andy Matuschak (andymatuschak) said :
#1

Oh, the UI for that is built-in to Sparkle. To see it, clear the user defaults for your app, make sure SUEnableSystemProfiling is set to YES in your app's Info.plist, launch your app, quit it, then launch it again to see the permission prompt.

If you're trying to build a custom UI which uses that information, then the keys you need are not API. You'd have to build Sparkle yourself and pull that functionality into something you can bind to in SUUpdater.m.

Revision history for this message
Tristan Seifert (seiferttristan) said :
#2

Thanks Andy Matuschak, that solved my question.

Revision history for this message
Tristan Seifert (seiferttristan) said :
#3

I ended up having to copy the code for the system statistics from Sparkle's source to a new Table Data Source class that I can just drop into the NIB and hook the NSTableView's dataSoruce property up to it. If anyone's interested in the code, I'd be more than happy to show it somewhere.