Skip to content

Commit b563aed

Browse files
authored
Merge pull request #241 from cacheung/consentUpdate
Update consent readme doc for registration information
2 parents 8762ac9 + ec92c5f commit b563aed

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

packages/edgeconsent/README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,16 @@ iOS
4444

4545
// AppDelegate.m
4646
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
47-
[AEPMobileCore setLogLevel: AEPLogLevelDebug];
48-
[AEPMobileCore registerExtensions:@[AEPMobileEdgeIdentity.class,
49-
AEPMobileEdge.class,
50-
AEPMobileEdgeConsent.class] completion:^{
51-
[AEPMobileCore configureWithAppId:@"yourAppID"];
47+
48+
// TODO: Set up the preferred Environment File ID from your mobile property configured in Data Collection UI
49+
NSString* ENVIRONMENT_FILE_ID = @"YOUR-APP-ID";
50+
51+
NSArray *extensionsToRegister = @[AEPMobileEdgeIdentity.class,
52+
AEPMobileEdge.class,
53+
AEPMobileEdgeConsent.class
54+
];
55+
56+
[AEPMobileCore configureWithAppId: ENVIRONMENT_FILE_ID];
5257
...
5358
}];
5459
return YES;
@@ -59,7 +64,6 @@ iOS
5964
6065
Android
6166
```java
62-
import com.adobe.marketing.mobile.LoggingMode;
6367
import com.adobe.marketing.mobile.MobileCore;
6468
import com.adobe.marketing.mobile.Edge;
6569
import com.adobe.marketing.mobile.edge.identity.Identity;
@@ -70,30 +74,28 @@ import android.app.Application;
7074
...
7175
public class MainApplication extends Application implements ReactApplication {
7276
...
77+
// TODO: Set up the preferred Environment File ID from your mobile property configured in Data Collection UI
78+
private final String ENVIRONMENT_FILE_ID = "YOUR-APP-ID";
79+
7380
@Override
7481
public void on Create(){
7582
super.onCreate();
7683
...
7784
MobileCore.setApplication(this);
78-
MobileCore.setLogLevel(LoggingMode.DEBUG);
7985
MobileCore.configureWithAppID("yourAppID");
8086
81-
Edge.registerExtension();
82-
Identity.registerExtension();
83-
Consent.registerExtension();
84-
MobileCore.start(new AdobeCallback() {
85-
@Override
86-
public void call(Object o) {
87-
88-
}});
87+
MobileCore.registerExtensions(
88+
Arrays.asList(Consent.EXTENSION, Identity.EXTENSION, Edge.EXTENSION),
89+
o -> Log.d("MainApp", "Adobe Experience Platform Mobile SDK was initialized")
90+
);
8991
}
90-
}
92+
}
9193
```
9294

9395
### Importing the extension
9496
In your React Native application, import the Consent extension as follows:
9597
```typescript
96-
import {Consent} from '@adobe/react-native-aepedgeconsent';
98+
import {Consent} from "@adobe/react-native-aepedgeconsent";
9799
```
98100

99101
## API reference

0 commit comments

Comments
 (0)