在我的应用程序中使用 Simperium 时,应用程序退出并出现以下错误:
+[NSString sp_md5StringFromData:]: unrecognized selector sent to class 0x19fdfd8
我已经调试了足够多的代码,知道它在[[Simperium alloc] initWithViewController:controller]
方法中崩溃了,在下面的代码中:
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
UINavigationController *navController = (UINavigationController *)[tabBarController.viewControllers objectAtIndex:0];
NotesViewController *controller = (NotesViewController *)[[navController viewControllers] objectAtIndex:0] ;
self.simperium = [[Simperium alloc] initWithRootViewController:controller];
[self.simperium startWithAppID:@"my-app-ID-goes-here"
APIKey:@"the-API-key-would-go-here"
model:[self managedObjectModel]
context:[self managedObjectContext]
coordinator:[self persistentStoreCoordinator]];
我已经隐藏了 AppID 和 API 密钥 --- 这不是错误!:)