Using JUCE ::paint on iOS - ios

I have some code using JUCE which renders graphics in an overridden :paint(Graphics& g) function.
How can I integrate this on iOS so that it draws on screen?
Can it be connected to a GLKitView? Is that even needed?

You don't need to do anything extra, it'll paint just fine on iOS.
The whole point of JUCE is so that you can write your code once and have it run cross-platform. That said, if you really need to do something native then you can use functions like getWindowHandle() to get down into those kind of details.
For iOS, getWindowHandle() appears to return a UIView*. This will change for other platforms.

Related

Is it possible to use AVFoundation to take a picture using PCL project

I'm fairly new to Xamarin, and I was handed a PCL project and asked to add the option to take a picture "within" the application (not by simply calling the camera app). For iOS, it seems the only way to do this is using the AVFoundation library. However, when I went to look into the issue, it seems that they're relying on using UIKit and UIView controls to accomplish their tasks. Is there anyway I can implement this into my PCL project? Maybe by using a DependencyService? I'm at a loss here.
I was able to figure this out by using a CustomPageRenderer in the iOS portion of the app. I borrowed a lot of code from here.

json2view like solution for iOS

For Android I see there is a very good solution Json2View:
https://github.com/Avocarrot/json2view
for creating Android app UI on the fly. Is there any similar solution available for iOS? Is there any constraint is having JSON based UI concept for iOS, the way json2view does for Android? Or best would be some common open source library that has flavor for both Android and iOS.
Using React Native you can accomplish the same.
Strictly speaking, its not Json to View but its JavaScript to View.
Whatever views you create in ReactJS, will be created using native UIKit Framework.
For example, if you use scrollview component in JS, it will use a scrollview subclassed of UIScrollView.
Please check this link for in-depth overview
https://facebook.github.io/react-native/
https://github.com/facebook/react-native/issues/823
You cannot do anything like this, you will get apple rejected because of using any kind of code injection.

Creating an iOS library or framework using libgdx (roboVM)

Is it possible to create an iOS library or framework using libgdx (RoboVM) that can be imported into Xcode?
Background:
One of my colleagues has created a 3D visualisation app as a libgdx project for android and windows desktop. It can be compiled to run on iOS using RoboVM. However, I would like to wrap extra native user interface elements around it using Xcode. I know its possible to build the user interface programmatically via RoboVM but I would be keen to investigate if its possible to bring the existing work into Xcode. I don't need to edit the 3D visualisation component but add extra GUI elements around the 3D Vis window. I thought compiling the libgdx (RoboVM) code to a framework or library might be a solution that could be imported?!
Yes you can do it.
All you need to create a method, say initRoboVM(), This will be called by your code when you want to initialize libgdx. You'll need to pass the app path in, which you can hardcode when you're testing.
initRoboVM() will need some modifications, namely it should not call your Java app's main method, well, at least, that's what well behaving libraries should not do IMO. It should also not call rvmShutdown.
You can get further information from here
Thanks :)
I asked the RoboVM team directly. Their answer: It's not a native function, but it certainly can be done.
The complete message...
Hi,
Sorry for the late reply. This use case is not something we're going
to do now. It is possible though if you're prepared to do some
patching of RoboVM. Search the RoboVM Google Group and you should find
others who have managed to get this working.
We get this request every know and then so we will add support for
this eventually.
Regards, Niklas

Watching memory usage in MonoTouch App

How can I find out how much memory my App is using from inside the app itself, using MonoTouch?
I basically want this:
Watching memory usage in iOS
which calls things like "task_info"
but for MonoTouch (it's OK if works only on iOS). I don't want a memory tool, like Instruments, etc, I just want to know the memory used from inside the App itself, so I can display it and be able to check it isn't too much in various field trials, etc.
I see at least two options:
Copy the "task_info" code into a new Xcode project and create a static library out of it. Then you link with that static library in your MonoTouch project, and use a P/Invoke to call logMemUsage.
Translate all the "task_info" code into C# (using P/Invokes to call native methods whenever required).
I would likely go for the first option, I believe it's somewhat less error prone.

G'MIC library for iOS

Does the G'MIC (Grey's Magic Image Converter) library work on iOS ?
what steps i should take in order to begin adapting it?
this is library link http://gmic.sourceforge.net/gimp.shtml
So long as it's written in C++, it should have no problem running on an iOS device. You could even write a thin ObjC++ wrapper for it to make your life a bit easier, but in it's current form, it should work smashingly.

Resources