Upgrade Notes: Socialize v2

Overview

This document highlights some of the major changes made in the second version of the SDK, and how you can update your product to get the most out of Socialize v2.

Basic Upgrade Process

For starters, this is your first time upgrading to a new Socialize release, check out our Upgrading Guide.

API Client Changes

Direct API calls are now block-based. In addition, most of the core API functionality has been grouped into the utils classes. The utils classes with new API calls are:

View Controller changes

The builtin view controllers are now packaged in simpler wrapper classes that you should use instead. Typedefs have been added, and your old code should continue to work. The new top-level controllers hide many underlying details and have a simpler block-based interface for handling completion.

The full list of view controller changes:

There is a new share dialog controller SZShareDialogViewController which you can display directly.

Action Bar Changes

In addition, the action bar has been rewritten. Because the interface has changed significantly, this is packaged as an entirely new class. You should prefer the SZActionBar instead of the SocializeActionBar. The major change in the way the bar is used is that instead of having a view property, the bar is itself a view. You can read more about using the new action bar in the Action Bar Section

// Implementation

// Instantiate the action bar in your view controller

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    if (self.actionBar == nil) {
        self.entity = [SZEntity entityWithKey:@"some_entity" name:@"Some Entity"];
        self.actionBar = [SZActionBar defaultActionBarWithFrame:CGRectNull entity:self.entity viewController:self];
        [self.view addSubview:self.actionBar];
    }
}