ios – Archive not constructing for xcframework on xcode cloud workflow

0
35
ios – Archive not constructing for xcframework on xcode cloud workflow


The primary archive for simulator will get construct however doesn’t for the ios one.
Provides this error repeatedly :

Exhibiting All Messages
/Volumes/workspace/repository/cicd-testing-framework.xcodeproj: error: No signing certificates “iOS Improvement” discovered: No “iOS Improvement” signing certificates matching crew ID “567*****” with a non-public key was discovered. (in goal ‘cicd-testing-framework’ from venture ‘cicd-testing-framework’)

That is my post_clone.sh script:

#!/bin/bash

chmod +x ci_post_clone.sh

set -x

# Guarantee we're within the temp listing for script execution
cd "$TMPDIR" || exit 1

# Variables
CI_REPOSITORY_PATH="/Volumes/workspace/repository"
CI_PRODUCT="cicd-testing-framework"
CI_CONFIGURATION="Launch"
CI_XCODE_PROJECT="cicd-testing-framework.xcodeproj"  # Undertaking identify solely
CI_XCODE_SCHEME="cicd-testing-framework"  # Scheme identify

BUILD_DIR="$TMPDIR/construct"  # Construct in TMPDIR
mkdir -p "$BUILD_DIR"

ARCHIVE_DIR="$BUILD_DIR/archive"
mkdir -p "$ARCHIVE_DIR"

ARCHIVE_SIMULATOR_PATH="$ARCHIVE_DIR/${CI_PRODUCT}-iphonesimulator.xcarchive"
ARCHIVE_IOS_PATH="$ARCHIVE_DIR/${CI_PRODUCT}-iphoneos.xcarchive"

FRAMEWORK_SIMULATOR_PATH="$ARCHIVE_SIMULATOR_PATH/Merchandise/Library/Frameworks/${CI_PRODUCT}.framework"
FRAMEWORK_IOS_PATH="$ARCHIVE_IOS_PATH/Merchandise/Library/Frameworks/${CI_PRODUCT}.framework"

# Quickly change to the repository listing for Xcode instructions
pushd "$CI_REPOSITORY_PATH" || exit 1

echo "Present listing : $(pwd)"

# Construct for simulator
xcodebuild archive 
  -project "$CI_XCODE_PROJECT" 
  -scheme "$CI_XCODE_SCHEME" 
  -configuration "$CI_CONFIGURATION" 
  -archivePath "$ARCHIVE_SIMULATOR_PATH" 
  -sdk iphonesimulator 
  SKIP_INSTALL=NO 
  BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  
  echo "Construct for simulator succeeded"
  echo "nonetheless in $(pwd)"

# Construct for iOS
xcodebuild archive 
  -project "$CI_XCODE_PROJECT" 
  -scheme "$CI_XCODE_SCHEME" 
  -configuration "$CI_CONFIGURATION" 
  -archivePath "$ARCHIVE_IOS_PATH" 
  -sdk iphoneos 
  SKIP_INSTALL=NO 
  BUILD_LIBRARY_FOR_DISTRIBUTION=YES

# Return to the temp listing
popd

# Create XCFramework if each simulator and iOS builds are profitable
if [ -d "$FRAMEWORK_SIMULATOR_PATH" ] && [ -d "$FRAMEWORK_IOS_PATH" ]; then
  xcodebuild -create-xcframework 
    -framework "$FRAMEWORK_SIMULATOR_PATH" 
    -framework "$FRAMEWORK_IOS_PATH" 
    -output "$BUILD_DIR/${CI_PRODUCT}.xcframework"
  echo "Created XCFramework at $BUILD_DIR/${CI_PRODUCT}.xcframework"
else
  echo "Error: One or each framework paths don't exist."
  exit 1
fi

echo "XCFramework creation accomplished efficiently."

I’ve tried working this in native and giving absolute venture identify within the xcode construct command for ios, it ran there, however right here within the script it exhibits venture not discovered.

LEAVE A REPLY

Please enter your comment!
Please enter your name here