Closed cabanel closed 6 years ago
at first you need to understand that. https://docs.unity3d.com/Manual/IL2CPP-BytecodeStripping.html
to prevent stripping.
[Preserve]
attributelink.xml
for example.
Person.cs with [Preserve]
attribute
namespace HelloWorld.Nice.To.Meet
{
[Preserve]
public class Person {
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string Name { get; set; }
}
}
link.xml
under directory Assets/
or Assets/
's subdirectory
<linker>
<assembly fullname="HelloWorld.Nice.To.Meet" preserve="all"/>
</linker>%
I use SQLite4Unity3d for some time and I've never entered
using [Preserve] attribute or using link.xml
is it necessary to do it for encryption of SqlCipher4Unity3D?
thanks
unity's IL2CPP build not only stripping unused code. sometime stripping class name. for example
db.sqlite
Hello
id | value |
---|---|
1 | val |
Hello.cs
class Hello
{
int id { get; set;}
}
you can't find name by Hello
so It will be failed without prevent stripping db.Get<Hello>(x => x.id == 1)
;
but this also happens with SQLite4Unity3d?
I think also happen in SQLite4Unity3D if ios building with.
I've been using SQLite4Unity3d for years to develop apps for ios and I've never used
[Preserve] attribute or link.xml
um.. I don't know exactly. but In my case It needed. If that's work what you said, It also good.
@cabanel Is it okay to close this issue?
hi, in http://unitylist.com/r/9qg/sql-cipher-4-unity3d
is write : If You are on iOS, need to modify link.xml for prevent stripping by Unity.
what the file link.xml must contain and where to place it
can you help me?
thank you