SUEnableSystemProfiling in plist ignored?

Asked by billibala

I wanna enable sending system profile information.

I tried putting the SUEnableSystemProfiling key in plist. But no profile info is sent.

Then I tried using key binding to the key "sendsSystemProfile" to a check box.

This works for the first run.

When i quit the app (properly quit it. not quitting from debugger) and launch it again, the setting seems to be ignored. I can see that the check box is still checked. However, no profile info is sent.

I implemented the delegate method - feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile. "sendingProfile" is "NO". It was "YES" during the first time the check box is checked.

Is it a bug or me misusing the framework?

Please advice.

Thanks
Bill

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
Andy Matuschak (andymatuschak) said :
#1

Interesting. Try deleting all your prefs .plists for your app and then building it with SUEnableSystemProfiling = YES in your .plist. Then run your app, quit it, and run it again. Your app should pop up a dialog asking for permission to update, and it should also ask if it's okay to profile your system.

Check if *that* setting persists between launches. It's possible that the binding has some bug. Also, try verifying the boolean being reported to the delegate method by checking your webserver logs.

Sorry for the trouble!

Revision history for this message
billibala (billibala) said :
#2

Hi Andy,

Thanks for your help!

I've tried your recommendation and did some changes to the plist file. I think there may be some problem that you may need to check a bit... (or explain a little more in the documentation...)

My info.plist contains:

SUEnableSystemProfiling YES(BOOL)
SUFeedURL http://localhost/update/index.php/updater
SUPublicDSAKeyFile dsa_pub.pem
SUScheduledCheckInterval 86400

Under the above configuration, my test app behaves as you mentioned.

However, if i add the SUEnableAutomaticChecks (no matter I set it YES or NO), sparkle won't promote and ask for permission to send system profile.

Please advice.

Best Regards
Bill

Revision history for this message
Andy Matuschak (andymatuschak) said :
#3

Oh! I just realized: you're running into a little gotcha in Sparkle's profiling:

"Note: In order to standardize the statistics across a userbase with varying update check intervals, Sparkle submits profiling information only once per week."

That's why you're seeing the BOOL change. For debugging purposes, you can delete SULastProfileSubmissionDate from your user defaults after each submission to force Sparkle to submit the profile.

Sorry for the confusion.

Revision history for this message
billibala (billibala) said :
#4

Thanks again for your prompt reply.

Yeah... i realized that as well.

But, still, that did not explain why no profile information is sent when I have removed all pref plist (those com.xxx.xx files). And, at the same time, the SUEnableAutomaticChecks and SUEnableSystemProfiling are both set YES in a new run.

Or, my observation is wrong?

Revision history for this message
Best Andy Matuschak (andymatuschak) said :
#5

SUEnableSystemProfiling turns on the profiling machinery and enables asking the user in that initial prompt you saw.

SUSendProfileInfo (aka sendsSystemProfile) is the *user* setting determining whether the profile should be sent.

In order for a profile to be sent, *both* of these must be set to YES. So when you delete the .plist to get rid of the last sent date, you're also getting rid of the user's permission to send the profiling info (created when you called setSendsSystemProfile:YES).

Revision history for this message
billibala (billibala) said :
#6

Thanks Andy Matuschak, that solved my question.