TL;TR
http://easynativeextensions.com/making-your-ios-apps-universal/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.
$ export AIR_HOME=/usr/local/Cellar/adobe-air-sdk/16.0.0.272/libexec
- 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/bin
try$ bash build.sh
- Open your Twitter, tweet something and close it!
- Smile!
- 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.a
to (Yes replace it)/ane-device-file-util/as3/bin/libDeviceFileUtil.a
- Make sure our .a is 64-bit
$ xcrun -sdk iphoneos lipo -info libPhotosAlbum.a
you 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 -info
You should seeArchitectures in the fat file: Main/Payload/Main.app/Main are: armv7 arm64
- Or try this for fun
$ file Main/Payload/Main.app/Main
Will getMain/Payload/Main.app/Main: Mach-O universal binary with 2 architectures Main/Payload/Main.app/Main (for architecture armv7): Mach-O executable arm Main/Payload/Main.app/Main (for architecture arm64): Mach-O 64-bit executable
- That's it!
Troubleshooting, If you see this
Error: Apple App Store allows only universal applications. "libDeviceFileUtil.a" is not a universal binary. Please change build settings in Xcode project to "Standard Architecture" 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
No comments:
Post a Comment