#import <OFChallenge.h>
List of all members.
Detailed Description
The public interface for OFChallenge allows you to create a challenge and send it to other users or qurery challenge data (if its a member of an OFChallengeToUser).
Member Function Documentation
- (void) displayAndSendChallenge |
|
|
|
Displays the default OpenFeint View for sending Challenges. If the user submits this view the challenge will be sent to the players selected in the view.
- Note:
- If this is called, there is no need to call sendChallenge:
-
When this UI is displayed, it will fill prompt the user to fill out the user message so there is no need to fill out this optional data.
-
Currently hiddenText, and sending challenges as a response to a challenge are not supported through this call.
Download's challenge data for a particular challenge.
- Parameters:
-
challengeDataUrl | The url of the blob (OFChallengeToUser's challengeDataUrl property) |
- Note:
- You should never have to call this function directly unless you implement your own UI. If you are using the OpenFeint views to accept challenges, then you should checkout out OFChallengeDelegate's - (void)userLaunchedChallenge:(OFChallengeToUser*)challengeToLaunch withChallengeData:(NSData*)challengeData; method.
- Returns:
- OFRequestHandle for the server request. Use this to cancel the request
- Note:
- Invokes - (void)didDownloadChallengeData:(NSData*)data OFChallenge:(OFChallenge*)challenge on success and
- (void)didFailDownloadChallengeDataOFChallenge:(OFChallenge*)challenge on failure
+ (NSString*) getResourceName |
|
|
|
Initializes a challenge
- Parameters:
-
definition | The the challenge definition |
text | Should state what needs to be fullfilled to complete the challenge |
data | The data needed to replay the challenge |
- Note:
- You may optionally also fillout userMessage A message entered by the user specific to this challenge. If the user does not enter one a default message should be provided instead hiddenText Not used directly by OpenFeint. Use this if you want to display any extra data with the challenge when implementing your own UI
Sends a challenge to a list of users. Use this call when you create your own UI for challenges.
- Parameters:
-
toUsers | Array of NSStrings with the id of the users who will receive the challenge (OFUsers resourceId property) |
inResponseToChallenge | For multi attempt challenges only. This is an optional parameter that is currently only used to track statistics on whether a challenge was created directly or as a "re-challenge" after beating a challenge. |
- Note:
- If you call displayAndSendChallengeStart you should not call this function directly.
-
Invokes - (void)didSendChallenge: on success and
- (void)didFailSendChallenge: on failure.
- Returns:
- OFRequestHandle for the server request. Use this to cancel the request
Set a delegate for all OFChallenge related actions. Must adopt the OFChallengeDelegate protocol.
- Note:
- Defaults to nil. Weak reference
- (BOOL) usesChallengeData |
|
|
|
Property Documentation
- (NSData *) challengeData [read, assign] |
- (NSString *) challengeDataUrl [read, assign] |
The Challenge Definition related to this challenge
- (NSString *) challengeDescription [read, assign] |
The Challenge Description
- (OFUser *) challenger [read, assign] |
The challenger
- Note:
- When calling sendChallenge:... this is nil b/c the challenger is always the current user
- (NSString *) hiddenText [read, write, retain] |
hidden text field defined by the developer.
- (NSString *) userMessage [read, write, retain] |
The user message for the challenge
The documentation for this class was generated from the following file: