Phonegap相关
1. 隐藏顶部的状态栏
在xxx-Info.plist中新增一项属性:"Status bar is initially hidden" = YES;此外,还可以增加其他的属性,例如Launch image等。
2. 用户滑动Webview时,正常情况下会超出边界然后弹回来,也就是Bounce,可以通过以下方式禁止这种行为:
在AppDelegate.m中的webViewDidFinishLoad方法中添加:
for (id subview in theWebView.subviews)
if ([[subview class] isSubclassOfClass: [UIScrollView class]])
((UIScrollView *)subview).bounces = NO;
不过在Phonegap1.5版本中已经可以通过Phonegap.plist中的属性来实现了。
3. Phonegap 内购 IAP插件
https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/InAppPurchaseManager
4. 修改Bounce时的背景色
theWebView.backgroundColor = [UIColorgrayColor];
5. Phonegap的deviceready事件通常要比DOMContentLoaded后触发。
Webkit相关
1. 防止页面一定位数的数字自动变成链接
当页面上存在一定位数的数字(例如8位)时,会突然自己变成链接,实际上是被webkit自动解析成电话号码了,可以通过以下方式禁止:
在Classes中的AppDelegate.m中的webViewDidStartLoad中添加
theWebView.dataDetectorTypes = UIDataDetectorTypeNone;
如果是在Safari中则可以通过添加相关的meta标签来设置,而在phonegap中则只能修改OC代码。
2. 阻止a标签长按后打开提示框
长按A标签后,iOS会从底部弹出一个列表,允许你选择以何种方式打开,如果要禁止这种提示时,可以添加下列css属性:
-webkit-touch-callout:none
3. 长按A标签会造成一定区域出现“蒙板式”的阴影,解决方案是添加以下的CSS代码(只在ipad和iphone中有效)
*{-webkit-tap-highlight-color:rgba(0,0,0,0);}
4. 监听视频播放时的全屏事件
// 进入全屏
video.bind( ‘webkitbeginfullscreen’, function() {
alert( ‘begin’ );
} );
// 结束全屏
video.bind( ‘webkitendfullscreen’, function() {
alert( ‘end’ );
} );
5. CPU被独占时,Timer会停止,因此需要考虑应对策略。
其他问题
1. IAP如果遇到问题可以检查以下选项
机器是否越狱,越狱无法测试,query时会返回invalidProductId
Have you enabled In-App Purchases for your App ID?
Have you checked Cleared for Sale for your product?
Does your project’s .plist Bundle ID match your App ID?
Have you configured your project to code sign using this new provisioning profile?Are you using the full product ID when when making an SKProductRequest?Are your bank details active on iTunes Connect?Contracts, Tax, and Banking全部显示Contacts In Effect
Have you tried deleting the app from your device and reinstalling?
2. APN服务器端 pem的生成
Installing the SSL Certificate and Key on the ServerYou should install the SSL distribution certificate and private cryptographic key you obtained earlier on the server computer on which the provider code runs and from which it connects with the sandbox or production versions of APNs. To do so, complete the following steps:
1). Open Keychain Access utility and click the My Certificates category in the left pane.
2). Find the certificate you want to install and disclose its contents.
You’ll see both a certificate and a private key.
3). Select both the certificate and key, choose File > Export Items, and export them as a Personal Information Exchange (.p12) file.
4). Servers implemented in languages such as Ruby and Perl often are better able to deal with certificates in the Personal Information Exchange format. To convert the certificate to this format, complete the following steps:
(1). In KeyChain Access, select the certificate and choose File > Export Items. Select the Personal Information Exchange (.p12) option, select a save location, and click Save.
(2). Launch the Terminal application and enter the following command after the prompt:
openssl pkcs12 -in CertificateName.p12 -out CertificateName.pem -nodes
5). Copy the .pem certificate to the new computer and install it in the appropriate place.
注意:经测试,<iOS5的设备如果连了VPN会收不到PUSH(可以用电脑共享的网络),iOS5是可以的。
3. 手机中打开iTunes链接
itms-apps://+链接
相关推荐
基于PhoneGap技术的跨平台移动应用开发探讨.pdf
phonegap性能优化 以及phonegap + Angularjs + ionic 移动app开发介绍
phonegap技术实现了指南针功能,界面跟iphone上的指南针一样,
跨平台开发技术-PhoneGap从入门到精通(PhoneGap、罗盘、运动传感器、地理位置
NULL 博文链接:https://heicx.iteye.com/blog/2076820
跨平台开发技术-PhoneGap从入门到精通(PhoneGap、罗盘、运动传感器、地理位置
跨平台开发技术-PhoneGap从入门到精通(PhoneGap、罗盘、运动传感器、地理位置
PhoneGap, 通信机制及部署和调试 运动传感器, 跨平台开发 地理位置,
跨平台开发技术-PhoneGap从入门到精通(PhoneGap、罗盘、运动传感器、地理位置
◆ 分享了使用网络、设备以及通知功能进行工作的技术 ◆ 为掌握文件系统、Web数据库以及存储提供重要的指导 ◆ 鼓励你充分利用地理定位、罗盘以及加速计的功能 ◆ 可以通过贯穿本书的一组练习来实践所学的知识
最新的跨平台移动开发技术,phonegap将是未来移动开发的趋势,一次代码编写多平台运行
自我实现的一个Phonegap实现离线功能,word文档
快速发展的移动互联网技术使得移动终端成为实现对...针对这种情况,提出采用HTML5及PhoneGap等技术,解决移动网站、App、微信端的研发差异性。最后,搭建完整地系统技术架构,并以网站购物为例验证跨平台移动建站的可行性。
安卓汇率项目使用了到了phonegap技术jquery技术
跨平台开发技术-PhoneGap从入门到精通(PhoneGap、罗盘、运动传感器、地理位置
第3章通过一个汇率计算器实例讲解PhoneGap应用开发的完整流程和相关技术细节;第4章详细讲解PhoneGap的API;第5章和第6章是两个综合性的案例(指南针、万圣节更衣室),它们都遵循构想、设计、开发、调试、发布五大...
感觉跨平台开发慢慢会成为主流,自己也研究了一下跨平台开发的相关技术,其中PhoneGap和IntelXDK个人感觉是比较好的,也尝试了一把,这里写了一个空白的模板,第三方文件都包含在里面,不用辛苦去找了,只需将开发好...
移动端开发调试工具,PhoneGap是一个采用HTML,CSS和JavaScript的技术,创建移动跨平台移动应用程序的快速开发平台。它使开发者能够在网页中调用IOS,Android,Palm,Symbian,WP7,WP8,Bada和Blackberry等智能手机的...
HTML5是HTML下一个主要的修订版本,现在仍处于发展阶段。目标是取代1999年所制定的HTML 4.01和XHTML 1.0 标准,以期能在互联网应用迅速...广义论及HTML5时,实际指的是包括HTML、CSS和JavaScript在内的一套技术组合。
资源名称:NFC Arduino、Android与PhoneGap近场通信内容简介:《NFC:Arduino、Android与PhoneGap近场通信》将带你走入近场通信(NFC)的世界,这是一种快速发展的技术,它能够让设备近距离交换数据或使用无线电信号...