2012-12-04 47 views
0

我在一个iOS应用程序(演示)中集成了GREE,经过一天的努力,代码足够好,可以正常执行并生成一些UI响应,但可惜这并不值得,请检查:GREE集成与错误

enter image description here

我也有我的控制台的东西;

2012-12-04 09:52:22.721 GreeHelloSample[1295:1bb03] GreeJSAbstractStateCommand:name must be overloaded in subclasses. 
2012-12-04 09:52:22.724 GreeHelloSample[1295:1bb03] GreeJSAsyncCommand:name must be overloaded in subclasses. 
2012-12-04 09:52:22.725 GreeHelloSample[1295:1bb03] GreeJSLoadAsynchronousCommand:name must be overloaded in subclasses. 
2012-12-04 09:52:22.997 GreeHelloSample[1295:1bb03] [Gree][GreePlatform.m:381] Initialized Gree Platform SDK 3.4.0 (Build release/v3.4.0_public_189) 
2012-12-04 09:52:24.589 GreeHelloSample[1295:1bb03] didLogoutUser 
2012-12-04 09:52:25.003 GreeHelloSample[1295:1bb03] greePlatformWillShowModalView 

但我累了,无法跟踪出了什么问题,现在?所以,帮助我。

编辑1:

这里是所有相关的代码,我写道:

.H

#import <UIKit/UIKit.h> 
#import "GreePlatform.h" 
#import "GreePlatformSettings.h" 

#define kGreeApplicationID @"XXXXX" 
#define kGreeConsumerKey @"XXXXXXXXXXXX" 
#define kGreeConsumerSecret @"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 

@class GHSViewController; 
@interface GHSAppDelegate : UIResponder <UIApplicationDelegate, GreePlatformDelegate> 

@property (retain, nonatomic) UIWindow *window; 
@property (retain, nonatomic) GHSViewController *viewController; 

@end 

.M

#import "GHSAppDelegate.h" 
#import "GHSViewController.h" 

@implementation GHSAppDelegate 

- (void)dealloc 
{ 
    [_window release]; 
    [_viewController release]; 
    [super dealloc]; 
} 

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 
    // Override point for customization after application launch. 
    self.viewController = [[[GHSViewController alloc] initWithNibName:@"GHSViewController" bundle:nil] autorelease]; 
    self.window.rootViewController = self.viewController; 
    [self.window makeKeyAndVisible]; 

    NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:GreeDevelopmentModeSandbox, GreeSettingDevelopmentMode, nil]; 

    [GreePlatform initializeWithApplicationId:kGreeApplicationID 
            consumerKey:kGreeConsumerKey 
           consumerSecret:kGreeConsumerSecret 
            settings:settings 
            delegate:self]; 
    [GreePlatform handleLaunchOptions:launchOptions application:application]; 

    return YES; 
} 

- (void)applicationWillResignActive:(UIApplication *)application 
{ 
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 
} 

- (void)applicationDidEnterBackground:(UIApplication *)application 
{ 
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 
} 

- (void)applicationWillEnterForeground:(UIApplication *)application 
{ 
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 
} 

- (void)applicationDidBecomeActive:(UIApplication *)application 
{ 
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 
} 

- (void)applicationWillTerminate:(UIApplication *)application 
{ 
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 
    [GreePlatform shutdown]; 
} 

#pragma mark - GreePlatformDelegate 
/** 
* Sent to the receiver when Gree will show a modal view (dashboard, login dialogs, 
* etc.) that will interrupt your application. 
* @note It is recommended that you suspend your application logic here. 
*/ 
-(void)greePlatformWillShowModalView:(GreePlatform*)platform{ 
    NSLog(@"greePlatformWillShowModalView"); 
} 
/** 
* Sent to the receiver when Gree has dismissed a modal view (dashboard, login dialogs, 
* etc.) that was interrupting your application. 
* @note It is recommended that you resume your application logic here. 
*/ 
-(void)greePlatformDidDismissModalView:(GreePlatform*)platform{ 
    NSLog(@"greePlatformDidDismissModalView"); 
} 
/** 
* Sent to the receiver when your application's user logs in to the Gree Platform. 
*/ 
-(void)greePlatform:(GreePlatform*)platform didLoginUser:(GreeUser*)localUser{ 
    NSLog(@"didLoginUser"); 
} 
/** 
* Sent to the receiver when your application's user logs out of the Gree Platform. 
*/ 
-(void)greePlatform:(GreePlatform*)platform didLogoutUser:(GreeUser*)localUser{ 
     NSLog(@"didLogoutUser"); 
} 
/** 
@brief Notifies the parameter received when an application starts. 
@param params Parameter received when an application starts. 
*/ 
-(void)greePlatformParamsReceived:(NSDictionary*)params{ 
     NSLog(@"greePlatformParamsReceived"); 
} 
+0

您可能想要在怀疑它出错的地方包含一些代码。这很不明确。然而,似乎你没有正确设置其中一个类的实现,不要重载name变量。作为猜测。 – Bergasms

+0

大概这会明确.. – rptwsthi

+0

嗯,我不明白任何东西。我根本不是格力专家。我想知道是否有一些图书馆你也许没有联系到。或者,格力试图连接到互联网,但连接失败或脱机。对不起,我忍不住了。 – Bergasms

回答

0

在这里,我们走!

我犯了这个愚蠢的错误。其实我正在使用生产(格力应用)ID,在沙箱中执行我的应用程序。虽然格力提供不同的沙箱ID在沙箱环境中运行应用程序。其余的东西都可以,谢谢格力框架SDK,特别是展示柜*(示例应用程序)。