2016-07-11 16 views
1

iframeがiOSで動作するように、Cordova CLI 6.2.0とPhoneGap Desktop 0.3.3を使用しようとしています。私も助けを求めましたhttps://groups.google.com/forum/#!topic/phonegap/m1PPJuHtS8MPhonegap/Cordova:iOSでiframeコンテンツが読み込まれない

iframeは3月に早く作業していましたが、その後動作を停止しました。解決策の発見や他の遅延のために、以前に質問したり、エラーが発生したときの正確なバージョン番号を知ることができませんでした。

可能性をテストするために、私は機能をテストするための簡単なアプリを作った。

<link rel="stylesheet" type="text/css" href="css/index.css" /> 
    <link rel="stylesheet" type="text/css" href="css/page.css" /> 
    <script type="text/javascript" src="js/jquery-1.12.3.min.js"></script> 

    <title>Webpage Bring In Test</title> 
</head> 
<body> 
    <div class="app"> 

     <p>First Paragraph</p> 

     <iframe class="viewerStuff" src="http://www.uwsp.edu/library/Pages/default.aspx"> 
      <p>IFrame failed.</p> 
     </iframe> 

     <p>Second Paragraph</p> 

     <object type="text/html" data="http://www.uwsp.edu/library/Pages/default.aspx" class="viewerStuff"> 
      <p>Object failed.</p> 
     </object> 

     <p>Third Paragraph</p> 

     <p>-Update successfully loaded, though-</p> 
    </div> 

、ここではconfig.xml::私が関連していると思う部分は、ここでのindex.htmlの本を含め

<feature name="IntentAndNavigationFilter"> 
<param name="ios-package" value="CDVIntentAndNavigationFilter"/> 
<param name="onload" value="true"/> 
</feature> 
<access origin="*"/> 
<allow-intent href="http://*/*"/> 
<allow-intent href="https://*/*"/> 
<gap:plugin name="org.apache.cordova.whitelist" source="npm" /> 
<plugin name="cordova-plugin-whitelist" version="1"/> 
<allow-navigation href="*" /> 
<platform name="ios"> 
    <allow-intent href="itms:*"/> 
    <allow-intent href="itms-apps:*"/> 
</platform> 

あり、他の部分がありますが、私は「ドンそれらが適切であると思う。

ここでは、テスト対象のIpadの外観を示しています。 https://lh3.googleusercontent.com/-NGwIXwKz5q0/V369CMFBzwI/AAAAAAAAAtE/EquMiMl0a1gDdkBFbp8kTTGiyRISF0YvwCLcB/s1600/Iframe%2BIOS%2BTests%2B4%2B07072016.jpg StackExchangeに画像を埋め込むのに十分な履歴がないので、リンクしています。

また、ソリューションとしてXCodeを使用することはできません。私がアプリを開発している場所では、ポリシーの一部としてOS固有のコーディングが必要ない。

詳細が必要な場合や質問がある場合はお知らせください。

答えて

0

トライ編集あなたのindex.htmlのContent-セキュリティポリシーへ:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com *; style-src 'self' 'unsafe-inline' 'unsafe-eval'; media-src *; img-src 'self' data: content:; script-src * 'self' 'unsafe-inline' 'unsafe-eval';"> 
関連する問題