Specify provisioning profile

I configured to specify provisioning profile.

env

Windows 10
Android Studio 3.1
Multi-OS Engine Plugin 1.4.2
moe-plugin-gradle 1.4.4
macOS 10.13.4
Xcode 9.3

(I have poor English)


for Gradle

create file

ProjectDir
+-- ios
    +-- moe.remotebuild.properties

example

host=11.22.33.44
port=22
user=foo
identity=C:/moekey/ssh_priv_key.txt
knownhosts=C:/moekey/known_hosts
keychain.name=moeremotebuild.keychain
keychain.pass=bar
keychain.locktimeout=3600

edit file

ProjectDir
+-- ios
    +-- build.gradle

excerpt

moe {
    // moe<sourceset><mode><plat>XcodeBuild
    
    moeMainReleaseIphoneosXcodeBuild {
        additionalParameters = [
            //Xcode 8 or later, specify provisioning profile, not automatic (*1)
            'CODE_SIGN_STYLE=Manual',
            
            // add default value (*2)
            'MOE_GRADLE_EXTERNAL_BUILD=YES',
            'ONLY_ACTIVE_ARCH=NO'
        ]
        
        // specify provisioning profile, PROVISIONING_PROFILE_SPECIFIER=foo
        provisioningProfileSpecifier = 'foo'
    }
    
    signing {
        developmentTeam = 'AAAAAAAAAA'
        
        //not working (*3)
        //provisioningProfileSpecifier = 'foo'
    }
}

cmd.exe
ProjectDir> gradlew moeLaunch

or

menu -> View -> Tool Windows -> Gradle

execute

Project
+-- :ios
    +-- Tasks
        +-- moe
            +-- moeLaunch

(*1)
Apple recommends using automatic code signing
developer.apple.com/library/content/qa/qa1814/_index.html

PROVISIONING_PROFILE_SPECIFIER=Foo without CODE_SIGN_STYLE=Manual

Code Signing Error: AppExample1 has conflicting provisioning settings. AppExample1 is automatically signed, but provisioning profile Foo has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the project editor.

if using automatic:
remove ‘CODE_SIGN_STYLE=Manual’, ‘provisioningProfile’, ‘provisioningProfileSpecifier’

(*2)
default value: [‘MOE_GRADLE_EXTERNAL_BUILD=YES’, ‘ONLY_ACTIVE_ARCH=NO’]
https://github.com/multi-os-engine/moe-plugin-gradle/blob/df45550e45ddc385343914827ac710ff6919efa5/src/main/java/org/moe/gradle/tasks/XcodeBuild.java#L747

(*3)
please fix
https://github.com/multi-os-engine/moe-plugin-gradle/blob/df45550e45ddc385343914827ac710ff6919efa5/src/main/java/org/moe/gradle/tasks/XcodeBuild.java#L749

  addConvention(CONVENTION_PROVISIONING_PROFILE, ext.signing::getProvisioningProfile);
+ addConvention(CONVENTION_PROVISIONING_PROFILE_SPECIFIER, ext.signing::getProvisioningProfileSpecifier);

Try this. Don’t put them inside moe {}.

I’m sorry I didn’t explain it enough.
Since the title worked, I posted it in the Knowledge Base category.
However, since moeIpaBuild was not considered, I will add it to my setting.
Also, I understood that the task setting is appropriate outside moe {}.
Thank you.