Hide source code in swift framework when distributing

≡放荡痞女 提交于 2019-12-21 12:29:53

问题


I have created a swift framework for distribution to private customers and its the first time I have created an iOS framework so I am very clueless about a lot of things. Is it possible that my source codes can be hidden.I have searched everywhere but I can't find a proper answer to this. I'm not sure if Im explaining it thoroughly but to simplify I don't want developers to be able to modify or see the code in my framework. Can't developers just go and edit my code that they embedded in their own app.Is there a way to prohibit this. Thank you.


回答1:


Here is a fantastic tutorial demonstrates how to hide implementation of Swift framework when distributing to Cocoapods:

https://crafttang.com/2017/10/12/hide-implementation-of-swift-framework-when-distri/




回答2:


So I actually learned more about frameworks over the past few months and also completed my framework and it turns out what I was trying to achieve could be done by deploying only the framework product under the products file.Only your declarations will be visible so your source code wont be visible unless you include those files too while distributing your framework.



来源:https://stackoverflow.com/questions/43989818/hide-source-code-in-swift-framework-when-distributing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!