iOS7 和 Apple Watch [英] iOS7 and Apple Watch

查看:26
本文介绍了iOS7 和 Apple Watch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个最低 iOS 目标为 iOS7 的应用.

I have a app with the minimum iOS target iOS7.

我正在考虑为 Apple Watch 添加一些额外的功能.如果应用程序在 iOS 8 上运行,是否可以选择将 iOS7 作为最低目标并仍然添加对 Apple Watch 的支持?类似于 iOS8 的扩展/小部件.

I am considering in add some extra features with the apple watch. Theres is any option to maintain the iOS7 as the minimum target and still add support for apple watch if the app is running on a iOS 8? Something like the extensions/widgets of the iOS8.

提前致谢

推荐答案

您可以将部署目标设置为 iOS7.x,并确保针对 iOS8.2 SDK 构建.您需要在构建设置中将框架设置为 optional(弱链接)并执行运行时检查以确保您不会在 iOS7.x 设备上尝试使用它们.

You can set your deployment target to iOS7.x and make sure you build against iOS8.2 SDK. You will need to set the frameworks as optional (weak linking) in your build settings and perform run time checks to ensure you don't attempt anything with them on an iOS7.x device.

可选框架将在框架未链接的应用中解析为 nil.

Optional frameworks will resolve as nil in an app where the framework is not linked.

这篇关于iOS7 和 Apple Watch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