UnityZip icon indicating copy to clipboard operation
UnityZip copied to clipboard

Can't build Xcode project: linker errors

Open brunoleos opened this issue 9 years ago • 3 comments

When I try to build the generated project from Unity in Xcode, I get undefined symbols errors when linking. The symbols are: _zip _unzip _addZipFile

I've tried adding the folder ZipArchive from PluginsCode, as instructed in README.md, at the Classes folder of my Xcode project, and also at Libraries/Plugins/iOS folder, but get the same errors.

What can I do to succeed the build?

brunoleos avatar Mar 14 '17 13:03 brunoleos

Add UnityZipFile.mm from unity Assets/plugins/ios folder to Xcode project

StrelnikovEugene avatar May 26 '17 18:05 StrelnikovEugene

Where do we have to add this file? I tried to add into the classes folder in the xcode project generated by unity but it did not work.

Acimaz avatar Jun 18 '18 14:06 Acimaz

To-do's for UniZip for Unity & XCode:

  • add "PluginsCode>iOS>ZipArchive" files & folder to Unity project "Assets\Plugins\iOS"
  • After that copy from package UnityZip: ">Asset>Plugins" (folders, files) & add to your project VTDB: "\Assets\Plugins"

Alterations for UniZip for iOS successful build:

  • If package is newly imported after above setup: (1) Open "ZipArchive.mm" file and REMOVE:

-line 270[dc release] -line 271[gregorian release] -line 327[comp release] -line 328[gregorian release] -line 40[super delloc]

(2) Open "UnityZipFile.mm" file and REMOVE:

-line 32[zip release] -line 35[list release] -line 59[zip release]

-Before Build in XCode select "unity framework" from "unity iPhone" and go to "build settings>other>flags" add "-lz" symbol.

contribution by: https://github.com/Ad-mob-dev

akrimahuzaifa avatar Oct 13 '22 06:10 akrimahuzaifa