我尝试将Renren iOS应用与SocialPlugin文档一起制作。
http://wiki.mobile.renren.com/en/index.php/Social_Plugin_Download
我在下面制作了AppDelegate。但每次我调用应用程序时,都失败了 在RMConnectCenter initializeConnectWithAPIKey。
守则是这样的。
- noriakiAppDelegate.h -
#import <UIKit/UIKit.h>
#import "RMConnectCenter.h"
@class noriakiViewController;
@interface noriakiAppDelegate : UIResponder <UIApplicationDelegate,RenrenMobileDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) noriakiViewController *noriakiviewcontroller;
@end
- noriakiAppDelegate.h.m -
#import "noriakiAppDelegate.h"
#import "noriakiViewController.h"
@implementation noriakiAppDelegate
@synthesize window = _window;
@synthesize noriakiviewcontroller = _noriakiviewcontroller;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[RMConnectCenter initializeConnectWithAPIKey:@"MY API KEY" secretKey:@"MY SECRET" appId:@"2080970" mobileDelegate:self];
return YES;
}
答案 0 :(得分:0)
你的意思是当你调用initializeConnectWithAPIKey时应用程序崩溃?
您没有传递API密钥和秘密
[RMConnectCenter initializeConnectWithAPIKey:@"MY API KEY" secretKey:@"MY SECRET" appId:@"2080970" mobileDelegate:self];
您使用的是故事板吗?