Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,57 @@ jobs:
${{ runner.temp }}/pod-install.log
${{ runner.temp }}/pod-build.log

hosted_tests:
name: Tests / TestHost
needs: builds
runs-on: macos-26
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
persist-credentials: false

- name: Select iPhone simulator
id: simulator
run: python3 .github/scripts/select-simulator.py

- name: Run application-hosted push tests
shell: bash
env:
SIMULATOR_ID: ${{ steps.simulator.outputs.device_id }}
run: |
set -euo pipefail
xcodebuild \
-project TestHost/SDKTestHost.xcodeproj \
-scheme SDKHostedTests \
-destination "platform=iOS Simulator,id=$SIMULATOR_ID" \
-derivedDataPath "$RUNNER_TEMP/SimlaHostedDerivedData" \
-clonedSourcePackagesDirPath "$RUNNER_TEMP/SimlaSourcePackages" \
-parallel-testing-enabled NO \
-resultBundlePath "$RUNNER_TEMP/SDKHostedTests.xcresult" \
test CODE_SIGNING_ALLOWED=NO \
2>&1 | tee "$RUNNER_TEMP/SDKHostedTests.log"

- name: Upload application-hosted test results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: tests-TestHost
retention-days: 7
if-no-files-found: ignore
path: |
${{ runner.temp }}/SDKHostedTests.xcresult
${{ runner.temp }}/SDKHostedTests.log

module_tests:
name: Tests / ${{ matrix.module }}
needs: builds
runs-on: macos-26
timeout-minutes: 20
strategy:
fail-fast: false
max-parallel: 1
matrix:
include:
- module: Core
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.swiftpm/
Package.resolved
.DS_Store
/sample-shop/
25 changes: 0 additions & 25 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,27 +1,2 @@
Simla iOS SDK
Copyright 2026 DIGITAL RETAIL TECHNOLOGIES, S.L.

The PushService module uses Firebase iOS SDK (FirebaseCore,
FirebaseMessaging and FirebaseInstallations), licensed under
the Apache License 2.0.

Source repository: https://github.com/firebase/firebase-ios-sdk

Its transitive dependencies include:

GoogleUtilities — Apache License 2.0
https://github.com/google/GoogleUtilities

GoogleDataTransport — Apache License 2.0
https://github.com/google/GoogleDataTransport

Google Promises — Apache License 2.0
https://github.com/google/promises

nanopb — zlib License
Copyright (c) 2011 Petteri Aimonen
https://github.com/firebase/nanopb

