-
Hello, On a plain iOS App I used to create a new target and give it the new properties like the bundle ID, the App name and so on. Then I could create different assets file and assign them to a specific target. Something similar is possible on Android Studio with different flavors. Since with Skip the actual code is inside a single package, I was wondering if there's a way to achieve something similar, on Xcode I could still create a new target, but since the resource folder is inside the main package I can't find a way to address different resources in the code. And when the code is transpiled for Android how could I possibly create 2 different versions of the same app, since the skip environment files are not tied to a target? Is it something achievable of the best option is to duplicate the project? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Your observations are accurate: we unfortunately don't have any good way to do "flavors" of an app other than duplicating the app package. What I would recommend is putting the bulk of your app's logic in an external repository ("my-core-app") that you can add as a module dependency ("MyCoreApp") for your main app, and then have the multiple top-level app packages you create that depend on "my-core-app/MyCoreApp"). For example:
The top-level package in each app can vary the resources so that code in "MyCoreApp" that uses We know this isn't the best solution compared to the simplicity of being able to just add multiple Xcode targets, but that's the best we can do for the time being. |
Beta Was this translation helpful? Give feedback.
Your observations are accurate: we unfortunately don't have any good way to do "flavors" of an app other than duplicating the app package. What I would recommend is putting the bulk of your app's logic in an external repository ("my-core-app") that you can add as a module dependency ("MyCoreApp") for your main app, and then have the multiple top-level app packages you create that depend on "my-core-app/MyCoreApp"). For example:
The top-level package in each app can vary the resources so that code in "MyCoreApp" that uses
Bundle.main.url(forResource: …)
to access a named resource will be getting the app-specific resou…