iOS - 读取Resource文件夹的js文件内容

NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"provinces" ofType:@"js"];
    NSData *data=[NSData dataWithContentsOfFile:jsonPath];
    NSString *responData =  [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];

你可能感兴趣的:(iOS - 读取Resource文件夹的js文件内容)