Skip to content

Transition Guide from 0.6.0 or earlier to 0.7.0

shu223 edited this page Aug 28, 2013 · 3 revisions

###Required

  • Remove Growth.framework, Growth.bundle, GrowthSDK.strings and Add AppSocially.framework, AppSocially.bundle, AppSociallySDK.strings

  • Fix the #import

(0.6.0 or earlier)

#import <Growth/Growth.h>

(0.7.0)

#import <AppSocially/AppSocially.h>
  • Rename the class names

    • Growth -> AppSocially
    • GRXxxx -> ASXxxx
  • Fix the way to set the Twitter account

(0.6.0 or earlier)

[GRTwitterDMInviter setSenderAccount:account];

(0.7.0)

[ASInviter setSenderAccount:account type:ASInviteTypeTwitterDM];

###Optional

####Invite Related

  • Rename the methods

    • inviteFriends:inviteInfo:viewController:withMessage:completion: -> inviteFriends:inviteInfo:onViewController:withMessageForm:completion:
  • Change showInviteSheetInView: method's class

(0.6.0 or earlier)

[Growth showInviteSheetInView:self.view];

(0.7.0)

[ASInviter showInviteSheetInView:self.view];
  • Fix the way to invite

(0.6.0 or earlier)

// Twitter
[GRTwitterDMInviter invite:nil completion:nil];

// Facebook
[GRFacebookMessageInviter invite:nil completion:nil];

// Mail
[GRMailInviter invite:nil completion:nil];

// SMS
[GRSMSInviter invite:nil completion:nil];

(0.7.0)

// Twitter
[ASInviter inviteVia:ASInviteTypeTwitterDM inviteInfo:nil completion:nil];

// Facebook
[ASInviter inviteVia:ASInviteTypeFacebookMessage inviteInfo:nil completion:nil];

// Mail
[ASInviter inviteVia:ASInviteTypeMail inviteInfo:nil completion:nil];

// SMS
[ASInviter inviteVia:ASInviteTypeSMS inviteInfo:nil completion:nil];

####Share Related

  • Fix the way to share

(0.6.0 or earlier)

[GRTwitterSharer setContentUrl:contentUrl];
[GRTwitterSharer shareWithItems:shareItems completion:nil];

(0.7.0)

[ASSharer shareWithType:ASShareTypeTwitter
             shareItems:shareItems
             contentUrl:contentUrl
             completion:nil];
  • Fix the way to share via Mail

(0.6.0 or earlier)

[GRXxxxSharer shareWithSenderName:@"APP_USER_NAME"
                       contentURL:url
                    presetMessage:presetMessage
                       completion:nil];

(0.7.0)

[ASSharer setSenderName:@"SENDER_NAME" type:ASShareTypeMail];
[ASSharer shareWithType:ASShareTypeMail
             shareItems:@[kPresetMessage]
             contentUrl:url
             completion:^(NSError *error) {
                 
                 if (error) {
                     NSLog(@"error occured:%@", error);
                 }
                 else {
                     NSLog(@"Suceeded!");
                 }
             }];