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.
Hide source code in swift framework when distributing
Asked Answered
you want static library, here is tutorial: raywenderlich.com/41377/… , old but should help you. –
Unread
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.
when you saying "declarations", what do you mean? do you mean s.source_files in .podspec? –
Dicot
I mean as long as you don't include your source files while deploying your pod,If I'm not mistaken, people who use your pod won't be able to view how you have implemented your methods. The declarations are the same as in an Objective-C interface inside a header file. –
Drat
Hello, What was the solution for this @Drat ? actually I'm building my swift framework, but I do not see the declarations that you are talking about, like for header files in obj-c... (classes and methods are public, but I don't see declarations) . It only generates a project-swift.h class wich dont contain any thing. How can I make them visible, can you help please ? –
Brownedoff
@Drat are you sure that users of your framework cannot see the implementation? When I pick my Framework product in Release configuration and embed it in separate client app, I can still breakpoint in client app and then step in framework code, seeing library whole classes –
Restitution
© 2022 - 2024 — McMap. All rights reserved.