如果我使用DefaultSHKConfigurator類,它告訴我它需要在使用前配置。不能使用Sharekit。 「ShareKit必須在使用前配置」
*** 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'
所以,如果我創建一個自定義新鴻基配置,而不是延伸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 ....但是,這兩種方法都不能阻止我得到我不瞭解的錯誤。
FIX:
它需要在被稱爲
- (BOOL)應用:(UIApplication的*)應用didFinishLaunchingWithOptions:(NSDictionary的*)launchOptions {
我想通了。 ...它需要在 - (BOOL)應用程序中調用:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { – jimbob
'applicationDidFinishLaunching'從iOS 3.0開始折舊。 – danielbeard
喲感謝額外的信息隊友:) – jimbob