Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1722

Signing iOS app fails due to missing Xcode variable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 2.0.1
    • 1.24.1
    • Toolchains: Xcode
    • None
    • macOS
    • fcda8acc0 (2.0), da4d41e62 (2.0)

    Description

       

      Building our iOS app fails in the build rule that creates the entitlements file with the following error:

      ERROR: TypeError: incompatible type of argument(s) in call to readFromData(); candidates were
          readFromData(QByteArray)
      	 at JavaScriptCommand.sourceCode
      	 at Rule.prepare in /usr/local/Cellar/qbs/1.24.1/share/qbs/modules/codesign/apple.qbs:301:18 

      A little investigation showed that this is caused by the code not being able to read the provisioning profile which is an input from a previous rule ("codesign.embedded_provisioningprofile"). The reason it doesn't work is because this artifact's file name is determined by a property that used to be set by Xcode:

      // apple.qbs:183
      readonly property string _embeddedProfileName:
          (xcode._platformProps || {})["EMBEDDED_PROFILE_NAME"]    

      The EMBEDDED_PROFILE_NAME variable doesn't exist anymore in Xcode 14.2 (maybe starting at 14.0, not verified).

      For the time being I fixed it by hardcoding the value to "embedded.mobileprovision" but I'm not sure how to fix it properly as I couldn't find any other way to get it from the new Xcode version.

       

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            lbuckel Leon Buckel
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: