Answers

@interface Answers : NSObject

This class exposes the Answers Events API, allowing you to track key user user actions and metrics in your app.

  • Log a Sign Up event to see users signing up for your app in real-time, understand how many users are signing up with different methods and their success rate signing up.

    Declaration

    Swift

    class func logSignUp(withMethod signUpMethodOrNil: String?, success signUpSucceededOrNil: NSNumber?, customAttributes customAttributesOrNil: [AnyHashable : Any]? = nil)

    Objective-C

    + (void)logSignUpWithMethod:(nullable NSString *)signUpMethodOrNil
                        success:(nullable NSNumber *)signUpSucceededOrNil
               customAttributes:(nullable NSDictionary *)customAttributesOrNil;

    Parameters

    signUpMethodOrNil

    The method by which a user logged in, e.g. Twitter or Digits.

    signUpSucceededOrNil

    The ultimate success or failure of the login

    customAttributesOrNil

    A dictionary of custom attributes to associate with this event.

  • Log an Log In event to see users logging into your app in real-time, understand how many users are logging in with different methods and their success rate logging into your app.

    Declaration

    Swift

    class func logLogin(withMethod loginMethodOrNil: String?, success loginSucceededOrNil: NSNumber?, customAttributes customAttributesOrNil: [AnyHashable : Any]? = nil)

    Objective-C

    + (void)logLoginWithMethod:(nullable NSString *)loginMethodOrNil
                       success:(nullable NSNumber *)loginSucceededOrNil
              customAttributes:(nullable NSDictionary *)customAttributesOrNil;

    Parameters

    loginMethodOrNil

    The method by which a user logged in, e.g. email, Twitter or Digits.

    loginSucceededOrNil

    The ultimate success or failure of the login

    customAttributesOrNil

    A dictionary of custom attributes to associate with this event.

  • Log a Share event to see users sharing from your app in real-time, letting you understand what content they’re sharing from the type or genre down to the specific id.

    Declaration

    Swift

    class func logShare(withMethod shareMethodOrNil: String?, contentName contentNameOrNil: String?, contentType contentTypeOrNil: String?, contentId contentIdOrNil: String?, customAttributes customAttributesOrNil: [AnyHashable : Any]? = nil)

    Objective-C

    + (void)logShareWithMethod:(nullable NSString *)shareMethodOrNil
                   contentName:(nullable NSString *)contentNameOrNil
                   contentType:(nullable NSString *)contentTypeOrNil
                     contentId:(nullable NSString *)contentIdOrNil
              customAttributes:(nullable NSDictionary *)customAttributesOrNil;

    Parameters

    shareMethodOrNil

    The method by which a user shared, e.g. email, Twitter, SMS.

    contentNameOrNil

    The human readable name for this piece of content.

    contentTypeOrNil

    The type of content shared.

    contentIdOrNil

    The unique identifier for this piece of content. Useful for finding the top shared item.

    customAttributesOrNil

    A dictionary of custom attributes to associate with this event.

  • Log an Invite Event to track how users are inviting other users into your application.

    Declaration

    Swift

    class func logInvite(withMethod inviteMethodOrNil: String?, customAttributes customAttributesOrNil: [AnyHashable : Any]? = nil)

    Objective-C

    + (void)logInviteWithMethod:(nullable NSString *)inviteMethodOrNil
               customAttributes:(nullable NSDictionary *)customAttributesOrNil;

    Parameters

    inviteMethodOrNil

    The method of invitation, e.g. GameCenter, Twitter, email.

    customAttributesOrNil

    A dictionary of custom attributes to associate with this event.

  • Log a Purchase event to see your revenue in real-time, understand how many users are making purchases, see which i