cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Cannot update label in iOS 14

leonardosella
12-Amethyst

Cannot update label in iOS 14

Hi everyone, my project has some labels that could be updated at every sequence step.

with: 

 

$scope.$on('stepstarted', function(evt, arg1, arg2, arg3) {
		//pulisco l'etichetta e stampo l'etichetta del passo successivo
		console.log("----STEP STARTED----")
   		var parsedArg3 = JSON.parse(arg3);
		console.warn(arg3);
	
    	//console.log("stepNumber="+parsedArg3.stepNumber);
    	//console.log("stepDescription="+parsedArg3.stepDescription);
    	//console.log("nextStep="+parsedArg3.nextStep);
    
    	$scope.app.nextStep = parsedArg3.nextStep;
   		$scope.app.totalSteps = parsedArg3.totalSteps;
    	
   		console.log(">> Arg1: " + arg1); //nome dell'animazione
   		console.log(">> Arg3: " + arg3); //stringhe contenute nel pvz
 
    	//stampa su etichetta la descrizione
   	 	$scope.app.stepDescription = parsedArg3.stepDescription;
		$scope.setWidgetProp("stepDescription", "text", $scope.app.stepDescription);  //step-description è il nome della label in cui di vanno a stampare le indicazioni dei passi 
      $scope.setWidgetProp("stepDescription3", "text", $scope.app.stepDescription);
	});

 

All is working fine in preview mode, so when test the experience with my device that is running iOS 14 no labels will be update. 

 

Anyone has some idea how to resolve this problem?

 

Thank you.  

1 REPLY 1

I am not quite sure , but I think I could remember that there observed some difference between chrome preview and IOS device, but I could not remember what was it exactly - I believe some of the fields are not contained in the started event - is in this case possible to use the stepcompleted event or at least check if in context of the stepcompleted event it works

If I have such case I will test:

1.) is the event fired 'stepstarted' ? Here you can simple write some fix text in the text property e.g. “event was started”

2.) check what the json object contains (may be there are some fields ignored – they are not passed to the event) - e.g. print the full json object

 

 

$scope.$on('stepstarted', function(evt, arg1, arg2, arg3) { 
 var parsedArg3 = JSON.parse(arg3); 
var labelId='textArea-1';
$scope.setWidgetProp(labelId,"text", JSON.stringify(parsedArg3));
$scope.$applyAsync();
});

 

3.)  use $scope.applyAsync() call after setting to update the props. You can alternative try to use the direct assignment of the property and then call the

 

 

...
$scope.view.wdg['textArea-1']['text']= JSON.stringify(parsedArg3);
 $scope.$applyAsync();
...

 

 

Top Tags