Main Content


Send data to method of app

  • ToApp block

Simulink Support Package for Apple iOS Devices / Advanced


The ToApp block sends data to a method defined in the class of an Apple iOS app. After code generation is completed, you can modify the generated code to make use of the data given as input to this block and call a method.

For example, if the block input is int32(ones(3,1)) and the method name is ToAppFcn, then the expected method in the Apple iOS app code is:

-(void) ToAppFcn: (int*) inData
In this case, inData is an integer vector of three elements.


During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.



expand all

Data to send to a method in an Apple iOS app, specified as a numeric vector. This data is received as input by the method specified in the Method name parameter.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean


expand all

Specify the name of a method in the Apple iOS app. This method must accept the data type of the input data given to the block.

Version History

Introduced in R2015a

See Also