问题
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