Skip to content

Commit

Permalink
Merge pull request #325 from ForgeRock/develop
Browse files Browse the repository at this point in the history
ForgeRock iOS SDK 4.7.0 Release
  • Loading branch information
spetrov authored Feb 6, 2025
2 parents daccd0e + c5f0aee commit eeede7c
Show file tree
Hide file tree
Showing 264 changed files with 2,531 additions and 4,502 deletions.
48 changes: 35 additions & 13 deletions .github/workflows/bitbar-prepare-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
required: true

# 1. Open the keychain on your mac and export the signing certificate and private key in a Certificates.p12 file
# 2. Convert your certificate to Base64 string: `base64 Certificates.p12 | pbcopy`
# 2. Convert your certificate to Base64 string: `base64 -i Certificates.p12 | pbcopy`
# 3. Update the value of the CERTIFICATES_FILE_BASE64 action secret with the content of the clipboard
# 4. Update the CERTIFICATES_PASSWORD action secret with the one used during the export of the certificate from the keychain
CERTIFICATES_FILE_BASE64:
Expand All @@ -27,7 +27,7 @@ on:
# 1. Find the 'com.forgerock.FRTestHost' provisioning profile (~/Library/MobileDevice/Provisioning\ Profiles)
# 2. Rename the file to `provisioning_profile.mobileprovision`
# 3. Zip the file: `zip provisioning_profile.mobileprovision.zip provisioning_profile.mobileprovision`
# 4. Convert the file to Base64 string: `base64 provisioning_profile.mobileprovision.zip | pbcopy`
# 4. Convert the file to Base64 string: `base64 -i provisioning_profile.mobileprovision.zip | pbcopy`
# 5. Update the value of the BUILD_PROVISION_PROFILE_ZIP_BASE64 action secret with the content of the clipboard
BUILD_PROVISION_PROFILE:
description: 'Apple build provisioning profile'
Expand All @@ -36,14 +36,24 @@ on:
SLACK_WEBHOOK_URL:
description: 'Slack Notifier Incoming Webhook URL'
required: true

env:
BUILD_DIR: /tmp/build
CONFIGURATION: Debug
SCHEME: FRTestHostBitBar
WORKSPACE: e2e/FRExample.xcworkspace
DEVELOPMENT_TEAM: 9QSE66762D
XCODE_VERSION: '15.4'
SDK: iphoneos17.5

jobs:
prepare-device-farm-artifacts:
runs-on: macos-14

steps:
# Clone the repo
- name: Clone the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand Down Expand Up @@ -83,19 +93,31 @@ jobs:
cp $PP_FILENAME ~/Library/MobileDevice/Provisioning\ Profiles
# Set target Xcode version. For more details and options see:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_15.4.app && /usr/bin/xcodebuild -version
run: sudo xcode-select -switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app && /usr/bin/xcodebuild -version

- name: build-for-testing and sign
run: xcodebuild -scheme FRTestHostBitBar -sdk iphoneos17.5 -workspace SampleApps/FRExample.xcworkspace -configuration Debug clean build BUILD_DIR=~/build/ DEVELOPMENT_TEAM=JV6EC9KSN3 -allowProvisioningUpdates -destination generic/platform=iOS -derivedDataPath ~/build/derivedData/ build-for-testing
run: |
xcodebuild \
-scheme ${{ env.SCHEME }} \
-sdk ${{ env.SDK}} \
-workspace ${{ env.WORKSPACE }} \
-configuration ${{ env.CONFIGURATION }} \
clean build \
BUILD_DIR=${{ env.BUILD_DIR }} \
DEVELOPMENT_TEAM=${{ env.DEVELOPMENT_TEAM }} \
-allowProvisioningUpdates \
-destination generic/platform=iOS \
-derivedDataPath ${{ env.BUILD_DIR }}/derivedData \
build-for-testing
# Prepare BitBar artifacts:
- name: Prepare BitBar artifacts
run: |
pwd
ls -la
cd ~/build/Debug-iphoneos/
cd ${{ env.BUILD_DIR }}/Debug-iphoneos/
cp -r FRTestHost.app/PlugIns/FRAuthTests.xctest .
zip -r -X FRAuthTests.xctest.zip FRAuthTests.xctest
mkdir Payload
Expand All @@ -104,21 +126,21 @@ jobs:
# Publish e2e tests and app build artifacts
- name: Publish FRTestHost.ipa
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success()
with:
name: FRTestHost.ipa
path: ~/build/Debug-iphoneos/FRTestHost.ipa
path: ${{ env.BUILD_DIR }}/Debug-iphoneos/FRTestHost.ipa

