如果我使用DefaultSHKConfigurator类,它会告诉我在使用之前需要配置它。
*** Terminating app due to uncaught exception 'IllegalStateException', reason: 'ShareKit must be configured before use. Use your subclass of DefaultSHKConfigurator, for more info see https://github.com/ShareKit/ShareKit/wiki/Configuration. Example: ShareKitDemoConfigurator in the demo app'因此,如果我创建一个自定义SHK配置器(它扩展了DefaultSHKConfigurator ),它会说有一个'Duplicate Interface Definition for class 'DefaultSHKConfigurator''
在本例中,这里是我要在下面创建配置器的applicationDiDfinishLaunching:
-(void)applicationDidFinishLaunching:(UIApplication *)application{
NSLog(@"application did finish launching.");
DefaultSHKConfigurator *configurator = [[CustomSHKConfigurator alloc] init];
[SHKConfiguration sharedInstanceWithConfigurator:configurator];
}如果它使用的是DefaultSHKConfigurator,我会调用代码来分配和插入一个DefaultSHKConfigurator.然而,这两种方法都无法阻止我得到这个我并不真正理解的错误。
修正:
它需要被叫来。
发布于 2012-09-06 23:22:00
FIX:需要调用它
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{https://stackoverflow.com/questions/12306775
复制相似问题