前幾天把CurrencyExchanger提交到微軟參加Master認證,結果沒有通過,反饋了一些錯誤,看來微軟檢查還是比較仔細的。錯誤主要有:Visual feedback helps users recognize whether their interactions with your app...
前幾天把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
該項目是以10586版本開發的, Package.appxmanifest文件中有以下版本號:<Dependencies> <TargetDeviceFamily Name="Windows.Mobile" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> </Dependencies>
於是想當然的把MinVersion改為了10.0.10586.0,但是編譯時又報錯,說MaxVersionTested不能小於Minversion,於是又把MaxVersionTested也改為10586,還是不行。
這就奇怪了,上次上傳的時候也沒改這個地方啊。看到有說VC++引用版本錯誤,又重新升級了一下Sqlite組件,結果還是不行。
UWP的打包速度很慢,反覆了好幾次,不管是分三個包上傳還是一個bundle包,都是一樣的錯誤。
反覆對比之後,只能懷疑TargetDeviceFamily了,將Mobile和Desktop改回原來的Universal,再上傳就成功了。
暫時沒找到這是什麼原因導致,難道發佈過一次Universal後就只能發佈Universal了?
如果您也有遇到類似問題歡迎討論。