AeroGear 在 Windows 10 方面的新特性

    xiaoxiao2023-06-16  167

    Windows 10 第一个预览版已经发布很长时间了,而且也很快发布最终版本(29 July)。AeroGear 开发可以关注一下最新的一些改进,其中最大的改进是不再需要 2 个不同的二进制包,同样的代码可以在 Windows 桌面,平板和手机上运行(甚至是 Xbox)。这意味着如果你想迁移你的应用,或者你有 #if状态,你需要修改他们,运行下面代码检测:

    using Windows.Foundation.Metadata; // you used to have #if WINDOWS_PHONE_APP // something for hardware buttons #endif // now you can use Metadata to make it a runtime check if (ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) { HardwareButtons.BackButtonPressed += BackButtonHandler; } runtime-check.cs hosted with by GitHub

    想要使用 Mobile specific API 你需要添加 Mobile Extension SDK.

    这不是说你的应用不能在桌面运行,所以你需要运行上面的测试,你也可以选择继续只在手机上运行。Visual Studio 2015 还不能自动处理这些,这里提供一个强大的 shell script,可以把很多事情自动化处理。还有一个 Windows 10 方面的新特性是 'metro' 应用不再默认全屏幕启动。文章转载自 开源中国社区 [http://www.oschina.net]

    相关资源:aerogear-ios-oauth2:OAuth2OpenID Connect的客户端库-源码
    最新回复(0)