mixpanel/mixpanel-iphone — pull request #97 by idpaterson (2014-01-08 20:27:51+00:00)
Title: Request surveys by People distinctId rather than Event distinctId

Surveys must be requested by People ID, rather than Events ID in case the two happen to be different. This will not affect most people but we are still stuck using a separate identifier for people and events until Mixpanel resolves the inability to `alias` multiple "device IDs" to the same "user ID."

This is a simple, straightforward change. The preceding lines already use `self.people.distinctId` to ensure that an identifier is set, and in all normal use of the library these identifiers will be equivalent. The problem in our case was that the event identifier `self.distinctId` was being sent to the survey endpoint, causing the following error to be emitted:
```
survey check api error: distinct_id, no user found
```
This change simply sends `self.people.distinctId` rather than `self.distinctId` in that request.