错误:预期的不合格ID(目标C)

时间:2018-07-14 18:17:39

标签: ios objective-c

错误指向“ if”语句和“ else”语句。

if ([bundleIdentifier isEqualToString:@"com.pknauf.nsa"]){
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Successfully installed"

    message:@"Thank you for installing myPackageName Beta 2.1"
    delegate: self
    cancelButtonTitle:@"Thanks"
    otherButtonTitles:nil];

    [alert show];
}

else{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Pirate Repository Detected"

    message:@"Please install myPackageName for free from my repo. Packages from piracy repos may contain malware."
    delegate: self
    cancelButtonTitle:@"Okay"
    otherButtonTitles:nil];

    [alert show];

    }

有人可以帮我弄清楚为什么会发生此错误吗?非常感谢。

0 个答案:

没有答案