相关疑难解决方法(0)

如何以编程方式检查应用程序的捆绑版本?

我已经创建了一个应用程序,并且已经在我的iphone上安装了它,但是我想以编程方式检查我的应用程序包版本.怎么办?

iphone

27
推荐指数
2
解决办法
1万
查看次数

如何从iphone中的项目test-Info.plist中的标签中检索Bundle Version?

在这里,我正在粘贴我的代码,我想从我的test-Info.plist中检索Bundle版本.

@interface testViewController : UIViewController {
    UILabel *label;
}
@property(nonatomic,retain) IBOutlet    UILabel *label;

@end

@implementation testViewController

@synthesize label;

- (void)viewDidLoad {
    [super viewDidLoad];

    NSString *path = [[NSBundle mainBundle] pathForResource:@"test-info" ofType:@"plist"];

    NSString *versionString = [NSString stringWithFormat:@"v%d", [plistData objectForKey:@"Bundle version"]];

    label.text = versionString;
}

@end
Run Code Online (Sandbox Code Playgroud)

但在我错了的地方,我仍然得到零值

iphone ios

4
推荐指数
1
解决办法
4219
查看次数

标签 统计

iphone ×2

ios ×1