Or try doing thing backward here ;)
- Open your Mac.
- Open Facebook check it fast and close it!
- Make sure Adobe AIR SDK is update to most recent by brew it. (or install if you don't have one)
$ brew upgrade adobe-air-sdk
- Make sure AIR SDK path is set.
- Clone my working ANE 64-bit ready https://github.com/katopz/ane-device-file-util
- Go to /ane-device-file-util/as3/bin
$ cd /ane-device-file-util/as3/bintry
$ bash build.sh
- Open your Twitter, tweet something and close it!
- That's it!
You just build ANE from working static library "libDeviceFileUtil.a", now let's try make one your own! Follow this step below...
- open my /ane-device-file-util/xcode/DeviceFileUtil.xcodeproj
- Target iOS Device just in case
- Product -> Archive
- You should see "libDeviceFileUtil.a" as link to library in /ane-device-file-util/as3/bin
- Right click on it and select "Show Original"
- copy real "libDeviceFileUtil.a" which landing somewhere like this
/Users/katopz/Library/Developer/Xcode/DerivedData/DeviceFileUtil-duuxfozodbsnpvcpelrqiicctqps/Build/Intermediates/ArchiveIntermediates/DeviceFileUtil/IntermediateBuildFilesPath/UninstalledProducts/libDeviceFileUtil.ato (Yes replace it)
- Make sure our .a is 64-bit
$ xcrun -sdk iphoneos lipo -info libPhotosAlbum.ayou should see some clang warning and finally at last line...
Architectures in the fat file: libPhotosAlbum.a are: armv7 arm64
- Now run build.sh again everything should be fine.
- Open your Twitter, tweet for your success and close it!
- Click ads on this page.
- Gotcha! Thanks.
You just build static library and ANE! great job!, now let's check it working!
- Use ANE like usual
- Build your ipa e.g. Main.ipa
- Unzip to somewhere e.g. "/Main"
- Now run this in terminal
$ lipo Main/Payload/Main.app/Main -infoYou should see
Architecturesthe fat file: Main/Payload/Main.app/Main are: armv7 arm64
- Or try this for fun
$ file Main/Payload/Main.app/MainWill get
Main/Payload/Main.app/Main: Mach-O universal binary with 2 architectures Main/Payload/Main.app/Main (armv7): Mach-O executable arm Main/Payload/Main.app/Main ( arm64): Mach-O 64-bit executable
- That's it!
Troubleshooting, If you see this
Error: Apple App Store allows only universal applications.is not a universal binary. Please change build settings Xcode project to to create universal library/framework.
It's mean "your-cool-lib.a" is not 64-bit yet, try setup Architecture like picture above.
Happy 64-bit! :D