10

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.

EmirC
  • 468
  • 5
  • 14
  • 1
    you want static library, here is tutorial: https://www.raywenderlich.com/41377/creating-a-static-library-in-ios-tutorial , old but should help you. – janusfidel May 15 '17 at 22:49

1 Answers1

0

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.

EmirC
  • 468
  • 5
  • 14
  • when you saying "declarations", what do you mean? do you mean s.source_files in .podspec? – DàChún Oct 13 '17 at 10:17
  • 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. – EmirC Oct 14 '17 at 11:01
  • Hello, What was the solution for this @EmirC ? 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 ? – Maryeme Alaoui Feb 05 '19 at 15:39
  • @EmirC 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 – superjos Jun 14 '19 at 08:52