Reality of using Juce for cross-platform app development

Hi all

Been learning Juce and hacking away at an app for a few months now. I came to Juce initially for portability. However, I hit a couple of snags, one of which was integrating an Objective C library I want to use into Juce. I also had issues building the app for Android with Ant. (didnt try for iOS yet, building Android first). 

After looking at a couple of other cross platform development options, I've now started rewriting the app in Java (!) using the Android API, using Android Studio when I need it. I have to say, I feel like I've got further in a week than I had in months trying to write it in Juce, but that is also because C++ translates fairly easily to Java,  and I had the core code already written. I would say the UI side of things is much nicer to work with this way, I can test it on my device easily and there are tons of examples around so feels like the process is smoother,  even if Java is not my favourite language. 

I wonder if it would make sense to write core classes with Juce and then plug them into the JNI on Android side, so I can reuse the core classes and logic on different platforms? This approach makes more sense to me. I'm looking to create for iOS, Android, and OSX/Windows VST plugins with the same core code. 

Anyone with experience trying to do something similar?  Any examples around? 



I had no problems bulding on iOS and Android, though I did stick to C++ libraries where needed. On Android I simply wrote a .BAT script.

Found what looks like a good example of plugging C++ classes into iOS and Android here

I hope I'm not coming across as dismissive of Juce at all - I just ran into some issues, partly to do with my lack of experience with C++, DSP, and Obj-C C++ intergration. 

One of them was to do with pitch detection not working as expected. After weeks of looking at DSP code to try and see what the problem was, I tried the Tarsos DSP library on Android and it worked as expected first time. The other difference was I was running the Juce project on my Macbook, vs the Android example only on the device. It may be to do with how I'm buffering the audio in Juce (?). The other was hooking into a database library (Couchbase-Lite) - they offer Objective-C and Java libraries, and I got stuck trying to integrate the Obj-C with my C++ classes. 

Granted I could have carried on figuring stuff out - but since starting to work on the UI via the Android Java libraries, I've been able to get things moving much quicker than I had been previously. There is the added bonus that I can easily use native UI elements and gestures. 

I'm going to try and pull out my core classes (still using Juce for Strings + ValueTree goodness) and integrate them with the JNI so I can reuse them for iOS/Windows when the time comes.