我不能粗心地更改我的框架吗? [英] Can't I carelessly change my framework?

查看:60
本文介绍了我不能粗心地更改我的框架吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建现代框架解决了版本控制以及获得API的重要性第一次就对了.然后,它说每个应用都有其自己的框架副本.那么,我是否可以不小心更改框架,即不用担心破坏正在使用较旧版本框架的其他应用程序吗?

解决方案

如果我们在谈论iOS上您自己的应用,那么您可以做任何喜欢的事情.框架"仅仅是一个模块,就像其他模块一样.它包含在应用程序中,并且只是应用程序代码的一部分,因此,如果您对其进行修订,则下一个更新将获得修订版本以及使用该版本的新代码,而没有问题.

但是,在OS X上,可以将框架安装到应用程序可以看到的库中.显然,在这种情况下,使用框架的代码在版本控制时必须小心.同样,即使在iOS上,如果您正在使用框架将模块传达给其他开发人员,则也必须尽量避免破坏使用该框架的现有代码.

Building Modern Frameworks addresses versioning and the importance of getting the API right the first time. Then, it says every app has its own copy of the framework. So then, can't I change my framework carelessly, i.e., without worrying about breaking other apps that are using older versions of my framework?

解决方案

If we're talking about your own app on iOS, you can do whatever you like. The "framework" is merely a module like any other module; it is included in the app and is simply part of the app's code, so if you revise it, the next update gets the revision and the new code that uses it and there's no problem.

On OS X, however, there's an ability to install a framework into the library where the app will see it. Clearly in that case the code that uses the framework must be careful about versioning. Similarly, even on iOS, if you are using your framework as a way to convey a module to other developers, you must try not to break heedlessly their existing code that uses your framework.

这篇关于我不能粗心地更改我的框架吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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