aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-05-18 16:13:03 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-05-20 18:29:56 +0000
commit92970c2cb233bc3c629250312761637ffb6d36b8 (patch)
tree38171ea6c354d1b0e01a6df62139eb4da1857b06
parenta43be24e46a2f64c5f94165cfe393038a2f8065a (diff)
XCode: fix handling provisioning profiles
The abuse of the file tags to pass additional information to the prepare script is not working anymore, so set a fake module property instead. Also, automatically tag all provisioning profiles located in xcode.provisioningProfilesPath. Also, do not raise error if user did not provide any *.entitlements files. This patch fixes deploying the iOS application to the device Change-Id: I9356af334a928099d59f747d6f186634df8168d3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--share/qbs/modules/xcode/xcode.qbs16
1 files changed, 10 insertions, 6 deletions
diff --git a/share/qbs/modules/xcode/xcode.qbs b/share/qbs/modules/xcode/xcode.qbs
index 7bbb29c6e..500cdd0de 100644
--- a/share/qbs/modules/xcode/xcode.qbs
+++ b/share/qbs/modules/xcode/xcode.qbs
@@ -259,7 +259,7 @@ Module {
name: "Provisioning Profiles"
prefix: xcode.provisioningProfilesPath + "/"
files: ["*.mobileprovision", "*.provisionprofile"]
- fileTags: [] // HACK: provisioning profile handling is not yet ready and can break autotests
+ fileTags: ["xcode.provisioningprofile"]
}
FileTagger {
@@ -333,12 +333,14 @@ Module {
artifacts.push({
filePath: FileInfo.joinPaths(product.destinationDirectory, obj.fileName),
- fileTags: ["xcode.provisioningprofile.main", obj.filePath]
+ fileTags: ["xcode.provisioningprofile.main"],
+ qbs: { _inputFilePath: obj.filePath }
});
artifacts.push({
filePath: FileInfo.joinPaths(product.destinationDirectory, obj.fileName + ".xml"),
- fileTags: ["xcode.provisioningprofile.data.main", dataFile]
+ fileTags: ["xcode.provisioningprofile.data.main"],
+ qbs: { _inputFilePath: dataFile }
});
}
}
@@ -352,7 +354,7 @@ Module {
var output = outputs[tag][i];
var cmd = new JavaScriptCommand();
cmd.silent = true;
- cmd.inputFilePath = output.fileTags.filter(function(f) { return f.startsWith('/'); })[0] // QBS-754
+ cmd.inputFilePath = output.qbs._inputFilePath; // there's no such prop in qbs, see QBS-754
cmd.outputFilePath = output.filePath;
cmd.sourceCode = function() {
File.copy(inputFilePath, outputFilePath);
@@ -370,7 +372,7 @@ Module {
Artifact {
filePath: FileInfo.joinPaths(product.destinationDirectory,
product.targetName + ".xcent")
- fileTags: ["xcent", "bundle.input"]
+ fileTags: ["xcent"]
}
prepare: {
@@ -378,7 +380,9 @@ Module {
cmd.description = "generating entitlements";
cmd.highlight = "codegen";
cmd.bundleIdentifier = product.moduleProperty("bundle", "identifier");
- cmd.signingEntitlements = inputs["xcode.entitlements"].map(function (a) { return a.filePath; });
+ cmd.signingEntitlements = inputs["xcode.entitlements"]
+ ? inputs["xcode.entitlements"].map(function (a) { return a.filePath; })
+ : [];
cmd.platformPath = ModUtils.moduleProperty(product, "platformPath");
cmd.sdkPath = ModUtils.moduleProperty(product, "sdkPath");
cmd.sourceCode = function() {