Skip to content

Commit

Permalink
Merge pull request #267 from sbenedicadb/staging
Browse files Browse the repository at this point in the history
Staging cleanup
  • Loading branch information
sbenedicadb authored Mar 20, 2024
2 parents 3a923ea + 9a0f683 commit 7ddee1b
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 216 deletions.
24 changes: 8 additions & 16 deletions AEPMessaging/Sources/MessagingEdgeEventType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ import Foundation
/// Provides mapping to XDM EventType strings needed for Experience Event requests
@objc(AEPMessagingEdgeEventType)
public enum MessagingEdgeEventType: Int {
@available(*, deprecated, message: "Use 'dismiss' instead.")
case inappDismiss = 0
@available(*, deprecated, message: "Use 'interact' instead.")
case inappInteract = 1
@available(*, deprecated, message: "Use 'trigger' instead.")
case inappTrigger = 2
@available(*, deprecated, message: "Use 'display' instead.")
case inappDisplay = 3
case pushApplicationOpened = 4
case pushCustomAction = 5
case dismiss = 6
Expand All @@ -32,13 +24,13 @@ public enum MessagingEdgeEventType: Int {

public func toString() -> String {
switch self {
case .inappDismiss, .dismiss:
case .dismiss:
return MessagingConstants.XDM.Inbound.EventType.DISMISS
case .inappTrigger, .trigger:
case .trigger:
return MessagingConstants.XDM.Inbound.EventType.TRIGGER
case .inappInteract, .interact:
case .interact:
return MessagingConstants.XDM.Inbound.EventType.INTERACT
case .inappDisplay, .display:
case .display:
return MessagingConstants.XDM.Inbound.EventType.DISPLAY
case .pushCustomAction:
return MessagingConstants.XDM.Push.EventType.CUSTOM_ACTION
Expand Down Expand Up @@ -73,13 +65,13 @@ extension MessagingEdgeEventType {
/// Used to generate `propositionEventType` payload in outgoing proposition interaction events
var propositionEventType: String {
switch self {
case .inappDismiss, .dismiss:
case .dismiss:
return MessagingConstants.XDM.Inbound.PropositionEventType.DISMISS
case .inappInteract, .interact:
case .interact:
return MessagingConstants.XDM.Inbound.PropositionEventType.INTERACT
case .inappTrigger, .trigger:
case .trigger:
return MessagingConstants.XDM.Inbound.PropositionEventType.TRIGGER
case .inappDisplay, .display:
case .display:
return MessagingConstants.XDM.Inbound.PropositionEventType.DISPLAY
case .pushApplicationOpened, .pushCustomAction:
return ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class InAppMessagingEventTests: XCTestCase, AnyCodableAsserts {

extension InAppMessagingEventTests: MessagingDelegate {
func onShow(message: Showable) {
currentMessage?.track("clicked", withEdgeEventType: .inappInteract)
currentMessage?.track("clicked", withEdgeEventType: .interact)
}

func onDismiss(message: Showable) {
Expand Down
52 changes: 0 additions & 52 deletions AEPMessaging/Tests/UnitTests/MessagingEdgeEventTypeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,6 @@ class MessagingEdgeEventTypeTests: XCTestCase {
XCTAssertEqual(value, .display)
XCTAssertEqual("decisioning.propositionDisplay", value?.toString())
}

func testInAppDismiss_Deprecated() throws {
// setup
let value = MessagingEdgeEventType(rawValue: 0)

// verify
XCTAssertEqual(value, .inappDismiss)
XCTAssertEqual("decisioning.propositionDismiss", value?.toString())
}

func testInAppInteract_Deprecated() throws {
// setup
let value = MessagingEdgeEventType(rawValue: 1)

// verify
XCTAssertEqual(value, .inappInteract)
XCTAssertEqual("decisioning.propositionInteract", value?.toString())
}

func testInAppTrigger_Deprecated() throws {
// setup
let value = MessagingEdgeEventType(rawValue: 2)

// verify
XCTAssertEqual(value, .inappTrigger)
XCTAssertEqual("decisioning.propositionTrigger", value?.toString())
}

func testInAppDisplay_Deprecated() throws {
// setup
let value = MessagingEdgeEventType(rawValue: 3)

// verify
XCTAssertEqual(value, .inappDisplay)
XCTAssertEqual("decisioning.propositionDisplay", value?.toString())
}

func testPushApplicationOpened() throws {
// setup
Expand Down Expand Up @@ -177,22 +141,6 @@ class MessagingEdgeEventTypeTests: XCTestCase {
XCTAssertEqual("trigger", MessagingEdgeEventType.trigger.propositionEventType)
}

func testPropEventTypeDismiss_Deprecated() throws {
XCTAssertEqual("dismiss", MessagingEdgeEventType.inappDismiss.propositionEventType)
}

func testPropEventTypeDisplay_Deprecated() throws {
XCTAssertEqual("display", MessagingEdgeEventType.inappDisplay.propositionEventType)
}

func testPropEventTypeInteract_Deprecated() throws {
XCTAssertEqual("interact", MessagingEdgeEventType.inappInteract.propositionEventType)
}

func testPropEventTypeTrigger_Deprecated() throws {
XCTAssertEqual("trigger", MessagingEdgeEventType.inappTrigger.propositionEventType)
}

func testPropEventTypePushCases() throws {
XCTAssertEqual("", MessagingEdgeEventType.pushCustomAction.propositionEventType)
XCTAssertEqual("", MessagingEdgeEventType.pushApplicationOpened.propositionEventType)
Expand Down
6 changes: 2 additions & 4 deletions Documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

### Prerequisites

- Code-based Experiences (Beta)
- [Getting started](./sources/exd-cbe-beta/getting-started.md)
- [APIs usage](./sources/exd-cbe-beta/apis-usage.md)
- [Test app setup](./sources/exd-cbe-beta/testapp-setup.md)
- Code-based Experiences
- [APIs usage](./sources/exd-cbe-beta/apis-usage.md)
- Push Messaging
- [Enable push notifications in your app](./sources/prerequisite/enable-push-notifications.md)
- Push and In-app Messaging
Expand Down
88 changes: 0 additions & 88 deletions Documentation/sources/exd-cbe-beta/getting-started.md

This file was deleted.

21 changes: 0 additions & 21 deletions Documentation/sources/exd-cbe-beta/testapp-setup.md

This file was deleted.

16 changes: 10 additions & 6 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def app_main
pod 'AEPEdge'
pod 'AEPEdgeIdentity'
pod 'AEPEdgeConsent'
pod 'AEPAssurance', :git => 'https://github.com/adobe/aepsdk-assurance-ios.git', :branch => 'staging'
pod 'AEPAssurance'
end

def app_dev
Expand All @@ -50,6 +50,10 @@ def app_dev
pod 'AEPAssurance', :git => 'https://github.com/adobe/aepsdk-assurance-ios.git', :branch => 'staging'
end

def test_utils
pod 'AEPTestUtils', :git => 'https://github.com/adobe/aepsdk-testutils-ios.git', :tag => '5.0.0'
end

# ==================
# TARGET DEFINITIONS
# ==================
Expand All @@ -72,25 +76,25 @@ end

target 'UnitTests' do
lib_main
pod 'AEPTestUtils', :git => 'https://github.com/adobe/aepsdk-testutils-ios.git', :tag => '5.0.0'
test_utils
end

target 'FunctionalTests' do
app_main
pod 'AEPTestUtils', :git => 'https://github.com/adobe/aepsdk-testutils-ios.git', :tag => '5.0.0'
test_utils
end

target 'E2EFunctionalTests' do
app_main
pod 'AEPTestUtils', :git => 'https://github.com/adobe/aepsdk-testutils-ios.git', :tag => '5.0.0'
test_utils
end

target 'FunctionalTestApp' do
app_main
pod 'AEPTestUtils', :git => 'https://github.com/adobe/aepsdk-testutils-ios.git', :tag => '5.0.0'
test_utils
end

target 'E2EFunctionalTestApp' do
app_main
pod 'AEPTestUtils', :git => 'https://github.com/adobe/aepsdk-testutils-ios.git', :tag => '5.0.0'
test_utils
end
11 changes: 3 additions & 8 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PODS:
- SwiftLint (0.52.0)

DEPENDENCIES:
- AEPAssurance (from `https://github.com/adobe/aepsdk-assurance-ios.git`, branch `staging`)
- AEPAssurance
- AEPCore
- AEPEdge
- AEPEdgeConsent
Expand All @@ -39,6 +39,7 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- AEPAssurance
- AEPCore
- AEPEdge
- AEPEdgeConsent
Expand All @@ -50,17 +51,11 @@ SPEC REPOS:
- SwiftLint

EXTERNAL SOURCES:
AEPAssurance:
:branch: staging
:git: https://github.com/adobe/aepsdk-assurance-ios.git
AEPTestUtils:
:git: https://github.com/adobe/aepsdk-testutils-ios.git
:tag: 5.0.0

CHECKOUT OPTIONS:
AEPAssurance:
:commit: ba663aa783d14c039626af88f3159fb47f3bae4a
:git: https://github.com/adobe/aepsdk-assurance-ios.git
AEPTestUtils:
:git: https://github.com/adobe/aepsdk-testutils-ios.git
:tag: 5.0.0
Expand All @@ -78,6 +73,6 @@ SPEC CHECKSUMS:
AEPTestUtils: 20495b368da57904ca2e9f241d1d8b114f9887b5
SwiftLint: 13280e21cdda6786ad908dc6e416afe5acd1fcb7

PODFILE CHECKSUM: 9f1f3ac6017df6b5467fecddd383dea2045b102c
PODFILE CHECKSUM: 3d7e4dc0e436ffe270cfe06e63fbe8b0564df0e3

COCOAPODS: 1.14.3
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Adobe Experience Platform - Messaging extension for iOS (Beta feature - Experience Decisioning in Code Based Experiences)
# Adobe Experience Platform - Messaging extension for iOS

[![Cocoapods](https://img.shields.io/github/v/release/adobe/aepsdk-messaging-ios?label=CocoaPods&logo=apple&logoColor=white&color=orange&sort=semver)](https://cocoapods.org/pods/AEPMessaging)
[![SPM](https://img.shields.io/github/v/release/adobe/aepsdk-messaging-ios?label=SPM&logo=apple&logoColor=white&color=orange&sort=semver)](https://github.com/adobe/aepsdk-messaging-ios/releases)
[![CircleCI](https://img.shields.io/circleci/project/github/adobe/aepsdk-messaging-ios/main.svg?logo=circleci&label=Build)](https://circleci.com/gh/adobe/workflows/aepsdk-messaging-ios)
<!-- [![Code Coverage](https://img.shields.io/codecov/c/github/adobe/aepsdk-messaging-ios/main.svg?logo=codecov&label=Coverage)](https://codecov.io/gh/adobe/aepsdk-messaging-ios/branch/main) -->

## Beta feature acknowledgment

By using the AEPMessaging SDK (“Beta feature”), you hereby acknowledge that the Beta is provided “as is” without warranty of any kind. Adobe shall have no obligation to maintain, correct, update, change, modify or otherwise support the Beta. You are advised to use caution and not to rely in any way on the correct functioning or performance of such Beta and/or accompanying materials.

## About this project

Adobe Experience Platform (AEP) Messaging Extension is an extension for the [Adobe Experience Platform Swift SDK](https://github.com/adobe/aepsdk-core-ios).
Expand Down
8 changes: 4 additions & 4 deletions TestApps/MessagingDemoApp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
// configure
MobileCore.configureWith(appId: "")
// set `messaging.useSandbox` to "true" to test push notifications in debug environment (Apps signed with Development Certificate)
#if DEBUG
let debugConfig = ["messaging.useSandbox": true]
MobileCore.updateConfigurationWith(configDict: debugConfig)
#endif
// #if DEBUG
// let debugConfig = ["messaging.useSandbox": true]
// MobileCore.updateConfigurationWith(configDict: debugConfig)
// #endif
}

registerForPushNotifications(application)
Expand Down
Loading

0 comments on commit 7ddee1b

Please sign in to comment.