想把友盟相关配置写在category里,结果程序黑屏了



  • #import "AppDelegate+UMeng.h"

    @implementation AppDelegate (UMeng)

    • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
      {
      [UMSocialData setAppKey:@"asdfasdf"];
      return NO;
      }

    @end

    如上,这样配置友盟,可是程序运行起来就黑屏了。这是什么原因



  • 搞定了,didFinishLaunchingWithOptions方法不能写在category里,不过可以调用category里的方法;


Log in to reply