Skip to content

Commit

Permalink
Merge pull request #976 from adobe/staging
Browse files Browse the repository at this point in the history
Staging to Main for 4.2.0 release
  • Loading branch information
cdhoffmann committed Oct 31, 2023
2 parents 3bf920d + 9ac82b7 commit da278f9
Show file tree
Hide file tree
Showing 63 changed files with 1,794 additions and 193 deletions.
3 changes: 2 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ disabled_rules: # rule identifiers to exclude from running
- large_tuple
- trailing_comma
- type_body_length
- trailing_whitespace

analyzer_rules:
- unused_import
- unused_import
4 changes: 2 additions & 2 deletions AEPCore.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AEPCore"
s.version = "4.1.0"
s.version = "4.2.0"
s.summary = "Core library for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe."
s.description = <<-DESC
The core library provides the foundation for the Adobe Experience Platform SDK. Having the core library installed is a pre-requisite for any other Adobe Experience Platform SDK extension to work.
Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }

s.dependency 'AEPRulesEngine', '>= 4.0.0'
s.dependency 'AEPServices', '>= 4.1.0'
s.dependency 'AEPServices', '>= 4.2.0'


s.source_files = 'AEPCore/Sources/**/*.swift'
Expand Down
66 changes: 48 additions & 18 deletions AEPCore.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions AEPCore.xcodeproj/xcshareddata/IDETemplateMacros.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
<dict>
<key>FILEHEADER</key>
<string>
// Copyright ___YEAR___ Adobe. All rights reserved.
// This file is licensed to you under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may obtain a copy
// of the License at http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
// OF ANY KIND, either express or implied. See the License for the specific language
// governing permissions and limitations under the License.
//
/*
Copyright ___YEAR___ Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
</string>
</dict>
</plist>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>classNames</key>
<dict>
<key>FileSystemNamedCollectionTest</key>
<dict>
<key>testExistingFileSetPerformance()</key>
<dict>
<key>com.apple.dt.XCTMetric_Clock.time.monotonic</key>
<dict>
<key>baselineAverage</key>
<real>0.046151</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
</dict>
<key>testNewFileCreationSetPerformance()</key>
<dict>
<key>com.apple.dt.XCTMetric_Clock.time.monotonic</key>
<dict>
<key>baselineAverage</key>
<real>0.042389</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
</dict>
</dict>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@
<dict>
<key>runDestinationsByUUID</key>
<dict>
<key>3A63B149-5191-4CFA-924C-5EFBE3DC24D9</key>
<dict>
<key>localComputer</key>
<dict>
<key>busSpeedInMHz</key>
<integer>0</integer>
<key>cpuCount</key>
<integer>1</integer>
<key>cpuKind</key>
<string>Apple M1 Max</string>
<key>cpuSpeedInMHz</key>
<integer>0</integer>
<key>logicalCPUCoresPerPackage</key>
<integer>10</integer>
<key>modelCode</key>
<string>MacBookPro18,2</string>
<key>physicalCPUCoresPerPackage</key>
<integer>10</integer>
<key>platformIdentifier</key>
<string>com.apple.platform.macosx</string>
</dict>
<key>targetArchitecture</key>
<string>arm64</string>
<key>targetDevice</key>
<dict>
<key>modelCode</key>
<string>iPhone14,7</string>
<key>platformIdentifier</key>
<string>com.apple.platform.iphonesimulator</string>
</dict>
</dict>
<key>9D891086-E914-4281-A892-D3AB8CE36856</key>
<dict>
<key>localComputer</key>
Expand Down
2 changes: 1 addition & 1 deletion AEPCore/Sources/configuration/ConfigurationConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Foundation
struct ConfigurationConstants {
static let EXTENSION_NAME = "com.adobe.module.configuration"
static let FRIENDLY_NAME = "Configuration"
static let EXTENSION_VERSION = "4.1.0"
static let EXTENSION_VERSION = "4.2.0"
static let DATA_STORE_NAME = EXTENSION_NAME

static let CONFIG_URL_BASE = "https://assets.adobedtm.com/"
Expand Down
2 changes: 1 addition & 1 deletion AEPCore/Sources/core/MobileCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public final class MobileCore: NSObject {
let idParser = IDParser()
V4Migrator(idParser: idParser).migrate() // before starting SDK, migrate from v4 if needed
V5Migrator(idParser: idParser).migrate() // before starting SDK, migrate from v5 if needed

UserDefaultsMigrator().migrate() // before starting SDK, migrate from UserDefaults if needed
// Invoke registerExtension on legacy extensions
let legacyExtensions = extensions.filter {!($0.self is Extension.Type)} // All extensions that do not conform to `Extension`
let registerSelector = Selector(("registerExtension"))
Expand Down
2 changes: 1 addition & 1 deletion AEPCore/Sources/eventhub/EventHubConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ enum EventHubConstants {
static let XDM_STATE_CHANGE = "Shared state change (XDM)"
static let NAME = "com.adobe.module.eventhub"
static let FRIENDLY_NAME = "EventHub"
static let VERSION_NUMBER = "4.1.0"
static let VERSION_NUMBER = "4.2.0"

enum EventDataKeys {
static let VERSION = "version"
Expand Down
191 changes: 191 additions & 0 deletions AEPCore/Sources/migration/UserDefaultMigrationConstants.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
//
/*
Copyright 2023 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

import Foundation

enum UserDefaultMigratorConstants {

static let MIGRATION_STORE_NAME = "com.adobe.migration"
static let MIGRATION_COMPLETE = "migration.userdefaults.complete"

static let migrationDict: [String: [String]] = [
Configuration.DATASTORE_NAME: Configuration.DataStoreKeys.allCases.map {$0.rawValue},
Identity.DATASTORE_NAME: Identity.DataStoreKeys.allCases.map {$0.rawValue},
Lifecycle.DATASTORE_NAME: Lifecycle.DataStoreKeys.allCases.map {$0.rawValue},
Assurance.DATASTORE_NAME: Assurance.DataStoreKeys.allCases.map {$0.rawValue},
Analytics.DATASTORE_NAME: Analytics.DataStoreKeys.allCases.map {$0.rawValue},
Audience.DATASTORE_NAME: Audience.DataStoreKeys.allCases.map {$0.rawValue},
Target.DATASTORE_NAME: Target.DataStoreKeys.allCases.map {$0.rawValue},
Campaign.DATASTORE_NAME: Campaign.DataStoreKeys.allCases.map {$0.rawValue},
CampaignClassic.DATASTORE_NAME: CampaignClassic.DataStoreKeys.allCases.map {$0.rawValue},
Places.DATASTORE_NAME: Places.DataStoreKeys.allCases.map {$0.rawValue},
UserProfile.DATASTORE_NAME: UserProfile.DataStoreKeys.allCases.map {$0.rawValue},
Edge.DATASTORE_NAME: Edge.EdgeDataStoreKeys.allCases.map {$0.rawValue},
Edge.PAYLOAD_DATASTORE_NAME: Edge.EdgePayloadStoreKeys.allCases.map {$0.rawValue},
EdgeIdentity.DATASTORE_NAME: EdgeIdentity.DataStoreKeys.allCases.map {$0.rawValue},
EdgeConsent.DATASTORE_NAME: EdgeConsent.DataStoreKeys.allCases.map {$0.rawValue}
]

enum Configuration {
static let DATASTORE_NAME = "com.adobe.module.configuration"

enum DataStoreKeys: String, CaseIterable {
case OVERRIDDEN_MAP = "config.overridden.map"
case APP_ID = "config.appID"
}
}

enum Lifecycle {
static let DATASTORE_NAME = "com.adobe.module.lifecycle"

enum DataStoreKeys: String, CaseIterable {
case INSTALL_DATE = "install.date"
case LAST_LAUNCH_DATE = "last.date.used"
case UPGRADE_DATE = "upgrade.date"
case LAUNCHES_SINCE_UPGRADE = "launches.after.upgrade"
case PERSISTED_CONTEXT = "persisted.context"
case LIFECYCLE_DATA = "lifecycle.data"
case LAST_VERSION = "last.version"
case V2_LAST_VERSION = "v2.last.app.version"
case V2_APP_START_DATE = "v2.app.start.date"
case V2_APP_PAUSE_DATE = "v2.app.pause.date"
case V2_APP_CLOSE_DATE = "v2.app.close.date"
}
}

enum Identity {
static let DATASTORE_NAME = "com.adobe.module.identity"

enum DataStoreKeys: String, CaseIterable {
case IDENTITY_PROPERTIES = "identity.properties"
case PUSH_ENABLED = "push.enabled"
case ANALYTICS_PUSH_ENABLED = "analytics.push.enabled"
}
}

enum Assurance {
static let DATASTORE_NAME = "com.adobe.module.assurance"

enum DataStoreKeys: String, CaseIterable {
case CLIENT_ID = "assurance.client.Id"
case ENVIRONMENT = "assurance.environment"
case SOCKET_URL = "assurance.socketurl"
case MODIFIED_CONFIG_KEYS = "assurance.control.modifiedConfigKeys"
}
}

enum Analytics {
static let DATASTORE_NAME = "com.adobe.module.analytics"

enum DataStoreKeys: String, CaseIterable {
case LAST_HIT_TS = "mostrecenthittimestamp"
case AID = "aid"
case VID = "vid"
case DATA_MIGRATED = "data.migrated"
}
}

enum Audience {
static let DATASTORE_NAME = "com.adobe.module.audience"

enum DataStoreKeys: String, CaseIterable {
case USER_PROFILE = "AAMUserProfile"
case USER_ID = "AAMUserId"
}
}

enum Target {
static let DATASTORE_NAME = "com.adobe.module.target"

enum DataStoreKeys: String, CaseIterable {
case SESSION_TIMESTAMP = "session.timestamp"
case SESSION_ID = "session.id"
case TNT_ID = "tnt.id"
case EDGE_HOST = "edge.host"
case THIRD_PARTY_ID = "thirdparty.id"
}
}

enum Campaign {
static let DATASTORE_NAME = "com.adobe.module.campaign"

enum DataStoreKeys: String, CaseIterable {
case REMOTE_URL = "CampaignRemoteUrl"
case ECID = "ExperienceCloudId"
case REGISTRATION_TS = "CampaignRegistrationTimestamp"
}
}

enum CampaignClassic {
static let DATASTORE_NAME = "com.adobe.module.campaignclassic"

enum DataStoreKeys: String, CaseIterable {
case TOKEN_HASH = "ADOBEMOBILE_STOREDDEFAULTS_TOKENHASH"
}
}

enum Places {
static let DATASTORE_NAME = "PlacesDataStore"

enum DataStoreKeys: String, CaseIterable {
case ACCURACY = "places_accuracy"
case AUTH_STATUS = "places_auth_status"
case CURRENT_POI = "places_current_poi"
case LAST_ENTERED_POI = "places_last_entered_poi"
case LAST_EXITED_POI = "places_last_exited_poi"
case LAST_KNOWN_LATITUDE = "places_last_known_latitude"
case LAST_KNOWN_LONGITUDE = "places_last_known_longitude"
case MEMBERSHIP = "places_membership_valid_until"
case NEARBY_POIS = "places_nearby_pois"
case USER_WITHIN_POIS = "places_user_within_pois"
}
}

enum UserProfile {
static let DATASTORE_NAME = "com.adobe.module.userProfile"

enum DataStoreKeys: String, CaseIterable {
case ATTRIBUTES = "attributes"
}
}

enum Edge {
static let DATASTORE_NAME = "com.adobe.edge"
static let PAYLOAD_DATASTORE_NAME = "AEPEdge"

enum EdgeDataStoreKeys: String, CaseIterable {
case RESET_IDENTITIES_DATE = "reset.identities.date"
case EDGE_PROPERTIES = "edge.properties"
}

enum EdgePayloadStoreKeys: String, CaseIterable {
case STORE_PAYLOADS = "storePayloads"
}
}

enum EdgeIdentity {
static let DATASTORE_NAME = "com.adobe.edge.identity"

enum DataStoreKeys: String, CaseIterable {
case IDENTITY_PROPERTIES = "identity.properties"
}
}

enum EdgeConsent {
static let DATASTORE_NAME = "com.adobe.edge.consent"

enum DataStoreKeys: String, CaseIterable {
case CONSENT_PREFERENCES = "consent.preferences"
}
}
}
Loading

0 comments on commit da278f9

Please sign in to comment.