since ‎15-05-2015
‎10-12-2019
phuo1032
Employee
Re: Context data and variables
Avatar

phuo1032

Employee

phuo1032
- Adobe Experience Platform SDKs
1. It depends on where you are inserting this line of code in the application. The contextData variable may be a field of another object (s or p). The developers should recognize whether they need it or not.2. Yes, I used 'login_status' in my example to be consistent with the String used in the setObject call from Objective-C. In actual implementation it is likely that it is a value of current login status, for this particular example.

Views

2.2K

Likes

2

Replies

0
Re: Context data and variables
Avatar

phuo1032

Employee

phuo1032
- Adobe Experience Platform SDKs
Hi jha0024, the example above you provided above would be the correct syntax. For example: instead of doing[contextData setObject:@"login_status" forKey:@"mobile.login_status"];you may do contextData['mobile.login_status'] = 'login_status'

Views

2.2K

Likes

2

Replies

0
Re: Context data and variables
Avatar

phuo1032

Employee

phuo1032
- Adobe Experience Platform SDKs
Hi jha0024​ - May I ask if you are asking about the Android or iOS app implementation? If it is iOS, is your application written in Swift or Objective-C.[contextData setObject] is Objective-C syntax. The example you provided: s.contextData[‘mobile.login_status’] = ‘Logged In’, looks like a Swift syntax.

Views

2.2K

Like

1

Replies

0