netpyoung / SqlCipher4Unity3D

💾 SqlCipher made easy for Unity3d
MIT License
165 stars 37 forks source link

Build for macos #18

Closed tunnel closed 4 years ago

tunnel commented 5 years ago

Hello, I included the SqlCipher4Unity3D plugin into my game. I try to add it to the appstore. But it's rejected with the following message: "Invalid Signature - The executable at path my.app/Contents/Plugins/sqlcipher.bundle has following signing error(s): code object is not signed at all In architecture: x86_64 ." Do you know what may cause this? And maybe a way to solve this? Thanks!

tunnel commented 5 years ago

Figured the problem. The sqlcipher.bundle is in FAT format. This caused the problem. Probalby that appstore can't scan FAT libraries. I extracted x86_64 library using the lipo tool: "lipo sqlcipherold.bundle -extract x86_64 -output sqlcipher" (second architecture i386 from the bundle should be excluded. That's demanded by appstore.) Then I constructed non-fat sqlcipher.bundle with Info.plist and extracted x86_64 sqlcipher unix library inside. After that appstore accepted the app for review.

P.S. Also I added libsqlcipher.so into the project for Linux, it was missing in your .unitypackage.

netpyoung commented 5 years ago

Thank you for reporting that.👍 I didn't noticed that problem. I will check that then apply on repository!

netpyoung commented 5 years ago

https://github.com/netpyoung/SqlCipher4Unity3D/blob/a3c71b80362a7a7fb243c4efb52a14487c703133/SqlCipher4Unity3D/Assets/SqlCipher4Unity3D/Plugins/x64/sqlcipher.bundle

file SqlCipher4Unity3D/Assets/SqlCipher4Unity3D/Plugins/x64/sqlcipher.bundle
SqlCipher4Unity3D/Assets/SqlCipher4Unity3D/Plugins/x64/sqlcipher.bundle: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [i386:Mach-O dynamically linked shared library i386]
SqlCipher4Unity3D/Assets/SqlCipher4Unity3D/Plugins/x64/sqlcipher.bundle (for architecture x86_64):  Mach-O 64-bit dynamically linked shared library x86_64
SqlCipher4Unity3D/Assets/SqlCipher4Unity3D/Plugins/x64/sqlcipher.bundle (for architecture i386):    Mach-O dynamically linked shared library i386

then I wrote buildscript for osx 64bit. then got that result.

~/hello/SqlCipher4Unity3D/lib/macOS_64]$ file sqlcipher.bundle
sqlcipher.bundle: Mach-O 64-bit dynamically linked shared library x86_64
netpyoung commented 5 years ago

then I also updated linux library - https://github.com/netpyoung/SqlCipher4Unity3D/commit/e5f25b049a402344c558ee0f94048f361f23c74b

netpyoung commented 5 years ago

When I build that library, the first target is for support iOS, So I build iOS library for universal version. then also macOS also. Then, I didn't have a chance to upload macOS appstore. so I didn't found that bug.

Thank you for reporting @tunnel