Maximo Anywhere iOS build Error Archive Failed due to certificate issue
During the iOS Build after resolving the Build System issue we were getting below error causing Archive Failed error.
[INFO] 2021-4-15 12:59:23 note: Planning build note: Constructing build description [INFO] 2021-4-15 12:59:25 note: Constructing build description error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "XXXXXXXCSG" with a private key was found. (in target 'AssetManager' from project 'AssetManager') [INFO] 2021-4-15 12:59:27 error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "XXXXXXXCSG" with a private key was found. (in target 'AssetManager' from project 'AssetManager')
[INFO] 2021-4-15 12:59:27 [ERROR] 2021-4-15 12:59:27 ** ARCHIVE FAILED ** [ERROR] 2021-4-15 12:59:27 xcodebuild: Command failed with exit code 65 [ERROR] 2021-4-15 12:59:27 Command failed: /Users/sreeja/IBM/Anywhere/MaximoAnywhereAppCntr/node_modules/cordova/bin/cordova build ios --device --release --packageType=enterprise --codeSignIdentity="iPhone Developer" --provisioningProfile=adff6abe-b00b-4137-bbf0-xhsld9d04631d --developmentTeam=XXXXXXXCSG--buildFlag='VALID_ARCHS=arm64 CURRENT_ARCH=arm64 ONLY_ACTIVE_ARCH=YES'
verb mfp-before-prepare Performing MFP before prepare hook. verb mfp-before-prepare Invoking platform specific hooks. verb mfp-config-xml Initializing get, set, and delete methods. verb mfp-after-prepare Preforming MFP after prepare hook. verb mfp-after-prepare Adding MFP platform version to config. verb mfp-after-prepare Invoking platform specific hooks. verb mfp-config-xml Initializing get, set, and delete methods. verb ios-after-prepare Performing iOS after prepare hook. verb ios-after-prepare Adding SDK checksum to configuration. verb after-prepare Parsing config.xml for update tags. verb after-prepare Updating files based on config.xml update tags. verb after-prepare Creating checksum file. verb ios-after-prepare Updating /Users/sreeja/IBM/Anywhere/MaximoAnywhereAppCntr/output/AssetDataManager/platforms/ios/AssetManager/Resources/mfpclient.plist with properties. verb after-prepare Parsing server information. verb ios-after-prepare Adding the MFP Frameworks to the Embedded Binaries section of the project verb ios-after-prepare Building platform specific static app properties. verb after-prepare Determining MFP client custom init value. verb mfp-after-prepare Preforming MFP after prepare hook. verb mfp-after-prepare Invoking platform specific hooks. verb mfp-config-xml Initializing get, set, and delete methods. verb ios-after-prepare Performing iOS after prepare hook. verb ios-after-prepare Removing non-embedded frameworks from embedded frameworks section since they automatically get added verb Performing MFP before compile hook. verb No web resource encryption requested ** ARCHIVE FAILED ** xcodebuild: Command failed with exit code 65
Apparently XCode was not able to verify the certificate from the provisioning profile. If we Opened the XCode Project and navigate to Signing & Capabilities section we can see an error message that Doesn't include signing certificate "Apple Development"
This error was coming even though all the provisioning profiles were already present in the /IBM/Anywhere/MaximoAnywhereAppCntr/signing folder.
Also the signing certificate was installed in MaxOS Key Chain Access.
If we import the same Provisioning profile file again using the drop down menu the error disappears as you can see below.
After this we cannot run the ./build.sh command from terminal as the project workspace gets purged during the build process. Therefore we need to use the Product->Archive option from XCode and run the build directly from XCode.or we can also run the command that failed during previous build from Terminal. e.g.
Go to workspace folder and run the below command which had failed, previously. Copy the command from the error log directly.
cd /Users/sreeja/IBM/Anywhere/MaximoAnywhereAppCntr/output/AssetDataManager/platforms/ios/
xcodebuild
-workspace "Asset Manager.xcworkspace" -scheme "Asset
Manager" -configuration Release -destination generic/platform=iOS
-archivePath "AssetManager.xcarchive" archive
CONFIGURATION_BUILD_DIR=/Users/sreeja/IBM/Anywhere/MaximoAnywhereAppCntr/output/AssetDataManager/platforms/ios/build/device
SHARED_PRECOMPS_DIR=/Users/sreeja/IBM/Anywhere/MaximoAnywhereAppCntr/output/AssetDataManager/platforms/ios/build/sharedpch
"VALID_ARCHS=arm64 CURRENT_ARCH=arm64 ONLY_ACTIVE_ARCH=YES"
This time the build was successful and we can see the Archive file generated at the below location
/Users/sreeja/IBM/Anywhere/MaximoAnywhereAppCntr/output/AssetDataManager/platforms/ios/AssetManager.xcarchive
This Archive file can be used to generate the IPA file which in our case we needed to distribute using the MDM solution.


Comments
Post a Comment