Platform: OpenFeint iOS SDK 2.8

Readme.html for OpenFeint iOS SDK 2.8
Release date 12.10.2010
Release Notes Copyright (c) 2009-2010 Aurora Feint Inc.
All Rights Reserved.

 

  In this document  

New in OpenFeint iOS SDK Version 2.8

New Features

Integration Notes

Social Notifications API has a new method in place of the old method:
+ (void)sendWithPrepopulatedText:(NSString*)text originalMessge:(NSString*)message imageName(NSString*)imageName.
This is now the only acceptable way to send a social notification though our application. No developer may call other method to send a social notification through openfeint at risk of being shut off from OpenFeint. Sending social notifications in other manners puts OpenFeint in violation of Facebook terms of service.

OpenFeint iOS Quick Start Guide

The steps necessary to start developing your first OpenFeint-enabled game on iOS are:
  1. Make sure that you have XCode version 3.2.2.
  2. Make sure that you are building with Base SDK of 3.0 or newer.
  3. Make sure you have the current version of OpenFeint. Unzip the file.
  4. If you have previously used OpenFeint, delete the existing group reference from your project.
  5. If you have previously used OpenFeint, delete your build directory. Otherwise xcode might get confused and the game will crash because xcode didn't realize a .xib file changed.
  6. Drag and drop the unzipped folder titled OpenFeint onto your project in XCode. Make sure it's included as a group and not a folder reference.
  7. Remove unused asset folders. This is not a necessary step but helps cut down the application size. You need to do this every time you download a new OpenFeint project.
  8. Right click on your project icon in the Groups & Files pane. Select Get Info.
  9. Make sure that the following frameworks are included in your link step:
    (do this by right clicking on your project and selecting Add->Existing Frameworks...)
  10. We recommend that you specify the latest available released version of the iOS SDK as your base SDK and specify iOS 3.0 as the deployment target so that your app will will also support older devices. Specify the base SDK in the pull down menu in the upper left of the XCode project window. Specify the deployment target in the project settings. OpenFeint does not support versions of iOS older than iOS 3.0.
  11. If you specify a deployment target older than the base SDK, the following frameworks should use "weak linking": To specify weak linking, right click on the build target, select the "General" tab, and in the "type" column change from "Required" to "Weak" for the selected framework.
  12. You must have a prefix header. The following line must be in the prefix header:
    #import "OpenFeintPrefix.pch"
    
  13. Source files that reference OpenFeint in any way must be compiled with Objective-C++ (Use a .mm file extension, rather than .m).

Releasing your title with OpenFeint

To release your title with OpenFeint:

How To Use OpenFeint

Initializing OpenFeint

Initialize OpenFeint on the title screen after you've displayed any splash screens. When you first initialize OpenFeint, it presents a modal dialog box to conform with Apple regulations.

To initialize OpenFeint, use this function call:

[OpenFeint initializeWithProductKey:andSecret:andDisplayName:andSettings:andDelegates:];

Shutting down OpenFeint

To shut OpenFeint down, make the following function call:
[OpenFeint shutdown];

Additional required functions

Developers are required to notify OpenFeint of device lock / unlock events in order to reduce processing and save battery:
[OpenFeint applicationDidBecomeActive];
This method should be invoked from the UIApplicationDelegate object's applicationDidBecomeActive: method.
[OpenFeint applicationWillResignActive];
This method should be invoked from the UIApplicationDelegate object's applicationWillResignActive: method.

OpenFeint configuration settings

Settings are provided to OpenFeint as an NSDictionary. Here is an example of how to create a settings dictionary for use with the initialize method:
 
NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
    [NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft], OpenFeintSettingDashboardOrientation,
    @"ShortName", OpenFeintSettingShortDisplayName, 
    NSNumber numberWithBool:YES], OpenFeintSettingEnablePushNotifications,
    [NSNumber numberWithBool:NO], OpenFeintSettingDisableChat,
    nil
]; 
More information about each of these settings can be found below. These settings are also described in OpenFeintSettings.h.

What is the OFDelegatesContainer? Where is the OpenFeintDelegate?

OFDelegatesContainer provides a way for you to specify all of the various delegates that OpenFeint features may require.

If you are only using an OpenFeintDelegate you may use the simple convenience constructor:

[OFDelegatesContainer containerWithOpenFeintDelegate:];

What is OpenFeintDelegate for?

This is the bread-and-butter OpenFeint delegate:
- (void)dashboardWillAppear;
This method is invoked whenever the dashboard is about to appear. We suggest that application developers use this opportunity to pause any logic / drawing while OpenFeint is displaying.
 - (void)dashboardDidAppear;
This method is invoked when the dashboard has finished its animated transition and is now fully visible.
 - (void)dashboardWillDisappear;
This method is invoked when the dashboard is about to animate off the screen. We suggest that applications that do not use OpenGL resume drawing in this method.
 - (void)dashboardDidDisappear;
This method is invoked when the dashboard is completed off the screen. We suggest that OpenGL applications resume drawing here, and all applications resume any paused logic / gameplay here.
 - (void)playerLoggedIn:(NSString*)playerId;
