phoneGap 打包ios 过程以及遇到的各种困难

1、用phoneGap 2.9 打包ios app  xcode 6.1    过程:

1)首先创建项目

2)将项目复制到www目录

3)设置问题

            (1)关于ios  7状态栏问题,只要加入如下代码就行了

- (void)viewWillAppear:(BOOL)animated
{
// View defaults to full size. If you want to customize the view's size, or its subviews (e.g. webView),
// you can do so here.
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {

CGRect viewBounds = [self.webView bounds];

viewBounds.origin.y = 20;

viewBounds.size.height = viewBounds.size.height - 20;

self.webView.frame = viewBounds;

}
NSLog(@"%@",NSStringFromCGRect(self.view.frame));

[super viewWillAppear:animated];
}

- (void)viewDidLoad
{

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
}
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}



(2)关于编译出现

file not found: /Users/xxxx/Library/Developer/Xcode/DerivedData/xxxx-gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/xxxx/InstallationBuildProductsLocation/Applications/libCordova.a
error: linker command failed with exit code 1 (use -v to see invocation)
解决办法是
Target's Build Settings-> Other Linker Flags
将 $(TARGET_BUILD_DIR)/libCordova.a 修改为 $(BUILT_PRODUCTS_DIR)/libCordova.a


(3)关于验证的时候闪退的问题

                 到www-bulid-MyAPPNavtive中删除xxx.app就可以了


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值