- name: Publish FRAuthTests.xctest.zip
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success()
with:
name: FRAuthTests.xctest.zip
path: ~/build/Debug-iphoneos/FRAuthTests.xctest.zip
path: ${{ env.BUILD_DIR }}/Debug-iphoneos/FRAuthTests.xctest.zip

# Send slack notification ONLY if any of the steps above fail
- name: Send slack notification
- name: Send slack notification if something goes wrong
uses: 8398a7/action-slack@v3
with:
status: custom
Expand All @@ -133,4 +155,4 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
if: failure()
2 changes: 1 addition & 1 deletion .github/workflows/bitbar-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
bitbar-project-id:
description: BitBar Project ID
type: string
default: 207050144
default: ${{ vars.BITBAR_PROJECT_ID }}

bitbar-run-id:
description: BitBar Run ID
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/bitbar-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
bitbar-project-id:
description: BitBar project id
type: string
default: 207050144
default: ${{ vars.BITBAR_PROJECT_ID }}

bitbar-device-group-id:
description: The device group id to run tests against
type: string
default: 45011
default: ${{ vars.BITBAR_DEVICE_GROUP_ID }}

bitbar-os-type:
description: OS Type
Expand All @@ -20,7 +20,7 @@ on:
bitbar-framework-id:
description: The framework id
type: string
default: 590
default: ${{ vars.BITBAR_FRAMEWORK_ID }}

outputs:
bitbar-run-id:
Expand All @@ -45,12 +45,12 @@ jobs:
steps:
# Get the test artifacts prepared in previous step
- name: Get FRTestHost.ipa BitBar artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: FRTestHost.ipa

- name: Get the FRAuthTests.xctest.zip BitBar artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: FRAuthTests.xctest.zip

Expand Down
66 changes: 55 additions & 11 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@ on:
SLACK_WEBHOOK_URL:
description: 'Slack Notifier Webhook'
required: true

env:
WORKSPACE: e2e/FRExample.xcworkspace
SCHEME: FRTestHost
CONFIGURATION: Debug
DESTINATION: platform=iOS Simulator,name=iPhone 16,OS=18.2
XCODE_VERSION: '16.2'

jobs:
build-and-test:
runs-on: macos-14
runs-on: macos-15
timeout-minutes: 20

steps:
# Clone the repo
- name: Clone the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand All @@ -30,21 +38,57 @@ jobs:
run: echo $CONFIG_E2E_CLOUD > FRTestHost/FRTestHost/SharedTestFiles/TestConfig/Config-live-01.json

# Set target Xcode version. For more details and options see:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_15.4.app && /usr/bin/xcodebuild -version
run: sudo xcode-select -switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app && /usr/bin/xcodebuild -version


# # Restore `xcresultparser` from cache
# # TBD: Fix the restore of the xcresultparser tool. It is not working as expected at the moment, causing the build to fail...
# - name: Restore xcresultparser from cache
# id: cache-xcresultparser
# uses: actions/cache@v3
# with:
# path: /opt/homebrew/bin/xcresultparser
# key: ${{ runner.os }}-xcresultparser
# restore-keys: |
# ${{ runner.os }}-xcresultparser

# Install xcresultparser
- name: Install xcresultparser
run: |
brew tap a7ex/homebrew-formulae
brew install xcresultparser
echo "Installed xcresultparser..."
# Run all tests
- name: Run tests
run: xcodebuild test -scheme FRTestHost -workspace SampleApps/FRExample.xcworkspace -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 14,OS=17.5' -derivedDataPath DerivedData -enableCodeCoverage YES -resultBundlePath TestResults | xcpretty && exit ${PIPESTATUS[0]}
run: |
xcodebuild test \
-scheme FRTestHost \
-workspace ${{ env.WORKSPACE }} \
-configuration ${{ env.CONFIGURATION}} \
-destination '${{ env.DESTINATION }}' \
-derivedDataPath DerivedData \
TEST_TARGET_SIGNING=YES \
-enableCodeCoverage YES \
-resultBundlePath TestResults | grep -E 'Test Case|^Executed|error:'
# Publish test results
# Convert test results to JUnit format
- name: Convert Test Results to JUnit
run: xcresultparser -o junit TestResults.xcresult > test-report.xml

