Login Module: Splash, login, registration, forgot password, Menubar
I have 5 different applications on iOS & Android platforms. I have common login and some other modules with common API calls. I have a common design for Login Modules in all 5 applications with only the background colour and application logo changed into it.
Now in android, we can export those modules in .aar files along with UI design and can use them in all 5 projects. This reduces our time and we do not have to copy and paste complete code. I can define/give different images for icons in android from outside of the module as well. In this way, we can show different logos and different applications.
Now I want to perform the same task on the iOS platform as well. So is there any way where I can create login modules once and then attach them to another project?
CodePudding user response:
Yes, you can use SPM to create your own framework that can contain your reusable view controllers.
You can then use the them just like you would any other view controller in your project without forgetting to import the framework in your file.
https://developer.apple.com/documentation/xcode/creating-a-standalone-swift-package-with-xcode
https://www.avanderlee.com/swift/creating-swift-package-manager-framework/
CodePudding user response:
yes it is possible.
I have the same idea like you to create framework and put something similar ( change only background and logo ) by checking the app name and apply the color or logo
For the how to I'm follow by this link