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.
Related
I need to insert native code in my Codename One app. I am a completely newbie in iOS programming so I need to learn Objective-C. However I read that Swift was the successor of Objective-C and I would feel more comfortable with Swift syntax. But I don't know if Swift is supported in Codename One. While looking at iOS source code generated by Codename One, although I am not 100% sure, it looks like C code (I may be wrong).
On his blog Shannah (from Codename One) wrote that
Codename One currently compiles everything down to plain old C code so we would be largely unaffected by such a change – although there would be some native portions that use Objective-C that would need updating. Luckily, if you’re a Codename One user, you don’t need to concern yourself with these details because you are working in Java.
I don't get it clear that's why I am asking whether it is possible to use Swift code in Codename One native code ?
Thanks a lot for helping me clarifying this topic!
Cheers
Yes and no. You can probably compile Swift code to a static library today (.a file) and just use that like any static lib where the Objective-C code just acts as a bridge.
Using Swift directly is problematic due to several factors:
Currently we are still using an older version of xcode when building, we made an attempt at migrating to the latest but had a setback. We'll migrate hopefully before 3.5 comes out, if not then shortly after.
Swift requires a relatively new version of xcode so until we do that embedding Swift code will be problematic.
Swift assumes ARC. This is something we tried to integrate with the GC but at this time it doesn't really work well.
We need to generate Swift stubs as an option, this is problematic as say you have existing cn1lib or native interface that relies on Objective-C it might create a conflict.
But lets back track a bit. Swift is a huge advantage over Objective-C which is pretty old by now. But it doesn't have any major advantages for Codename One developers...
It isn't faster as Codename One translates to C which is faster than both Swift and Objective-C
It won't make the code much cleaner, if you have a lot of code in your native interfaces then you are doing something wrong. Most of your code is in Java anyway, you can debate the merits of Java vs. Swift but if you are using Codename One then you pretty much picked Java.
If you need to use an app written in Swift you can package it as a static library.
So there is really no real use case for Swift in Codename One at this time.
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.
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
I am developing an image processing application in Centos with OpenCV using C/C++ coding. My intension is to have a single development platform for Linux and IOS (IPAD).
So if I start the development in a Linux environment with OpenCV installed ( in C/CPP ),Can I use the same code in IOS without going for Objective-C? I don't want to put dual effort for IOS and Linux, so how to achieve this?
It looks like it's possible. Compiling and running C/C++ on iOS is no problem, but you'll need some Objective-C for the UI. When you pay some attention to the layering/abstraction of your modules, you should be able to share most/all core code between the platforms.
See my detailed answer to this question:
iOS:Retrieve rectangle shaped image from the background image
Basically you can keep most of your CPP code portable between platforms if you keep your user interface code separate. On iOS all of the UI should be pure objective-C, while your openCV image processing can be pure C++ (which would be exactly the same on linux). On iOS you would make a thin ObjC++ wrapper class that mediates between Objective-C side and the C++ side. All it really does is translate image formats between them and send data in and out of C++ for processing.
I have a couple of simple examples on github you might want to take a look at: OpenCVSquares and OpenCVStitch. These are based on C++ samples distributed with openCV - you should compare the C++ in those projects with the original samples to see how much altering was required (hint: not much).
I'm trying to write an IDE for the iOS and I stumbled on a problem. I of course wanted to be able to do syntax highlighting, but I have no idea how I have to get this to work.
I have been googling over a month now, but I haven't found anything useful. Most libraries are C++. That I find no problem, I know enough of C++, but they all use the Boost libraries and I heavily doubt if it's easy to install them on a jailbroken iOS device, or even compile them for the iOS on the Mac.
So I come here for help. What should I do? Should I use a PHP syntax highlighter, which always colors the whole document? Should I write a syntax highlighter my self, that doesn't use the Boost library? Or does somebody here know another library, which can be used on the iOS?
Thank you in advance,
ief2
i have a simillar problem about syntax highlighting, but i prefer to solved it using UIWebview than using core text, because that is a different pixel in rendering text in core text and UITextview (in my problem i was using a core text view that cover by uitextview), and then i try to solved using uiwebview, even i'm still on developing but i can say that it is better using uiwebview than core text, maybe you can take a look at this link http://alexgorbatchev.com/SyntaxHighlighter/ it is an open source code, but it develop using javascript.
Most Boost libraries are header-only. There are only a few Boost libraries, like those for threading and asynchronous I/O, that use a compiled library. If you've found some solutions that would work fine aside from your worries about using Boost, then I would look at them again, as they'll likely work. Even if you must use a Boost library that is not header-only, you can always build it as a static library and link that into your application, so that in the end the only thing that needs to be installed is just your app bundle.
I know this is old, but in case anybody is looking for a complete syntax highlighter for iOS, there's two options:
Highlightr: A Swift library for syntax highlighting, supports hundreds of languages but uses JS as backend. It's fast enough for live editing, though. (Disclaimer: I am the creator of this library).
SyntaxKit: A native solution on early stages of development. Should support any TextMate syntax in the future.