【发布时间】:2014-05-26 07:34:41
【问题描述】:
在设备上应用 FixPack 1(适用于 Worklight 6.1.01)后,我们注意到 iOS 中出现了一些意外行为。我们在 iOS 6 和 7.1 上都试过,它们都显示相同的行为。
我们为部署增加了应用程序的版本号(即从 1.2 到 1.3)。当用户尝试通过 AppCenter 移动客户端更新应用程序时,安装后,应用程序将停止在带有 IBM 徽标的初始屏幕上。只有删除/卸载应用程序并重新安装应用程序才能正常工作。
我们在 xcode 中检查控制台日志并得到以下打印输出:
May 26 13:16:42 MY-iPad profiled[713] <Notice>: (Note ) profiled: Service stopping.
May 26 13:16:42 MY-iPad kernel[0] <Debug>: launchd[714] Container: /private/var/mobile/Applications/284CEAF0-8B89-467C-BA55-0F277FFA6521 (sandbox)
May 26 13:16:42 MY-iPad backboardd[28] <Error>: HID: The 'Passive' connection 'MyMobileApp' access to protected services is denied.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [WORKLIGHT] -[WLCordovaAppDelegate handleAppWebResources:] in WLCordovaAppDelegate.m:373 :: NativeInitUntilWebViewLoad : START
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [OCLogger] Max file size exceeded for log messages.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Web resources integrity test is disabled.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Application windows are expected to have a root view controller at the end of application launch
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Multi-tasking -> Device: YES, App: YES
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Unlimited access to network resources
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [CDVTimer][splashscreen] 15.210986ms
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [CDVTimer][TotalPluginStartup] 17.367005ms
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: WARNING: AutoHideSplashScreen key in Cordova.plist is missing or set to NO! SplashScreen will display indefinitley unless you manually hide it. Set value to YES to autohide.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [WORKLIGHT] -[WLCordovaAppDelegate postInitOnMainThread:] in WLCordovaAppDelegate.m:303 :: NativeInitUntilWebViewLoad : END
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: [DEBUG] [OCLogger] Max file size exceeded for log messages.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Resetting plugins due to page load.
May 26 13:16:42 MY-iPad MyMobileApp[714] <Warning>: Failed to load webpage with error: The requested URL was not found on this server.
在这个问题上进行一些谷歌搜索导致了这个Worklight 6.1 "access to protected services is denied" after app is deployed to App Store。这是一个类似的问题,但行为不同。
目前我们已指示用户在升级应用程序之前清除所有数据,但我们不能继续使用此方法,因为设备中将存在我们无法仅用于升级的关键数据应用程序。
对此的任何信息或想法表示赞赏。
更新
我们尝试使用服务器配置工具重新部署应用程序,但同样的问题仍然存在。我们检查了 Fixpack 安装的日志,没有报告错误。 IBM Installation Manager 还显示安装的版本是最新的 6.1.01,它不允许我更新它,只能修改。
更新 2
删除native文件夹并重新部署应用程序(从.wlapp文件到.ipa文件)后,同样的问题仍然出现。然而,观察到一种模式。
如果应用程序被重新构建和重新部署,从 AppCenter 进行的第一次安装将照常运行,这意味着数据将被保留并且应用程序正常运行,即使代码和版本没有任何变化.但是如果再次点击install按钮重新安装,就会出现问题。
【问题讨论】:
-
这个警告怎么样? “:警告:Cordova.plist 中的 AutoHideSplashScreen 键丢失或设置为 NO!SplashScreen 将显示 indefinitley,除非您手动隐藏它。将值设置为 YES 以自动隐藏。”
-
@IdanAdar 基于观察,即使应用程序运行正常(当我们从设备中删除应用程序并将其重新安装时),该警告也会显示,因此我们假设警告不是这个问题的原因。
-
我们在
native文件夹中的config.xml中找到了此设置:<preference name="AutoHideSplashScreen" value="true" /> -
我在上面的链接上发布了我们对类似问题的解决方案。简短的版本是我们应用了一个不完整的 6.1.0.1 补丁包,然后我们的 App Store 和服务器应用程序版本号不匹配。我们的副作用有点不同 - 挂在白色屏幕上,我们没有 AutoHideSplashScreen 错误,但可能值得检查修复包和版本号。祝你好运!
-
@Handly 感谢您提供的信息,我们将尝试检查。我们不使用 AppStore 来分发应用程序,只是通过 IBM 提供的 AppCenter。同时,我将查看应用程序中的 Worklight 版本号与服务器中的版本号。 =)
标签: ios cordova ibm-mobilefirst