Hi, my employer wants me to make my project to be built for several clients, besides our own main app. This are the requirements: Besides the main app, we will have different apps with their own layouts, app name, bundle id, color scheming, icons and image assets specific to our clients's needs.
The functionalities and features of the client specific apps will be the same with the main app. So it's more like a customized skinning of the main app, if you may.
When the main app got updated with a new feature, all the client specific apps will also automatically updated so they will also get the benefit of the new feature..
I have thought of a way to do that. I have actually split the codebase into layers using the CleanArchitecture + MVVM. I was thinking that I I can just make the main project into a framework and I will just reuse it in those projects with different Assets.xcassets and Info.plist.
I have some questions regarding this: Is this the right approach for me to do this?
Is there any other approach that is better than what I had in mind?
This won't break any rule from Apple and can pass the review, right?
Thanks.
Post
Replies
Boosts
Views
Activity
I've got a class derived from UIView called ContentListView that goes like this:
ContentListView source code
It is used in the view controller like this:
ContentsViewController source code
But when I tried to run it on iOS 11 and 12 (both simulators and actual devices), it crashed. Although it worked on iOS 13 and 14. It crashed with this error:
Precondition failed: NSArray element failed to match the Swift Array Element type
Expected ContentListView but found UIView: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1001.0.82.4/swift/stdlib/public/core/ArrayBuffer.swift, line 346
2021-09-22 13:24:27.624568+0700 Kolibree[16970:513272] Precondition failed: NSArray element failed to match the Swift Array Element type
Expected ContentListView but found UIView: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1001.0.82.4/swift/stdlib/public/core/ArrayBuffer.swift, line 346
The contentListViews in the storyboard themselves are of the type ContentListView so the error seems weird. How do I solve this? It has been days and I'm stuck at this. :(
Thanks in advance.