1

Here when I tried setting the "test_activity" string as a variable I am getting some errors.

os_activity_initiate("test_activity", OS_ACTIVITY_FLAG_DEFAULT, ^(void) {

});

How to set the activity name as a variable here? something like given below.

os_activity_initiate(activity_name, OS_ACTIVITY_FLAG_DEFAULT, ^(void) {

});

I could see the following function "_os_activity_initiate", but it is mentioned that "Do not use directly because your description will not be preserved" not sure what does it means? Any idea? Please help.

arango_86
  • 4,236
  • 4
  • 40
  • 46

1 Answers1

2

Unfortunately this is not possible - os_activity_initiate() requires the first argument to be a static string. You cannot use a variable here.

quellish
  • 21,123
  • 4
  • 76
  • 83