Receive data from iOS app


Receive data from a method in the generated Apple iOS app’s class.

Configure the Method name, Data type, and Data size parameters to match those of the method.

For example, suppose that the method:

  • Is -(void)FromAppFcn: (int*)outData.

  • Returns three data elements each time it runs.

  • The data type of the elements is int32.

Then, set:

  • Method name to FromAppFcn

  • Data size to 3

  • Data type to int32

The method in the iOS app must return a data type that this block can accept.

During simulations without hardware, this block outputs zeros. See Block Produces Zeros or Does Nothing in Simulation (Simulink).

Dialog Box

Method name

The name of the method in the Apple iOS app’s class.

Data type

The data type of the elements returned by the method.

Data size

The number of data elements the method returns to the block each time it runs.

Sample time

Specify how often the block reads the function.

Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.

See Also

Introduced in R2015a