应用程序负载上的预期标识符NSString

时间:2011-12-05 19:55:46

标签: ios xcode nsstring

我正在尝试在didFinishLaunchingWithOptions上定义一个NSString但是我得到了一个预期的标识符错误。我是否将NSString baseURL放在错误的位置?

#import "AppDelegate.h"

NSString* baseURL = nil;

@implementation AppDelegate

@synthesize window = _window;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    baseURL = [@"http://mytesturl.com"];
    // Override point for customization after application launch.
    return YES;
}

1 个答案:

答案 0 :(得分:2)

字符串周围不应有括号。尝试:

baseURL = @"http://mytesturl.com";