objective c - Compile libtiff for iOS project to include 64bit architecture -


i have ios app updated latest sdk8.3 , using latest version of xcode. app uses libtiff convert image (in png format) tiff format. problem have need submit new revision app store , needs incorporate 64 bit architecture. libtiff library in project old , have update latest version.

i have downloaded libtiff 4.0.3 official download site ( ftp.remotesensing.org) can't build needed architectures, error. have read this post is little outdated , presume apple changed toolchain in xcode 6 compared xcode 5 or xcode 4.

i not expert in gcc / llvm toolchain , bit lost here. need tiff library in xcode project , compile it. i've tried build library myself builds os x , need ios.

documentation tiff in ios scarce , prefer use png, business reasons need use tiff. has compiled libtiff fat binary include 5 required architectures (i386, x86_64, arm64, armv7, armv7s)?

i need tiff conversion without jpg compression, guessing not need jpeg library.

i had similar problems fortunately found github project. follow instructions , build libraries. build libjpg first because dependency of liftiff.

use terminal , go folder of downloaded project, in case liftiff-ios-master, , run these 2 scripts, , in order.

./build-jpg.sh ./build-tiff.sh 

once finished in liftiff-ios-master/dependencies folder find 2 folders, include , lib necessary files.

in xcode copy following files project (these necessary files libtiff, no need copy jpeg library files unless need jpeg compression support):

libtiff files

and verify liftiff.a added link binary libraries section of build phases tab in target.

in .h or .m file include this:

#import <tiffio.h> 

compile , run. make sure setting architectures of build settings set standard architectures (armv7, arm64)

to verify liftiff.a has desired architectures, within folder , terminal use:

$ file libtiff.a libtiff.a: mach-o universal binary 5 architectures libtiff.a (for architecture armv7):     current ar archive random library libtiff.a (for architecture armv7s):    current ar archive random library libtiff.a (for architecture i386):      current ar archive random library libtiff.a (for architecture x86_64):    current ar archive random library libtiff.a (for architecture arm64):     current ar archive random library 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -