Janrain: User management platform for the social web

JREmailObject Class Reference

Object containing content to be shared by email. More...

#import <JRActivityObject.h>

Inherits NSObject.

List of all members.

Properties

NSString * subject
NSString * messageBody
BOOL isHtml
NSArray * urls

Constructors



(id) - initWithSubject:andMessageBody:isHtml:andUrlsToBeShortened:
(id) + emailObjectWithSubject:andMessageBody:isHtml:andUrlsToBeShortened:

Detailed Description

Object containing content to be shared by email.

Create an email object, fill in the fields, and add the object to the JRActivityObject.email property in your JRActivityObject. The given content is supplied to the MFMailComposeViewController class when the user wants to share your activity via email.

If your email message body contains URLs that you would like shortened to an http://rpx.me/ URL (with which you can track click-throughs), add the exact URL(s), as NSString*s, to the urls array. The library will contact the Engage servers to obtain shortened URLs and replace any instance of the url in your email body.

Note:
If the user attempts to share the activity via email before the call to shorten the URLs is returned, the email will contain the original URLs and the click-throughs will not be tracked.
Once the MFMailComposeViewController is displayed, the given subject and body can be modified by the user.

Member Function Documentation

- (id) initWithSubject: (NSString *)  subject
andMessageBody: (NSString *)  messageBody
isHtml: (BOOL)  isHtml
andUrlsToBeShortened: (NSArray*)  urls 

Returns a JREmailObject initialized with the given subject and message body.

Parameters:
subject The desired subject of the email. The user can edit this value once the MFMailComposeViewController is displayed
messageBody The desired message body of the email. The message body can be in plain text or html, and if it is in html, this should be indicated by the argument isHtml. If you want to include urls that are shortened to an http://rpx.me/ they should be added to the urls array. Once the call to get the shortened URLs is completed, the library will replace all occurrences of each url with its corresponding shortened url. This value can be edited by the user once the MFMailComposeViewController is displayed
isHtml YES if the message body contains HTML content or NO if it contains plain text
urls The array of urls that JREngage will shorten to an http://rpx.me/ Once the call to get the shortened URLs is completed, the library will replace all occurrences of each url with its corresponding shortened url. To avoid blocking the UI, if the user tries to share via email before the call is returned, the original urls will remain. The URLs must be an NSString* representation of a well-formed URL, with a scheme and host. They cannot be an empty string or nil
Returns:
A JREmailObject initialized with the given subject and message body

Properties

- (NSString*) subject [read, write, copy]

The desired email subject.

- (NSString*) messageBody [read, write, copy]

The desired message body.

- (BOOL) isHtml [read, write, assign]

Specify YES if the body parameter contains HTML content or specify NO if it contains plain text.

- (NSArray*) urls [read, write, copy]

An array of URLs that will be shortened to the http://rpx.me domain so that click-through rates can be tracked.


The documentation for this class was generated from the following files:
  • /Users/lillialexis/iPhone/engage.iphone/JREngage/classes/JRActivityObject.h
  • /Users/lillialexis/iPhone/engage.iphone/JREngage/classes/JRActivityObject.m
Copyright © 2017 Janrain, Inc.