昨天在提交AppStore的時(shí)候遇到了一個(gè)問(wèn)題锐秦,蘋果構(gòu)建版本的時(shí)候出現(xiàn)了此版本無(wú)效的問(wèn)題:
圖片
經(jīng)過(guò)查找資料發(fā)現(xiàn)是由于代碼里面調(diào)用了蘋果的私有API造成的誉帅,代碼里面的私有API是關(guān)于屏幕旋轉(zhuǎn)的問(wèn)題:
這只是通過(guò)kvo是間接的調(diào)用但是還是被蘋果發(fā)現(xiàn)了:
代碼如下:
-(void)viewWillAppear:(BOOL)animated{
NSNumber *orientationUnknown = [NSNumber numberWithInt:UIInterfaceOrientationUnknown];
[[UIDevice currentDevice] setValue:orientationUnknown forKey:@"orientation"];
NSNumber *orientationTarget = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft];
[[UIDevice currentDevice] setValue:orientationTarget forKey:@"orientation"];
}
這是比較坑爹的啊。奈附。赡矢。肋演。。薪伏。滚澜。。嫁怀。最后把代碼去掉了才上傳成功構(gòu)建版本成功设捐。。眶掌。挡育。~~~~~