Porting an existing iOS/UIKit app to OpenFrameworks

Hi there,

For a freelancing contract I have been helping develop “The Monster Musician Reader”, which is an iOS app developed in Objective-C/UIKit. My client wants to create a cross-platform version of this, and I’m trying to figure out the technical details for the best possible way forward.

Here is a link to the app: https://apps.apple.com/us/app/the-monster-musician-reader/id1350293332

And a video of it in action: https://www.youtube.com/watch?v=A1TELWy2luc

The app is a rhythm game for learning sight reading; each level consists of a MusicXML score being rendered on a scrolling view, and the user must play the corresponding notes in time with the score in order to score points. All of the audio-related code is done with a libpd patch, so the only code that needs to be ported is on the visuals/UI side. In order to be cross-platform I was looking into either Unity or OpenFrameworks to rebuild the UI, but it looks like OpenFrameworks would be the most logical choice to transition to since ofxPd has been a supported addon for quite a while (I have not had a chance to try libpd with Unity, but that ecosystem is a bit foreign to me), and there is also the ofxGuido addon for MusicXML score rendering (as far as I know there isn’t any library I can use for this on the Unity side).

The only things I am unclear of at the moment are how to go about rebuilding our UIKit frontend with OF, as well as implementing Android and iOS specific tasks such as in-app-purchases, subscriptions, etc. The frontend in UIKit is mostly stock iOS stuff, consisting of UITableViewControllers within a UINavigation controller for the menu system. I did a quick search into implementing IAPs in OF and I found one addon someone was working on for the iOS app store, but I could not find anything for the Android side.

tl;dr — I’m looking to port an iOS app into OpenFrameworks, but I’m unsure of how to setup the frontend or In-App-Purchases. Would OpenFrameworks be a feasible choice for creating a cross-platform version of this particular app?

Thanks!

Hello.

I recently posted the In-App-Purchase code I am using for Android.

The java code is based on the Trivial Drive example by Google and the exmpale
contains the calls from c++ to java and vice versa, in order to execute the purchases.

You might want to write your own implementation based on this code, if you decide to go with OF.
It is not yet packaged in a plugin, I squeezed everything into the main activity in Android for now.

1 Like

Awesome, thanks so much for sharing your code :slight_smile: I’ll take a look. Would you (or anyone else reading) know which OF addon would be the best for setting up a basic mobile UI?

I did the GUI basically in OF, to simplify portability between iOS and Android.

Maybe if you search the web you will find some more addons, not listed in https://ofxaddons.com.

By the way nice App, I tried it but its hard without having a music instrument :slight_smile:

1 Like

Thanks, I noted down a bunch that seemed like they could be useful.

If you use the “Voice (Bass Clef)” or “Voice (Treble Clef)” as your instrument the scoring is a bit more lenient :wink: Thanks for the kind words!