This method is invoked whenever an application successfully connects to OpenFeint with a logged in player. The single parameter is the OpenFeint player id of the logged in player.
 - (BOOL)showCustomOpenFeintApprovalScreen;
This method is invoked when OpenFeint is about to show the welcome / approval screen that asks a player if they would like to use OpenFeint. You can learn more about customizing the approval screen here.

OFNotificationDelegate

This delegate deals with the in-game notification pop-ups that OpenFeint displays in response to certain events including high score submission, achievement unlocks, and social challenges. You can find more details by referencing the API feature article on notification pop-upsqqq--This is a bad link--qqq.

OFChallengeDelegate

This delegate deals with the Social Challenges API feature. You can find more details by referencing the qqq--Joe this article is ported to WP @ http://wordpress.of.c43893.blueboxgrid.com/wordpress/dev/ios-dev-2/introduction-to-challenges/ -- qqq Social Challenges feature article.

Launching the OpenFeint dashboard

The most basic launch of the OpenFeint dashboard is accomplished with a single function call:
[OpenFeint launchDashboard];
You can also launch the dashboard with a specific OpenFeintDelegate for use only during this launch using:
[OpenFeint launchDashboardWithDelegate:];
In addition, OpenFeint provides a suite of methods for launching the dashboard to a pre-defined tab or page. These are documented in the header file OpenFeint+Dashboard.h.
 +
(void)launchDashboardWithListLeaderboardsPage;
Invoke this method to launch the OpenFeint dashboard to the leaderboard list page for your application.
 +
(void)launchDashboardWithHighscorePage:(NSString*)leaderboardId;
Invoke this method to launch the OpenFeint dashboard to a specific leaderboard page. You must pass in a string representing the unique ID of the leaderboard you wish to view which can be obtained from the Developer Dashboard.
 + (void)launchDashboardWithAchievementsPage;
Invoke this method to launch the OpenFeint dashboard to the achievements list page for your application.
 + (void)launchDashboardWithChallengesPage;
Invoke this method to launch the OpenFeint dashboard to the challenge list page for your application.
 + (void)launchDashboardWithFindFriendsPage;
Invoke this method to launch the OpenFeint dashboard to the Find friends page, which prompts the player to use Twitter, Facebook, or a playername search to locate friends in OpenFeint.
 + (void)launchDashboardWithWhosPlayingPage;
Invoke this method to launch the OpenFeint dashboard to a page which lists OpenFeint friends who are also playing your application.

Orientation and View Controller information

The OpenFeint dashboard supports being displayed in any orientation you desire. It will not, however, change orientations while it is being displayed.

Developers use the OpenFeintSettingDashboardOrientation to control the initial orientation. If you wish to change the orientation over the course of the application you may invoke:

[OpenFeint setDashboardOrientation:];
Generally this is done by applications which want to support multiple orientations in the UIViewController method didRotateFromInterfaceOrientation:.
If your application is using a view controller with a non-portrait layout then you are required to invoke and return the following method in your UIViewController's shouldAutorotateToInterfaceOrientation method.
[OpenFeint shouldAutorotateToInterfaceOrientation:withSupportedOrientations:andCount:];
Here is an example implementation of shouldAutorotateToInterfaceOrientation:
 
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    const unsigned int numOrientations = 4;
    UIInterfaceOrientation myOrientations[numOrientations] = 
    { 
        UIInterfaceOrientationPortrait, UIInterfaceOrientationLandscapeLeft, 
        UIInterfaceOrientationLandscapeRight, UIInterfaceOrientationPortraitUpsideDown
    };
 
    return [OpenFeint 
        shouldAutorotateToInterfaceOrientation:interfaceOrientation 
        withSupportedOrientations:myOrientations 
        andCount:numOrientations];
}

Changelog


Version 2.7.4, 10.11.2010

Version 2.7.3, 9.28.2010

Version 2.7.1 9.16.2010

Version 2.7 9.15.2010

Version 2.6.1 8.26.2010

Version 2.6. 8.18.2010

Version 2.5.1, 7.14.2010

Version 2.5, 7.2.2010

Version 2.4.10 (6.10.2010)

Version 2.4.9 (5.28.2010)

Version 2.4.8 (5.12.2010)

Version 2.4.7 (5.7.2010)

Version 2.4.6 (4.3.2010)

Version 2.4.5 (3.16.2010)

Version 2.4.4 (2.18.2010)

Version 2.4.3 (2.3.2010)

Version 2.4.2 (1.18.2010)

Version 2.4.1 (1.7.2010)

Version 2.4 (12.17.2009)

Version 2.3 (10.05.2009)

Version 2.2 (9.29.2009)

Version 2.1.2 (9.09.2009)

Version 2.1.1 (8.28.2009)

Version 2.0.2 (7.22.2009)

Version 2.0.1 (7.13.2009)

Version 2.0 (6.29.2009)

Version 1.7 (5.29.2009)

Version 1.7 (5.22.2009)

Version 1.6.1 (5.13.2009)

Version 1.6 (4.29.2009)

Version 1.5 (4.21.2009)

Version 1.0 (3.26.2009)

Version 3.20.2009

Version 3.15.2009

Version 3.10.2009

Version 3.6.2009

Version 3.3.2009

Version 2.25.2009