phoneGap 打包ios 过程以及遇到的各种困难
2014-11-25 10:18
351 查看
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就可以了
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就可以了
相关文章推荐
- iOS开发工具-如何使用网络封包分析工具Charles,通过配置proxy对http、https、tcp、udp 等协议的请求响应过程交互信息进行分析、判断、解决我们移动开发中的遇到的各种实际问题。
- IOS 打包所遇到的问题以及解决方案
- IOS开发中遇到的各种问题以及解决方案集锦
- [项目过程中所遇到的各种问题记录]目录索引以及简单介绍
- iOS text文本框编辑过程中的遇到的问题以及解决
- IOS打包动态库以及使用的过程和注意事项
- 阿里云----------阿里云服务器使用过程中遇到的各种奇葩问题以及解决渠道
- iOS工作遇到的困难以及解决方案
- 整理iOS工作学习过程中遇到的各种问题
- 萌新更新Android Studio 3.0遇到的各种gradle错误以及解决过程
- Win10 Python 3.6.1 安装pycrypto 过程中遇到的坑以及各种解决方法
- 更新phonegap2.9打包的dojo开发页面的ios app遇到的问题
- Windows下Tensorflow-GPU的安装,Tensorboard的使用,以及过程中遇到的各种坑
- cocos2d-x 3.4版本游戏打包AKP (重点记录如何解决打包过程中遇到的各种问题)
- iOS 开发中遇到的各种证书的详细说明以及申请讲解
- IOS开发中遇到的各种问题以及解决方案集锦
- [项目过程中所遇到的各种问题记录]工具篇——.NET开发时常用的工具类库
- [项目过程中所遇到的各种问题记录]ORM篇——使用NHibernate配置对象实体的一些小问题 22
- [项目过程中所遇到的各种问题记录]图表篇——有关MSChart的一些小技巧
- [项目过程中所遇到的各种问题记录]转载