You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
build iOS runnable app in the style of the OS X one #24
=== BUILD TARGET iosapp OF PROJECT llmr-app WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
target specifies product type 'com.apple.product-type.tool', but there's no such product type for the 'iphoneos' platform
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
make: *** [iapp] Error 65
ld: warning: ignoring file /usr/local/Cellar/libpng/1.5.17/lib/libpng15.dylib, file was built for x86_64 which is not the architecture being linked (armv7): /usr/local/Cellar/libpng/1.5.17/lib/libpng15.dylib
As noted by @springmeyer, we need to somehow build libpng for ARM etc. Best approach is probably documenting this and leaving it up to the user to who needs to build/test on iOS. He's prepping some material to help me set this up.
I've documented in the readme in 8b4b91f. Not as clean as I'd like it, but should work. @incanus - Can you check what you have for iOS in when you have a chance so I can test if my universal png libs work okay?
@incanus I'm pretty sure that libpng already exists somewhere on iOS, likely buried in a Framework. Alternatively, we can move this to platform.hpp and use an iOS-native library to decode the PNGs.
How invasive is it to go the native decoding route? That would be really easy in native code. Do you foresee another external lib coming up soon that we'd have to deal with again anyway? (i.e. should we just figure out a pattern for custom-arch external libs?)
@springmeyer working through your Mapnik-based steps now. One note is you now need three arches for device: armv7, armv7s, and arm64, as well as both i386 and x86_64 for simulator (64-bit simulator is now available).
I'm getting errors trying to write to /out but I'll patch that up.
@incanus likely candidates for inclusion in the app are HarfBuzz, but not much beyond that. For HarfBuzz, we could substitute Core Text/TextKit, but it'll likely produce slightly different results.
Ok. Let me see how painful building my own libpng is. Again, this is just for us for now and in future, for people hacking on llmr, not end devs using, say, the Cocoa API.
Ok I got a build working ok. For practicality, does it make sense to include the build scripts used from mapnik-packaging along with the ios directory in this project?
Here's my calling script that leads to a fat libpng and a successful iOS app build:
Nice work @incanus - sticking with external/fat libpng for now seems great for now - gets us running fast and helps create a framework for testing other external libs. But I agree with @kkaefer that ideally/long term we try to stay small/core and minimize external libs - I think it just may take some time to figure out the details while right now our focus should be on functionality and ensuring we are cross platform.
Activity
incanus commentedon Feb 1, 2014
Bunch of approaches to this, but http://psellos.com/ios/iossim-command-line.html looks to be one of the freshest / most compelling / most self-contained.
incanus commentedon Feb 1, 2014
Also https://github.com/phonegap/ios-sim comes recommended to me by @landonf, who wrote the original implementation. NPM-installable, too.
incanus commentedon Feb 1, 2014
Oh yeah, this is gonna work great. Done.
springmeyer commentedon Feb 1, 2014
This would be very cool. Didn't even think this was possible.
incanus commentedon Feb 1, 2014
Almost building. Looking like this so far:
https://gist.github.com/incanus/1ac9408ce885b644d4b4#file-makefile-L31-L34
Error:
incanus commentedon Feb 3, 2014
Beyond this; blocking on
libpngGyp failure now.incanus commentedon Feb 3, 2014
Latest: https://gist.github.com/incanus/8762364eb383ae384cb6
incanus commentedon Feb 4, 2014
Latest fail w/
libpngis related to dylibs:incanus commentedon Feb 4, 2014
As noted by @springmeyer, we need to somehow build
libpngfor ARM etc. Best approach is probably documenting this and leaving it up to the user to who needs to build/test on iOS. He's prepping some material to help me set this up.springmeyer commentedon Feb 4, 2014
I've documented in the readme in 8b4b91f. Not as clean as I'd like it, but should work. @incanus - Can you check what you have for iOS in when you have a chance so I can test if my universal png libs work okay?
kkaefer commentedon Feb 4, 2014
@incanus I'm pretty sure that libpng already exists somewhere on iOS, likely buried in a Framework. Alternatively, we can move this to platform.hpp and use an iOS-native library to decode the PNGs.
incanus commentedon Feb 4, 2014
Good call, I will look into that. It kind of rings a bell, but it would have to indeed be buried because I couldn't find it in the normal places.
incanus commentedon Feb 4, 2014
No such luck.
How invasive is it to go the native decoding route? That would be really easy in native code. Do you foresee another external lib coming up soon that we'd have to deal with again anyway? (i.e. should we just figure out a pattern for custom-arch external libs?)
incanus commentedon Feb 4, 2014
@springmeyer working through your Mapnik-based steps now. One note is you now need three arches for device:
armv7,armv7s, andarm64, as well as bothi386andx86_64for simulator (64-bit simulator is now available).I'm getting errors trying to write to
/outbut I'll patch that up.kkaefer commentedon Feb 4, 2014
@incanus likely candidates for inclusion in the app are HarfBuzz, but not much beyond that. For HarfBuzz, we could substitute Core Text/TextKit, but it'll likely produce slightly different results.
incanus commentedon Feb 4, 2014
Ok. Let me see how painful building my own libpng is. Again, this is just for us for now and in future, for people hacking on llmr, not end devs using, say, the Cocoa API.
incanus commentedon Feb 4, 2014
Putting this into a
do.shscript instead of typing/pasting direct solved the/out/$BASH_SOURCEproblem, so I think I'm about set:kkaefer commentedon Feb 4, 2014
if we link to the core framework in the ios app, our lib will also get smaller
incanus commentedon Feb 4, 2014
Ok I got a build working ok. For practicality, does it make sense to include the build scripts used from
mapnik-packagingalong with theiosdirectory in this project?Here's my calling script that leads to a fat
libpngand a successful iOS app build:https://gist.github.com/incanus/8913d9783e3bc0bab17d
refs #24: Gyp-built iOS test app
incanus commentedon Feb 4, 2014
Ok, test app is in
master. Seeios/README.md. I'll start cleaning up the actual functionality of it (mostly pinch gestures).The
ios-simthing is a little janky, plus per the README you should test on device anyway. Might work on that later, but it's low priority.Took care of
libpngwithios/setup_libpng.sh. Related: mapnik/mapnik-packaging#119springmeyer commentedon Feb 4, 2014
Nice work @incanus - sticking with external/fat libpng for now seems great for now - gets us running fast and helps create a framework for testing other external libs. But I agree with @kkaefer that ideally/long term we try to stay small/core and minimize external libs - I think it just may take some time to figure out the details while right now our focus should be on functionality and ensuring we are cross platform.
kkaefer commentedon Feb 5, 2014
I'm still getting "building for iOS Simulator, but linking against dylib built for MacOSX file '/opt/X11/lib/libpng15.dylib' for architecture i386"
kkaefer commentedon Feb 5, 2014
Ah sorry, I didn't run the ios setup script.