# Publish the test results
- name: Publish test results
uses: kishikawakatsumi/xcresulttool@v1
with:
path: TestResults.xcresult
show-passed-tests: false
if: success() || failure()
uses: dorny/test-reporter@v1
with:
name: Unit tests results
path: './test*.xml'
list-suites: 'all'
list-tests: 'all'
fail-on-error: 'true'
reporter: java-junit

# Send slack notification with result status
- uses: 8398a7/action-slack@v3
Expand All @@ -55,4 +99,4 @@ jobs:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
if: always()
4 changes: 2 additions & 2 deletions .github/workflows/run-live-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

# Run all e2e tests
- name: Run e2e tests
run: xcodebuild test -scheme FRTestHostE2E -workspace SampleApps/FRExample.xcworkspace -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.4' -derivedDataPath DerivedData -enableCodeCoverage YES -resultBundlePath TestResultsE2E | xcpretty && exit ${PIPESTATUS[0]}
run: xcodebuild test -scheme FRTestHostE2E -workspace e2e/FRExample.xcworkspace -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.4' -derivedDataPath DerivedData -enableCodeCoverage YES -resultBundlePath TestResultsE2E | xcpretty && exit ${PIPESTATUS[0]}

# Publish test results
- name: Publish test results
Expand All @@ -67,4 +67,4 @@ jobs:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
if: always()
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [4.7.0]
#### Added
- Support for Sign-out with ID Token in the PingOne Platform. [SDKS-3424]
- Support for Self-Service [SDKS-3409]

#### Fixed
- Prevent duplicate PUSH notifications in the Authenticator module. [SDKS-3533]
- Updated jailbreak detectors to prevent false-positive detections. [SDKS-3693]

## [4.6.0]
#### Added
- Support PingOne Protect Marketplace Nodes [SDKS-3296]
Expand Down Expand Up @@ -215,7 +224,7 @@ It should now be called from `application(_ application:, didFinishLaunchingWith
- `FRAuth` introduces new dependency, `FRCore` which contains generic core functionalities that can be shared across other ForgeRock iOS SDK. [SDKS-241]
- `FRCore` has been added to iOS SDK suite. `FRCore` is responsible to handle generic iOS tools and functionalities that are not relevant to ForgeRock products.
- `FRAuth` is now able to handle AM's Transactional Authorization requests out of box for IG integration, and with a little bit of customization for custom REST Apps. `FRAuth` SDK can support `Authentication by Service` and `Transaction - Authenticate to Tree` in Policy environment. [SDKS-87]
- `MetadataCallback` is now supported in `FRAuth` SDK. For AM 6.5.2, when `MetadataCallback` is returned with `stage` value, SDK automatically parses `MetadataCallback` into `Node`'s `stage` property. Please refer [this blog post](https://forum.forgerock.com/2020/02/using-an-authentication-tree-stage-to-build-a-custom-ui-with-the-forgerock-javascript-sdk/) for more details. [SDKS-304]
- `MetadataCallback` is now supported in `FRAuth` SDK. For AM 6.5.2, when `MetadataCallback` is returned with `stage` value, SDK automatically parses `MetadataCallback` into `Node`'s `stage` property. [SDKS-304]
- `FRAuth` now allows more flexible customization on server infomration. Custom URL paths can be configured through `.plist` config file, or `ServerConfigBuilder`. [SDKS-302]
- `FRAuth` now supports `Device Profile Node` in AM 7.0.0. [SDKS-294]
- `FRCore` introduces an ability to customize internal SDK requests through `RequestInterceptor`. Use `FRCore.RequestInterceptor` to implement the interceptor, and `FRAuth.FRRequestInterceptorRegistry`to register interceptors. [SDKS-250]
Expand Down
4 changes: 2 additions & 2 deletions FRAuth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'FRAuth'
s.version = '4.6.0'
s.version = '4.7.0'
s.summary = 'ForgeRock Auth SDK for iOS'
s.description = <<-DESC
FRAuth is a SDK that allows you easily and quickly develop an application with ForgeRock Platform or ForgeRock Identity Cloud. FRAuth SDK provides interfaces and functionalities of user authentication, registration, and identity and access management against ForgeRock solutions.
Expand All @@ -32,5 +32,5 @@ Pod::Spec.new do |s|
s.resource_bundles = {
'FRAuth' => [base_dir + '/*.xcprivacy']
}
s.ios.dependency 'FRCore', '~> 4.6.0'
s.ios.dependency 'FRCore', '~> 4.7.0'
end
Loading

0 comments on commit eeede7c

Please sign in to comment.