Refactoring an app written in objective C? - objective-c

I need to refactor an app, written long time ago. As a begginer, I'm struggling a little bit with a bunch of new question.
It was written in objective C.
It has included some frameworks (security, coredata, quartzcore, mapkit...) and application uses tapku library. That's what I know so far.
There is an XmlRpc external there. My question is: If that all is written in 2014. from some random guy, do I need to change/upgrade all of this frameworks/external etc. and find a newer version of it on the internet, or I can use it as they are?
Edit: I'm rewriting the whole project, I need to fix things that are not working, (I didn't find any still, though) and I'm just asking if I would have benefits (speed of application, user experience etc.) if I include a newer version of all of these frameworks, if that is possible.

Related

Building Air Apps (Desktop) with Haxe - Steps

I'm a developer in ActionScript and while I'm watching Haxe as a language to be used by me, since besides the resemblance ActionScript, still be possible to make applications with output to flash yet.
However I have a question about building AIR packages. When I search about building AIR applications with Haxe, the search does not bring satisfactory results.
I ask, after the codification and development of the code (in Haxe), how is it possible to transform what was built into an AIR package?
Thank you!
It isn't a very popular topic it seems. Anyhow, as far as I remember my experience building it some years ago, what you need would be:
If you need some air-specific APIs then you should write externs for them. There is this existing project, but it would need a bit of update as it was written for flash9, however, I believe it is doable in like 1 hour of work.
Compile to flash.
Write all the manifests you need for Air. (Sorry, don't remember what exactly it needs.)
Use this guides to package(also test and sign) your apps.
Note: If you want to go the same way you did before, you could compile haxe to as3 and be happy. However, I wouldn't recommend this method due to loosing speed and probable implications which may arrive.

ASIHTTP equivalent for OSX

Im looking to upload xml files to a php server that range from 1mb to 50mb. As far as I can tell ASIHTTP was the code to use back in the day but Im looking for a newer framework to work with.
The ASIHTTP website recommended AFNetworking, but I was wondering if there were any other good ones out there I should look into. Im VERY new to cocoa programming and have started off learning with ARC enable so something compatible with that would be ideal also.
https://github.com/AFNetworking/AFNetworking/
Right now AFNetworking is the best choice. I've used it and it's pretty good. I recommend it!
If you're looking at recommendations that are a few years old suggesting you use a third party library, you might consider taking a second look at what the OS itself provides. NSURLConnection still isn't the best solution for everyone, but it's improved much over the last few iOS & OS X releases.

porting from ios to windows

I'm about to write code for Windows that has somewhat similar functionality to the one existing in already written application for iPhone. I'm thinking of separating common functionality to form a component and compile it to both to iPhone and to Windows. This code is written in Objective C and uses RestKit and Core Data (and probably sqlite). Is compiling it for Windows a viable task? As I understand it GCC could compile Objective C on Windows but I'm unsure about the RestKit and Core Data api availability on Windows. I have seen two names that could be of use: GNUStep and Cocotron but I don't know if they will play well together with RestKit.
Note: I have no idea about iOS development so I might be confusing things. Any help is appreciated.
You will not easily be able to share this functionality between your applications. CoreData uses a custom opaque (not documented) format for the sql store. You would be hard pressed to reverse engineer this.
You will probably save a lot of time by rewriting that part for windows, rather than trying to get it working. There really isn't much iOS code that can be reused under windows, unless you have written pure C or C++.

How to encrypt or obfuscate objective c code? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
iPhone/iPad App Code Obfuscation - Is it Possible? Worth it?
I have spent a lot of time on this and I couldn't able to find a perfect answer. That's why I decided to put my question here. I have an iPhone application and want to encrypt the code to prevent from class-dump or otool utilities. (Tools used to dump out the headers from executable). I would like to know is there any way to encrypt the source code or obfuscate the source code?
It's a lot more complicated than it might seem initially. Any tool that mangles method names has the potential to fudge up:
KVC compliance
The use of dynamically generated selectors
Nib file compatibility
Protocol conformance
Method inheritance
Obfuscation is just another layer to deal with; often obfuscation is easily reversed. It is not really possible to “encrypt” your classes because the Objective-C runtime and Cocoa framework won't know how to decrypt it. Anyone determined enough will eventually figure out how your program works.
Actually you can provide some obfuscation and tamper protection with specialist 3rd party tools. There are 2 companies, I know of, that provide tools or services to do this : Arxan and irDato.
Neither are cheap or accessible to small developers but if you are developing for a large corporation then you should consider them.
Obfuscation is done by mangling code paths and adding redundant instructions so as to confuse anybody trying to reverse engineer the code. Tamper protection is done by adding checksums to the code and embedding checksum checks within functions. You can create a network of interdependent checksums that makes it extremely difficult to bypass them. There are a few other things that can be done but you really need to talk to specialists in this area.
Further to the earlier answer, Apple does not encrypt the binaries but just signs them. It is fairly easy to reverse engineer and modify app binaries on a jailbroken device.
Apparently, according to this answer Apple encrypts iPhone binaries as a matter of course for all iPhone apps.
I'd stop worrying about it.

Obfuscate Objective-C code for a reusable iOS package [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Objective-C Code Obfuscation
I am trying to put together an iOS package that can be reused in multiple apps. I would like to be able to bundle it up for others to easily plug in and use, and I would like to obfuscate the code so that no one can read it.
What would you recommend between building a framework, a static library, or another solution to accomplish this and why?
If you're distributing for iOS, you have two options:
Distribute a precompiled binary and headers
Distribute the source
Since you're asking about hiding stuff, I don't think #2 is what you're looking for.
As for #1, the best you can do is just not tell 3rd party users about more stuff. They'll still be able to use the runtime to find methods and properties and instance variables, etc. If you're doing everything in C-land (ie, no Objective-C classes), then they can still use things like otool to dump symbols.
In short:
It's probably not worth trying to "obfuscate" your code. Just tell them about the stuff they need to know about, then give them a .a file and the headers they need.
A framework is the standard Cocoa approach to shared code. You can distribute a framework as a compiled code library and a collection of public headers without making any of the underlying Objective-C soure code visible. Of course, a dedicated hacker could still read the machine code, but this would be a big undertaking, and probably not worth the time they would have to spend on it.
If you are really concerned about sensitive code, you could consider an internet-based service, in which your library calls out to a remote server under your control to perform some business logic. This approach is quite a bit more involved, and does not offer as much flexibility for your customers.