It's been a year and a half since I last put my finger on OpenMPT iOS integration (originally posted about this at
https://forum.openmpt.org/index.php?topic=5695.msg43421#msg43421) - decision for setting the project aside for a while rose from Apple's rather blunt rejection of 4champ from AppStore just when I had an all new and shiny version ready. You can read more about the dispute with Apple and other 4champ development related things on my dev journal at
https://sitomani.github.io/4champhttps://github.com/sitomani/openmpt).
Here's some observations that I've made (comments would be appreciated if anyone knows how to work around / mitigate these):
1. premake5 still cannot create iOS projects Current official premake5 release is dated 27 August 2017, 269 commits in master since then. I can see from the commit history that on 30 August samsinsane
"Added basic iOS support to XCode4" which sounded very promising
. However, when I built premake from sources and tried to use the
system "iOS"
command in the lua script, the resulting xcode project still targets Mac OS only. In my forked repository, I've added a build script that modifies the generated xcode project file and explicitly sets
SDKROOT = iphoneos
and removes the fixed target architecture setting to enable xcode to autoselect archs. If someone knows how it is supposed to work with premake5 latest master build, let me know.
2. premake5 generated xcode project does not have correct linking phase configuration I'm creating libopenmpt-small group with premake, and the lua file seems to have intact
links section listing miniz, minimp3 and stb_vorbis libs. However, in the generated xcode project, these libs are only listed under Target Dependencies build phase, and not under Link Binary With Libraries phase. I found some discussion under premake-core github around
dependson and
links usage&issues with xcode but as long as I read it correctly,
links should work a-ok. I guess resolving this would require a deeper look at premake code and reporting to their issue list. For now, I've decided to add the libs to the link phase manually in xcode before running the build.
3. update_svn_version_vs_premake.cmd calls in the openmpt targets fails on xcode buildsMy solution is to filter them out with
filter { "action:vs*" }
. Maybe this could be done in the openmpt trunk as well?
4. building the full libopenmpt has more obstacles like missing xcode port under mpg123For my purposes libopenmpt-small will do, but I recall I managed to build the full lib back in 2016. With the latest code however there is a number of build time errors that would require further adjustments, which mostly are trivial (i.e. tweaking with include paths and adding an include here and there) but for mpg123 it'd require that you pick the xcode port along from
https://www.mpg123.de/cgi-bin/scm/mpg123/trunk/ports/ - openmpt repository only has the MSVC++ port. Does that sound feasible to you?
That's all for now - I'm going to working on the 4champ open source version in small chunks, and hopefully getting something usable out later this year that anybody could build locally and run on their own devices. Ultimate goal would be to get the app relisted on AppStore, but it will require getting around the Apple review policy with some trickery that I haven't yet figured out.