如果我使用 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.... 但是,这两种方法都不会阻止我收到这个我不太理解的错误。
使固定:
它需要被调用。
- (BOOL)应用程序:(UIApplication *)应用程序 didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {