Package .bundle resources inside that they are not visible while distribution

狂风中的少年 提交于 2020-06-27 16:37:24

问题


I am trying to build a Static Library (MyLibrary) with bundle(Resources) which will hold resources like images and CoreData model file used within the static library.

I build and generated 2 files, under Products folder, libMyLibrary.a and Resources.bundle . I guess while distribution I need to send these 2 to the customer.

I noticed that only sending libMyLibrary.a won't work and I need to add a folder named MyLibrary.swiftmodule as well so that the app can identify the framework.

So To reduce all this (and the issue for making the Static library compatible with both Device and Simulator), I converted the Static Library to Static Framework using a script which finally generates MyLibrary.framework. I add this to the app that uses this library, add,

Build Settings -> Search Path -> Compile Path = $(PROJECT_DIR)/MyLibrary.framework

and everything seems to be working.

My only problem is that the Resources.bundle, which I have provided to the customer which MyLibrary uses, the client can see the contents inside that bundle

Is there a way to somehow hide all these resources from the customer like for MyLibrary.framework, the customer cannot see the code.

Maybe some packing or something but in a way that the library can still access the Resources.bundle

来源:https://stackoverflow.com/questions/62020282/package-bundle-resources-inside-that-they-are-not-visible-while-distribution

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