Using Perl code in iOS/ObjectiveC - ios

How can I incorporate perl code into an native iOS/Objective application? Could you provide a sample?

The basics of calling Perl code from C is described in the perldoc perlembed. It's pretty straightforward to link a C program to the Perl interpreter and give it code to execute. However, I haven't been able to find an iOS build of Perl, which may mean you have to build it yourself.
Unfortunately, I don't have access to an iOS development environment so I can't give you any actual code.

You'll need to jailbreak your device to install perl:
http://blog.thireus.com/how-to-install-ios-perl-framework-on-iphone-ipod-touch-or-ipad
You'll still need to follow the perl embedding guide (as Chris Reuter) said.

Related

Should we obfuscate the Dart code in Flutter apps?

The question is related to this one: How to check obfuscation results of flutter app?
But the answer there is unclear.
Is it possible for hackers to see the dart code in flutter apps? Or is it compiled in a way that is difficult to understand and track?
After unzipping the apk that resulted from flutter build apk - the only file I found related to my own Dart code was "libflutter.so". Looking at the functions in it by nm -D libflutter.so didn't show anything resembling my code, so it seems pretty safe. But - I would like someone who actually knows to confirm, perhaps I missed something.
What is the best practice used to publish flutter apps?
UPDATE - December 2019 - the following post says that if the app is compiled in release mode, then the dart code is compiled to assembly, which is pretty hard to reverse engineer: https://medium.com/#rondalal54/reverse-engineering-flutter-apps-5d620bb105c0
In debug mode flutter apps are jitted from source. This requires the source be distributed with the app. However you shouldn't be distributing a debug build, so let's not worry about that possibility.
In release mode your source is AoT compiled, so there is no actual copy of your source, but if someone wanted to recreate it, they could potentially (easily?) reverse engineer it from assembly.
If you want to obfuscate your compiled code, your best bet is probably to follow the advice given here:
https://github.com/flutter/flutter/wiki/Obfuscating-Dart-Code
I don't claim to be an expert on this so please do your own research, but hopefully this points you in the right direction.
Further reading about the build process:
https://proandroiddev.com/flutters-compilation-patterns-24e139d14177

How to apply IBM CPLEX to my iOS projects?

I am new to iOS development!
And I'm working on a project that deals with shift scheduling problems.
I was reading online paper and they mentioned that they used CPLEX to solve their linear programming problems.
So I'm wondering if there's anything that I have to know to run my scheduling constraints on CPLEX but get the results on Swift codes (XCode)?
what you could try also is to use CPLEX in the cloud which would be called from IOS.
You can find an example at https://developer.ibm.com/docloud/blog/2016/03/17/docloud-and-bluemix-demo/
You can try that example on your smartphone and then have a look at how to.
regards
CPLEX offers some libraries written in C, C++.
Xcode allow the use of this kind of librairies so I think you'll be able to work with inside your Swift project.
Hope this helps !

How to obfuscate iOS binary.

Hi, I'm just wondering how you could obfuscate functions in iOS binary?
If you tried to reverse iOS binaries using tools like ida you will see part of the binaries have obfuscated functions like all or partly named sub_xxxxxxxx but the other have human readable functions
Someone said, add those lines to the top of your header without any further explaining:
#define SecurityClass ah7p
#define checkCopyProtection xcyc
What the methods used to secure your App?
Sorry for the dumb question, but I'm new there and I ended up with no answer explained what I need.
There are a couple of ways to obfuscate an iOS binary.
Open Source compiler named llvm-obfuscate (https://github.com/obfuscator-llvm/obfuscator/wiki) It has some nice features to obfuscate during compilation. You are replacing your default compiler with that one.
There are for Windows of course VMWare oder Themdia that can post process but that is not the case.
Besides that I just know one more which is Liasoft antispy. It is a very advanced anti analysis toolkit that allows you to encrypt functions and much more during compilation using mixed Objective-C and C++ code. ( https://www.liasoft.de/en/products/antispy/ )
Not sure if one of these is the right one for you. Except these things you are pretty lost since Objective-C is a compiled language with lots of metadata.
Hope I could help you, this is my first post.
If you only care about obfuscating method names then the easiest way is to write relevant parts of your application in C or C++. For instance, you can rewrite your SecurityClass as a C++ class instead of Objective-C class. This will not make your code reverse-engineering-proof, but it will at least raise the bar a bit. (NOTE: I'm not saying this is the right thing to do from software engineering point of view, though).
If you need to obfuscate code, then you are in a search for a tool that can do this. There are several such tools, both commercial and free. One project for doing exactly this is obfuscator-llvm.

OCR Tesseract set up only numbers

I am new to programming in general and have recently gotten into App development. I am using tesseract for iOS and I can't seem to figure out how to get it only read numbers.
There is an exact question posted by Alex G Here and I have the same files/problem as him. the answer apparently is
Go to the tessdata\configs\digits file. If you're using the API, then
call SetVariable("tessedit_char_whitelist", "0123456789-."); You use
the SetVariable API if you want to programmatically call Tesseract,
via Objective-C, for instance.
Except I still do not understand how to do this. Where is this command line? I am calling Tesseract from Xcode and not a command line. I also do not contain this tessdata\configs\digits file.
If somebody could please help me I would really appreciate it.
Thanks!
Ted
If you follow the How To: Compile and Use Tesseract (3.01) on iOS (SDK 5) article, you would place the SetVariable statement after the Init call, as follows:
tesseract->Init([dataPath cStringUsingEncoding:NSUTF8StringEncoding], "eng");
tesseract->SetVariable("tessedit_char_whitelist", "0123456789-.");

Weka library for iOS

can you please tell me if there is a weka (machine learning algorithm) for iOS ?
and if yes then provide me with a download link to download it.
iOS Agreement says:
"3.3.2 — An Application may not itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s)."
So you cannot lanch a java interpreter to use WEKA libraries.
BUT... Google released a "Java to iOS Objective C translator" a few days ago. And WEKA is an "Open Source" project. So, maybe, you could try to download WEKA's (java) code and translate it from java to Objective-C in order to run WEKA's algorithms in iOS.
If you get it, please, let me know ;-)
Weka is written in Java. This means the likelihood of it being adapted to iOS is quite small.

Resources