I want to use DataTable class on iOS. I am implementing DataTable class as you see in the code. It works fine on Android and Standalone builds with Unity. I cannot figure it out why iOS is not woking. The interesting part is the early version of this app works fine on all platforms. Is there any idea how to dig in to the issue? I check the build folder on Xcode and I see the System.Data.dll on the resources folder so the is no optimization stripped all necessary files are included.
DataTable dataTable = new DataTable("Example Table Name");
DataColumn column;
DataRow row;
Debug.Log("Datarow and column created");
// Create new DataColumn, set DataType,
// ColumnName and add to DataTable.
column = new DataColumn
{
DataType = Type.GetType("System.String"),
ColumnName = "foo",
ReadOnly = false,
Unique = false
};
Debug.Log("First column created");
dataTable.Columns.Add(column);
When i build on iOS on console i see the first debug log message then throw this exception.
Log: NotSupportedException: linked away Stack: System.Data.DataCommonEventSource.ExitScope (System.Int64 scopeId) (at <00000000000000000000000000000000>:0)
System.Data.DataColumn.set_ColumnName (System.String value) (at <00000000000000000000000000000000>:0)
GenelSatisUIController.CreateTable () (at <00000000000000000000000000000000>:0)
GenelSatisUIController.AdHeaderAndValues () (at <00000000000000000000000000000000>:0)
GenelSatisUIController+<GenelSatiRaporTable>d__7.MoveNext () (at <00000000000000000000000000000000>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0)
Any help would be greatly appreciated.
ColumnName = ...
maybe related toWhen a DataColumn is created, it has no ColumnName value. However, when the DataColumn is added to a DataColumnCollection for a DataTable object, it is given a default name ("Column1", "Column2", and so on).
(fromDataColumn
) – Edana