Skip to content

How to set multiplatform flavor based on XCode target with CocoaPods? #151

Answered by mr-kew
mr-kew asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, so I finally figured it out.

Running embedAndSign task in a CocoaPods project to set a gradle.property is wrong. As discussed in the original issue, it can lead to linking issues and generally does not make much sense, as the shared module is already build as a pod.

Intended way (as I understand it):

  1. Edit iOS configurations to contain the flavor name (e.g. ProdDebug). It can be done in project settings under the Info tab. CocoaPods should then automatically create corresponding configuration files under the Pods folder.

  2. Edit your scheme for each target to run the corresponding configuration.

  3. The configuration name is then automatically passed to the gradle when building the modu…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Qw4z1
Comment options

@mr-kew
Comment options

Answer selected by mr-kew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants