直接更新在Android上工作但不能在IPad / IPhone上工作

时间:2017-09-21 21:46:08

标签: ibm-mobilefirst

我正在尝试在我的IBM MobileFirst应用程序上进行直接更新,但它仅适用于Android版本。 这是我的conf文件。

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>mobileb@us.ibm.com</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上看到它。

有人知道我的项目有什么问题吗?

1 个答案:

答案 0 :(得分:0)

对不起伙计们,我的配置还可以,我正在更改ipad / iphone不需要的代码,这就是为什么它没有下载新版本的原因。在ipad上更改了必要的文件后,它下载了一个新版本。