@@ -74,13 +74,34 @@ jobs:
7474 # Copy the built framework
7575 cp -R ./branch-ios-sdk-repo/build/BranchSDK.xcframework ./ios-app-repo/Frameworks/
7676 working-directory : ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE
77+ - name : Install the Apple certificate and provisioning profile
78+ env :
79+ BUILD_CERTIFICATE_BASE64 : ${{ secrets.BS_BUILD_CERTIFICATE }}
80+ P12_PASSWORD : ${{ secrets.BS_P12_PASSWORD }}
81+ KEYCHAIN_PASSWORD : ${{ secrets.KEYCHAIN_PASSWORD }}
82+ run : |
83+ # create variables
84+ CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
85+ KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
86+
87+ # import certificate
88+ echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
89+
90+ # create temporary keychain
91+ security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
92+ security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
93+ security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
94+
95+ # import certificate to keychain
96+ security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
97+ security list-keychain -d user -s $KEYCHAIN_PATH
7798
7899 # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework ---
79100 - name : Build iOS App with local SDK
80101 run : |
81102 # Build the app. Adjust project/workspace, scheme, and destination if necessary.
82103 # We're passing MARKETING_VERSION (versionName) and CURRENT_PROJECT_VERSION (versionCode)
83- xcodebuild -scheme BranchLinkSimulator \
104+ xcodebuild -scheme BranchLinkSimulator -allowProvisioningUpdates \
84105 MARKETING_VERSION=${{ env.VERSION_STRING }} \
85106 CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }}
86107 # Adjust Framework Search Paths if your Xcode project doesn't automatically find it
0 commit comments