Add improved support for simple iOS sticker packs (#824)

* Allow messages applications to skip the compile sources phase

By default, simple iOS sticker packs created in Xcode do not include
a compile sources phase. This change will allow messages applications
with an empty list of sources to skip that phase entirely.

* Add support for launchAutomaticallySubstyle in run schemes

This is especially important for simple iOS sticker packs that require
this run scheme setting to be set to 2 in order to run the scheme
properly.
This commit is contained in:
Sebastian Celis authored and GitHub committed 2020-04-06 13:37:37 -05:00
1 parent c3693d4098
commit 0328fa03e7
11 files changed
+59 -14

No files matched your search

+1 -3
View File
@@ -927,9 +927,7 @@ public class PBXProjGenerator {
}
let sourcesBuildPhaseFiles = getBuildFilesForPhase(.sources)
// Sticker packs should not include a compile sources build phase as they
// are purely based on a set of image files, and nothing else.
let shouldSkipSourcesBuildPhase = sourcesBuildPhaseFiles.isEmpty && target.type == .stickerPack
let shouldSkipSourcesBuildPhase = sourcesBuildPhaseFiles.isEmpty && target.type.canSkipCompileSourcesBuildPhase
if !shouldSkipSourcesBuildPhase {
let sourcesBuildPhase = addObject(PBXSourcesBuildPhase(files: sourcesBuildPhaseFiles))
buildPhases.append(sourcesBuildPhase)
+2 -1
View File
@@ -241,7 +241,8 @@ public class SchemeGenerator {
commandlineArguments: launchCommandLineArgs,
environmentVariables: launchVariables,
language: scheme.run?.language,
region: scheme.run?.region
region: scheme.run?.region,
launchAutomaticallySubstyle: scheme.run?.launchAutomaticallySubstyle
)
let profileAction = XCScheme.ProfileAction(