1. 隐藏顶部的状态栏

         在xxx-Info.plist中新增一项属性:"Status bar is initially hidden" = YES;此外,还可以增加其他的属性,例如Launch image等。

2. 用户滑动Webview时,正常情况下会超出边界然后弹回来,也就是Bounce,可以通过以下方式禁止这种行为:



    for (id subview in theWebView.subviews)
        if ([[subview class] isSubclassOfClass: [UIScrollView class]])
            ((UIScrollView *)subview).bounces = NO;


3. Phonegap 内购 IAP插件

4. 修改Bounce时的背景色

theWebView.backgroundColor = [UIColorgrayColor];

5. Phonegap的deviceready事件通常要比DOMContentLoaded后触发。


1. 防止页面一定位数的数字自动变成链接


theWebView.dataDetectorTypes = UIDataDetectorTypeNone;


2. 阻止a标签长按后打开提示框


3. 长按A标签会造成一定区域出现“蒙板式”的阴影,解决方案是添加以下的CSS代码(只在ipad和iphone中有效)

4. 监听视频播放时的全屏事件

               // 进入全屏
               video.bind( ‘webkitbeginfullscreen’, function() {
                    alert( ‘begin’ );
               } );             

               // 结束全屏
               video.bind( ‘webkitendfullscreen’, function() {
                    alert( ‘end’ );
               } );

5. CPU被独占时,Timer会停止,因此需要考虑应对策略。


1. IAP如果遇到问题可以检查以下选项


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.


3. 手机中打开iTunes链接


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">