File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 4040
4141- (void )removeUserAttribute : (CDVInvokedUrlCommand *)command ;
4242
43+ - (void )getUserAttribute : (CDVInvokedUrlCommand *)command ;
44+
4345@end
Original file line number Diff line number Diff line change @@ -1267,6 +1267,21 @@ - (void) removeUserAttribute:(CDVInvokedUrlCommand*)command
12671267 [self .commandDelegate sendPluginResult: result callbackId: [command callbackId ]];
12681268 }
12691269
1270+ /* *
1271+ * Returns the user attribute associated with a given key.
1272+ */
1273+ - (void ) getUserAttribute:(CDVInvokedUrlCommand*)command
1274+ {
1275+ CDVPluginResult* result;
1276+
1277+ NSString * key = [command argumentAtIndex: 0 ];
1278+ NSString * userAttribute = @[[Instabug userAttributeForKey: key]];
1279+
1280+ result = [CDVPluginResult resultWithStatus: CDVCommandStatus_OK messageAsString: userAttribute];
1281+
1282+ [self .commandDelegate sendPluginResult: result callbackId: [command callbackId ]];
1283+ }
1284+
12701285 /* *
12711286 * Shows one of the surveys that were not shown before, that also have
12721287 * conditions that match the current device/user.
You can’t perform that action at this time.
0 commit comments