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
18 changes: 12 additions & 6 deletions apps/AEPSampleApp/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import EdgeIdentityView from './extensions/EdgeIdentityView';
import TargetView from './extensions/TargetView';
import PlacesView from './extensions/PlacesView';
import {NavigationProps} from './types/props';
import CampaignClassicView from './extensions/CampaignClassicView';

function HomeScreen({navigation}: NavigationProps) {
return (
Expand Down Expand Up @@ -62,6 +63,10 @@ function HomeScreen({navigation}: NavigationProps) {
onPress={() => navigation.navigate('PlacesView')}
title="Places"
/>
<Button
onPress={() => navigation.navigate('CampaignClassicView')}
title="Campaign Classic"
/>
</View>
);
}
Expand All @@ -74,15 +79,16 @@ export default function App() {
<Drawer.Navigator initialRouteName="Home">
<Drawer.Screen name="Home" component={HomeScreen} />
<Drawer.Screen name="CoreView" component={CoreView} />
<Drawer.Screen name="ProfileView" component={ProfileView} />
<Drawer.Screen name="IdentityView" component={IdentityView} />
<Drawer.Screen name="MessagingView" component={MessagingView} />
<Drawer.Screen name="AssuranceView" component={AssuranceView} />
<Drawer.Screen name="CampaignClassicView" component={CampaignClassicView} />
<Drawer.Screen name="ConsentView" component={ConsentView} />
<Drawer.Screen name="EdgeView" component={EdgeView} />
<Drawer.Screen name="EdgeIdentityView" component={EdgeIdentityView} />
<Drawer.Screen name="ConsentView" component={ConsentView} />
<Drawer.Screen name="AssuranceView" component={AssuranceView} />
<Drawer.Screen name="PlacesView" component={PlacesView} />
<Drawer.Screen name="IdentityView" component={IdentityView} />
<Drawer.Screen name="MessagingView" component={MessagingView} />
<Drawer.Screen name="OptimizeView" component={OptimizeView} />
<Drawer.Screen name="PlacesView" component={PlacesView} />
<Drawer.Screen name="ProfileView" component={ProfileView} />
<Drawer.Screen name="TargetView" component={TargetView} />
</Drawer.Navigator>
</NavigationContainer>
Expand Down
51 changes: 51 additions & 0 deletions apps/AEPSampleApp/extensions/CampaignClassicView.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import {CampaignClassic} from '@adobe/react-native-aepcampaignclassic';
import React from 'react';
import {Button, ScrollView, Text, View} from 'react-native';
import styles from '../styles/styles';
import {NavigationProps} from '../types/props';

function CampaignClassicView({navigation}: NavigationProps) {
const extensionVersion = async () => {
const version = await CampaignClassic.extensionVersion();
console.log(`AdobeExperienceSDK: Campaign Classic version: ${version}`);
};

const registerDeviceWithToken = () => {
CampaignClassic.registerDeviceWithToken('myToken', 'myUserKey');
console.log('Device registered!')
}

const trackNotificationClickWithUserInfo = () => {
CampaignClassic.trackNotificationClickWithUserInfo({'_mId': '12345', '_dId': 'testDId'});
console.log('Notification clicked!')
}

const trackNotificationReceiveWithUserInfo = () => {
CampaignClassic.trackNotificationReceiveWithUserInfo({'_mId': '12345', '_dId': 'testDId'});
console.log('Notification received!')
}


return (
<View style={{...styles.container, marginTop: 30}}>
<ScrollView contentContainerStyle={{marginTop: 75}}>
<Button onPress={() => navigation.goBack()} title="Go to main page" />
<Text style={styles.welcome}>Campaign Classic</Text>
<View style={{margin: 5}}>
<Button title="Extension Version" onPress={extensionVersion} />
<Button title="Register Device" onPress={registerDeviceWithToken} />
<Button
title="Track User Click"
onPress={trackNotificationClickWithUserInfo}
/>
<Button
title="Track User Receive"
onPress={trackNotificationReceiveWithUserInfo}
/>
</View>
</ScrollView>
</View>
);
}

export default CampaignClassicView;
1 change: 1 addition & 0 deletions apps/AEPSampleApp/ios/AEPSampleApp/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ governing permissions and limitations under the License.
@import AEPOptimize;
@import AEPPlaces;
@import AEPTarget;
@import AEPCampaignClassic;
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
@property (nonatomic, strong) UIWindow *window;

Expand Down
19 changes: 11 additions & 8 deletions apps/AEPSampleApp/ios/AEPSampleApp/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,17 @@ - (BOOL)application:(UIApplication *)application
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
[AEPMobileCore setLogLevel:AEPLogLevelTrace];
[AEPMobileCore registerExtensions:@[
AEPMobileEdgeIdentity.class, AEPMobileEdge.class,
AEPMobileEdgeConsent.class, AEPMobileMessaging.class,
AEPMobileOptimize.class, AEPMobilePlaces.class, AEPMobileTarget.class
]
completion:^{
[AEPMobileCore configureWithAppId:@"YOUR-APP-ID"];
}];
[AEPMobileCore
registerExtensions:@[
AEPMobileEdgeIdentity.class, AEPMobileEdge.class,
AEPMobileEdgeConsent.class, AEPMobileMessaging.class,
AEPMobileOptimize.class, AEPMobilePlaces.class, AEPMobileTarget.class,
AEPMobileCampaignClassic.class
]
completion:^{
[AEPMobileCore
configureWithAppId:@"YOUR-APP-ID"];
}];
return YES;
}

Expand Down
12 changes: 12 additions & 0 deletions apps/AEPSampleApp/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ PODS:
- AEPAssurance (3.0.1):
- AEPCore (>= 3.1.0)
- AEPServices (>= 3.1.0)
- AEPCampaignClassic (3.0.0):
- AEPCore (>= 3.7.0)
- AEPServices (>= 3.7.0)
- AEPCore (3.7.1):
- AEPRulesEngine (>= 1.1.0)
- AEPServices (>= 3.7.1)
Expand Down Expand Up @@ -127,6 +130,9 @@ PODS:
- RCTAEPAssurance (3.0.0):
- AEPAssurance (~> 3.0)
- React
- RCTAEPCampaignClassic (1.0.0-beta.1):
- AEPCampaignClassic (~> 3.0)
- React
- RCTAEPCore (1.0.1):
- AEPCore (~> 3.0)
- AEPIdentity (~> 3.0)
Expand Down Expand Up @@ -494,6 +500,7 @@ DEPENDENCIES:
- OpenSSL-Universal (= 1.1.1100)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTAEPAssurance (from `../../../packages/assurance`)
- RCTAEPCampaignClassic (from `../../../packages/campaignclassic`)
- RCTAEPCore (from `../../../packages/core`)
- RCTAEPEdge (from `../../../packages/edge`)
- RCTAEPEdgeConsent (from `../../../packages/edgeconsent`)
Expand Down Expand Up @@ -540,6 +547,7 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- AEPAssurance
- AEPCampaignClassic
- AEPCore
- AEPEdge
- AEPEdgeConsent
Expand Down Expand Up @@ -587,6 +595,8 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
RCTAEPAssurance:
:path: "../../../packages/assurance"
RCTAEPCampaignClassic:
:path: "../../../packages/campaignclassic"
RCTAEPCore:
:path: "../../../packages/core"
RCTAEPEdge:
Expand Down Expand Up @@ -675,6 +685,7 @@ CHECKOUT OPTIONS:

SPEC CHECKSUMS:
AEPAssurance: b25880cd4b14f22c61a1dce19807bd0ca0fe9b17
AEPCampaignClassic: cd20252606d9e12d5ee2c410df260762faa49d2c
AEPCore: 412fe933382892ab6c6af958d2f69ebcbca11216
AEPEdge: 6faf60328f9e5ae7a107fd61f9a968f46ebf2928
AEPEdgeConsent: a23b35ab331d2aa2013fcef49c9d6b80085d5597
Expand Down Expand Up @@ -709,6 +720,7 @@ SPEC CHECKSUMS:
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8
RCTAEPAssurance: 9f51b9b5da17f9b98a41ce29e4f3e3b67ea36c17
RCTAEPCampaignClassic: eab902c60651cca7030756d1df9e4048e681f626
RCTAEPCore: 513c7e995cafcaf536653f0dfaaba2b92862b93a
RCTAEPEdge: 9938932e89a90adf5cd30250b46cc67fbe35dd06
RCTAEPEdgeConsent: b998b2d08f254635ef01263fea186d7262f2d242
Expand Down
1 change: 1 addition & 0 deletions apps/AEPSampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"dependencies": {
"@adobe/react-native-aepassurance": "^3.0.0",
"@adobe/react-native-aepcampaignclassic": "1.0.0-beta.1",
"@adobe/react-native-aepcore": "^1.0.0",
"@adobe/react-native-aepedge": "^1.0.0",
"@adobe/react-native-aepedgeconsent": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"bootstrap": "npx lerna bootstrap",
"prebuild": "npx lerna exec --ignore aepsampleapp -- rm -rf js",
"build": "npx lerna exec --ignore aepsampleapp -- tsc",
"tests:jest": "npx jest",
"tests:jest": "jest",
"sampleapp:ios:pod:update": "cd apps/AEPSampleApp/ios && pod update",
"sampleapp:ios:pod:install": "cd apps/AEPSampleApp/ios && pod install",
"sampleapp:ios:build": "cd apps/AEPSampleApp && npx react-native run-ios",
Expand Down
69 changes: 69 additions & 0 deletions packages/campaignclassic/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
sample/
.github/
.git/

# Built application files
android/*/build/

# Crashlytics configuations
android/com_crashlytics_export_strings.xml

# Local configuration file (sdk path, etc)
android/local.properties

# Gradle generated files
android/.gradle/

# Signing files
android/.signing/

# User-specific configurations
android/.idea/gradle.xml
android/.idea/libraries/
android/.idea/workspace.xml
android/.idea/tasks.xml
android/.idea/.name
android/.idea/compiler.xml
android/.idea/copyright/profiles_settings.xml
android/.idea/encodings.xml
android/.idea/misc.xml
android/.idea/modules.xml
android/.idea/scopes/scope_settings.xml
android/.idea/vcs.xml
android/*.iml

# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
ios/Pods
ios/build
*project.xcworkspace*
*xcuserdata*
ios/*.xcworkspace
ios/*.podspec

# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.dbandroid/gradle
android/gradlew
android/build
android/gradlew.bat
android/gradle/
__tests__
.circleci/
.opensource/
jest/
acp-sdks/
update-android-sdk.sh
CONTRIBUTING.md
CODE_OF_CONDUCT.md
Makefile
*.tgz
22 changes: 22 additions & 0 deletions packages/campaignclassic/RCTAEPCampaignClassic.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
s.name = "RCTAEPCampaignClassic"
s.version = package["version"]
s.summary = "Experience Platform Campaign Classic extension for Adobe Experience Platform Mobile SDK. Written and Supported by Adobe."
s.author = "Adobe Experience Platform SDK Team"

s.homepage = "https://github.com/adobe/aepsdk-react-native"

s.license = "Apache 2.0 License"
s.platform = :ios, '10.0'

s.source = { :git => "https://github.com/adobe/aepsdk-react-native.git", :tag => "#{s.version}" }

s.source_files = 'ios/**/*.{h,m}'
s.requires_arc = true

s.dependency "React"
s.dependency "AEPCampaignClassic", "~>3.0"
end
Loading