IsAppEncrypted, included in GoogleUtilities — MIT License
Copyright (c) 2017 Landon J. Fuller landon@landonf.org
All rights reserved.
6 changes: 0 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ let package = Package(
targets: ["Tracker"]
)
],
dependencies: [
.package(url: "https://github.com/firebase/firebase-ios-sdk.git", from: "12.17.0")
],
targets: [
.target(name: "SQLiteStorage", linkerSettings: [.linkedLibrary("sqlite3")]),
.target(name: "SDKConfiguration"),
Expand All @@ -63,9 +60,6 @@ let package = Package(
"Core",
"PushNotificationExtension",
"SQLiteStorage",
.product(name: "FirebaseCore", package: "firebase-ios-sdk"),
.product(name: "FirebaseMessaging", package: "firebase-ios-sdk"),
.product(name: "FirebaseInstallations", package: "firebase-ios-sdk"),
],
resources: [
.process("Resources")
Expand Down
3 changes: 0 additions & 3 deletions SimlaPushService.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@ Pod::Spec.new do |s|
s.resource_bundles = { 'SimlaPushService' => ['Sources/PushService/Resources/**/*'] }
s.dependency 'SimlaCore', s.version.to_s
s.dependency 'SimlaPushNotificationExtension', s.version.to_s
s.dependency 'FirebaseCore', '~> 12.17'
s.dependency 'FirebaseMessaging', '~> 12.17'
s.dependency 'FirebaseInstallations', '~> 12.17'
s.dependency 'SimlaSQLiteStorage', s.version.to_s
end
1 change: 0 additions & 1 deletion Sources/PushService/Components/PushLocalization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package enum PushLocalization: String {
case emptyFCMToken = "push.error.empty_fcm_token"
case emptyFID = "push.error.empty_fid"
case emptyFirebaseProjectID = "push.error.empty_firebase_project_id"
case firebaseInstallationIDDisabled = "push.error.firebase_installation_id_disabled"
case missingCustomerIdentifier = "push.error.missing_customer_identifier"
case invalidHTTPResponse = "push.error.invalid_http_response"
case requestEncodingFailed = "push.error.request_encoding_failed"
Expand Down
2 changes: 1 addition & 1 deletion Sources/PushService/CrmSdk+PushService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Core

public extension CrmSdk {

/// Shared push module for applications that manage Firebase and notification delegates.
/// Shared push module that registers application-supplied tokens and handles notification events.
var pushService: PushService {
sharedPushService(for: .direct)
}
Expand Down
21 changes: 1 addition & 20 deletions Sources/PushService/Models/PushServiceError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ public enum PushServiceError: Error, Equatable, LocalizedError, Sendable {
/// Firebase installation ID is empty after trimming whitespace.
case emptyFID

/// Firebase project ID is unavailable from configured Firebase options.
/// The Firebase project ID supplied by the application is empty after trimming whitespace.
case emptyFirebaseProjectID

/// Firebase Messaging installation ID delivery is disabled in app configuration.
case firebaseInstallationIDDisabled

/// Customer ID or external customer ID is missing.
case missingCustomerIdentifier

Expand All @@ -60,12 +57,6 @@ public enum PushServiceError: Error, Equatable, LocalizedError, Sendable {
/// Reporting a notification status to the backend failed.
case statusReporting(StatusReportingFailure)

/// Firebase Messaging registration or FCM token retrieval failed.
case firebaseMessaging(Error)

/// Firebase Installations failed to provide an installation ID.
case firebaseInstallations(Error)

/// Localized human-readable error description.
public var errorDescription: String? {
switch self {
Expand All @@ -81,14 +72,8 @@ public enum PushServiceError: Error, Equatable, LocalizedError, Sendable {
return PushLocalization.emptyFCMToken.localized
case .emptyFID:
return PushLocalization.emptyFID.localized
case let .firebaseMessaging(error):
return error.localizedDescription
case let .firebaseInstallations(error):
return error.localizedDescription
case .emptyFirebaseProjectID:
return PushLocalization.emptyFirebaseProjectID.localized
case .firebaseInstallationIDDisabled:
return PushLocalization.firebaseInstallationIDDisabled.localized
case .missingCustomerIdentifier:
return PushLocalization.missingCustomerIdentifier.localized
case .invalidHTTPResponse(let responseDescription):
Expand Down Expand Up @@ -138,16 +123,12 @@ public enum PushServiceError: Error, Equatable, LocalizedError, Sendable {
return leftCode == rightCode && leftMessages == rightMessages
case let (.statusReporting(left), .statusReporting(right)):
return left == right
case let (.firebaseMessaging(left), .firebaseMessaging(right)),
let (.firebaseInstallations(left), .firebaseInstallations(right)):
return (left as NSError) == (right as NSError)
case (.operationSuperseded, .operationSuperseded),
(.authorizationDenied, .authorizationDenied),
(.emptyPushToken, .emptyPushToken),
(.emptyFCMToken, .emptyFCMToken),
(.emptyFID, .emptyFID),
(.emptyFirebaseProjectID, .emptyFirebaseProjectID),
(.firebaseInstallationIDDisabled, .firebaseInstallationIDDisabled),
(.missingCustomerIdentifier, .missingCustomerIdentifier):
return true
default:
Expand Down
Loading
Loading