2017-09-21 62 views
0

我正在嘗試對我的IBM MobileFirst應用程序進行直接更新工作,但它僅適用於Android版本。 這是我的conf文件。直接更新在Android上工作但未在IPad/iPhone上工作

authenticationConfig.xml

<?xml version="1.0" encoding="UTF-8"?> 
<tns:loginConfiguration xmlns:tns="http://www.worklight.com/auth/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <staticResources> 
     <resource id="subscribeServlet" securityTest="SubscribeServlet"> 
      <urlPatterns>/subscribeSMS*;/receiveSMS*;/ussd*</urlPatterns> 
     </resource> 
    </staticResources> 
    <securityTests> 


     <mobileSecurityTest name="mobileWithDirectUpdate"> 
       <testDirectUpdate mode="perSession"/> 
     </mobileSecurityTest> 

     <customSecurityTest name="securityCanalLojista"> 
      <test realm="wl_authenticityRealm" step="1"/> 
      <test realm="wl_antiXSRFRealm" step="2"/> 
      <test realm="wl_remoteDisableRealm" step="2"/> 
      <test isInternalUserID="true" realm="wl_anonymousUserRealm" step="2"/> 
      <test isInternalDeviceID="true" realm="wl_deviceNoProvisioningRealm" step="2"/> 
      <test realm="wl_directUpdateRealm" mode="perSession" step="1" /> 
     </customSecurityTest> 

     <customSecurityTest name="SubscribeServlet"> 
      <test realm="SubscribeServlet" isInternalUserID="true"/> 
     </customSecurityTest>   
    </securityTests> 

    <realms> 
     <realm name="SampleAppRealm" loginModule="StrongDummy"> 
      <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className> 
     </realm> 

     <realm name="SubscribeServlet" loginModule="rejectAll"> 
      <className>com.worklight.core.auth.ext.HeaderAuthenticator</className>   
     </realm> 
    </realms> 

    <loginModules> 
     <loginModule name="StrongDummy" expirationInSeconds="3600"> 
      <className>com.worklight.core.auth.ext.NonValidatingLoginModule</className> 
     </loginModule> 

     <loginModule name="requireLogin" expirationInSeconds="3600"> 
      <className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className> 
     </loginModule> 

     <loginModule name="rejectAll" expirationInSeconds="3600"> 
      <className>com.worklight.core.auth.ext.RejectingLoginModule</className> 
     </loginModule> 
    </loginModules> 
</tns:loginConfiguration> 

applicationDescriptor.xml

<?xml version='1.0' encoding='utf-8'?> 
<application id="br_com_customer_CanalLojista" platformVersion="7.1.0.00.20160229-1240" xmlns="http://www.worklight.com/application-descriptor" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <displayName>CanalLojista</displayName> 
    <description>A sample Apache Cordova application that responds to the deviceready event.</description> 
    <author> 
     <name>IBM MobileFirst Team</name> 
     <email>[email protected]</email> 
     <copyright>Copyright My Company</copyright> 
     <homepage>https://developer.ibm.com/mobilefirstplatform/documentation/getting-started</homepage> 
    </author> 
    <mainFile>index.html</mainFile> 
    <thumbnailImage>www/img/thumbnail.png</thumbnailImage> 
    <accessTokenExpiration>3600</accessTokenExpiration> 
    <userIdentityRealms /> 
    <licenseAppType>APPLICATION</licenseAppType> 
    <targetCategory>UNDEFINED</targetCategory> 
    <android version="1.0.0" securityTest="securityCanalLojista"> 
     <worklightSettings include="false" /> 
     <security> 
      <encryptWebResources enabled="false" /> 
      <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3" /> 
      <publicSigningKey>MyPublicKeyuhaush</publicSigningKey> 
      <packageName>br.com.customer.CanalLojista</packageName> 
     </security> 
    </android> 
    <iphone bundleId="br.com.customer.CanalLojista" applicationId="br_com_customer_CanalLojista" version="1.0.0" securityTest="securityCanalLojista"> 
     <worklightSettings include="false" /> 
     <security> 
      <encryptWebResources enabled="false" /> 
      <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3" /> 
     </security> 
    </iphone> 
</application> 

我部署的版本是用我的securityTest。 enter image description here

在此IBM文章Enabling Direct Update Authenticity checks,看到一些關於directUpdateAuthenticityPublicKey標籤,但我敢肯定,如果我真的需要設置它,因爲它是沒有必要看它的工作在Android上。

有人知道我的項目有什麼問題嗎?

+0

a)在iPhone中,應用程序是否成功連接到服務器?即便如此,你沒有看到直接更新發生? b)可以肯定 - 你已經更新並部署了iPhone wlapp呢? c)您正在使用獨立服務器還是羣集? –

+0

a)是的,我可以正常登錄並使用應用程序。不,直接更新不起作用。 b)是的。 c)獨立 –

回答

0

對不起,夥計們,我的配置是好的,我改變了一個代碼,這是沒有必要的ipad/iphone,這就是它沒有下載新版本的原因。在更改iPad上必要的文件後,它下載了一個新版本。

相關問題