前几天把CurrencyExchanger提交到微软参加Master认证,结果没有通过,反馈了一些错误,看来微软检查还是比较仔细的。
错误主要有:
Visual feedback helps users recognize whether their interactions with your application are detected, interpreted, and handled as they intended.
就是说如果一个列表项点击后没有任何动作的话,不应该有触摸反馈。UWP的ListView项默认会带Tilt效果,以前WP8的时候还要通过另外的Toolkit来实现,现在自带了,反而要想办法去掉。解决办法是自定义ListView的ItemContainerStyle,去掉里面的VisualStateGroup就可以了。
再一个错误:
Windows 10 applications should properly navigate back through pages when using the Windows 10 system back button.
在开发的时候主要针对PC和手机来进行了测试,手机有硬件返回键,所以处理了返回键的事件,PC没有返回键,就没做,但PC有一个平板模式,是可以显示返回键的,这个地方也需要处理。解决办法是增加处理SystemNavigationManager.GetForCurrentView().BackRequested事件即可。
再一个错误是功能性的,搜索货币时无法正常搜索,经检查代码是搜索内容忘了进行大小写转换,可以搜索小写字母,大写字母就搜不到了,属于粗心错误。统一ToUpper或者ToLower就可以了。
还有一个错误是这样的:
The following recommendation is optional and not required for STARTS compliance. With Windows 10 developers can write a single application that can be installed across a variety of device families including Mobile, Desktop, and XBOX. By default, Windows 10 applications target all device families. In the application manifest, this is called out as the ‘Universal’ Target Device Family. Such applications will be tested against all device form factors where this application may be deployed. Alternatively, developers can limit the device families for which an application can be deployed. For example, if ‘Desktop’ is specified and the Target Device Family, that application can only be installed on PC devices. When published, this application will only be available in the Store running on PCs – it will not be available in the Phone store.
The manifest file has Universal as TargetDeviceFamily. The application currently targets only desktop and mobile. It is recommended that the manifest entry is restricted only to supported devices and that a minimum of two device families are supported.
意思是说既然只支持PC和Mobile,就不要把TargetDeviceFamily设置为Universal。我就想当然的在Package.appsmanifest文件里修改了TargetDeviceFamily,设置为只有Desktop和Mobile。
还有一个错误:
The application should adapt properly to portrait or landscape view if supported.
这个是因为在635等分辨率低的机型上运行时,部分字体被截断了。而且在横屏的时候计算器界面也没显示完全。所以发布时应尽可能测试不同分辨率机型保持界面可用性。我调整了国旗图标大小,并且只支持竖屏状态,去掉了横屏支持。
然后顺手修复了几个小bug,开始上传商店。上传后在分析包的过程中出现以下错误:
XD.UWP.CurrencyExchanger_3.1.3.0_x86_x64_arm_bundle.appxupload28.0 MB