Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt for iOS: code signing is required

Tags:

c++

ios

qt4

I have yes smite version installed on my MaC and also Xcode version is 6.1. I downloaded Qt from official website and tried to build a very simple program. However, it gave me 3 error messages

:-1: error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.

:-1: error: code signing is required for product type 'Application' in SDK 'iOS 8.1'

:-1: error: Xcodebuild failed.

I searched on web on possible solutions but could not find any. what should I do build my applications on qt?

like image 815
olzha bala Avatar asked Jan 31 '15 11:01

olzha bala


Video Answer


2 Answers

Add this to your qmake file for the project:

setting.name = DEVELOPMENT_TEAM
setting.value = XXXXXXXXXXXXXX
QMAKE_MAC_XCODE_SETTINGS += setting

Replace the X's with the actual value for your team. Note, the value is not the team name - it's some other identifier. To get that value (after downloading provisioning profiles in XCode), do the following :

  • Manually set the code signing team in an XCode project from within XCode (project general tab).
  • View the project file's "package contents"
  • Open the file project.pbxproj in a raw text editor.
  • Search for DEVELOPMENT_TEAM.
like image 73
BuvinJ Avatar answered Oct 07 '22 17:10

BuvinJ


Add this to the qmake file for your project:

ios: {
    QMAKE_DEVELOPMENT_TEAM = ABCDEF0123
    QMAKE_PROVISIONING_PROFILE = 12345678-abcd-1234-abcd-12345678abcd
}

To get these settings read your provisioning profile in ~/Library/MobileDevice/Provisioning Profile, specifically, the following sections:

<dict>
    <!-- ... -->
    <key>TeamIdentifier</key>
    <array>
            <string>ABCDEF0123</string>
    </array>
    <!-- ... -->
    <key>UUID</key>
    <string>12345678-abcd-1234-abcd-12345678abcd</string>
    <!-- ... -->
</dict>

Reference:

  • http://doc.qt.io/qt-5/qmake-variable-reference.html
like image 36
Stephen Quan Avatar answered Oct 07 '22 19:10

Stephen Quan