Page 1 of 1

iPhone apps use Windows exes?

Posted: Sat Sep 28, 2013 11:44 am
by PB
I just put a file called "System.dll" from an iPhone ".ipa" package into
a hex editor and was shocked to see the standard "MZ" file header,
plus the "This program cannot be run in DOS mode" message. :shock:
What's that all about? Apple using Windows executables internally?

Image

Re: iPhone apps use Windows exes?

Posted: Sat Sep 28, 2013 12:27 pm
by Thorium
No they are not using it.
What you posted is in fact a portable executable. This is the Windows NT executable format. However it's not used on the iPhone. I dont know from which package you extracted it but it could be some garbage that was been included. Maybe from a development tool that was been used by the package creator on windows.

Another explanation would be if the app is just a wrapper for a x86 emulator that runs a windows executable. But thats unlikey. This is done for a lot of retro games but i dont know a windows app it's used for.

Re: iPhone apps use Windows exes?

Posted: Sat Sep 28, 2013 1:30 pm
by PB
> I dont know from which package you extracted it

It's an iPhone tennis game (see the path in the screenshot).

Anyway, I just thought it's weird to see a Windows NT exe
format file inside an Apple product. As far as I can tell, you
can't write iPhone apps on a Windows PC at all (ie. Apple's
dev license doesn't allow or even support it), so it's strange.

Re: iPhone apps use Windows exes?

Posted: Sat Sep 28, 2013 1:43 pm
by Thorium
PB wrote: Anyway, I just thought it's weird to see a Windows NT exe
format file inside an Apple product. As far as I can tell, you
can't write iPhone apps on a Windows PC at all (ie. Apple's
dev license doesn't allow or even support it), so it's strange.
It is weird. You can develop on Windows but you need to compile on MacOS because the SDK is MacOS only.

There are other examples of random files ending up in program archives. In some games you find Thumbs.db files or Desktop.ini or other random files from the development computers. It happens.

Re: iPhone apps use Windows exes?

Posted: Sat Sep 28, 2013 1:57 pm
by PB
Not sure it's random though, because there were lots (about 12) such DLLs in the app.

Re: iPhone apps use Windows exes?

Posted: Sat Sep 28, 2013 3:45 pm
by IdeasVacuum
....Does that mean that Apple's app checking is not as good as they would have us believe?
Or could it be that the app is delivered with the files necessary to run on both OS?

Re: iPhone apps use Windows exes?

Posted: Sat Sep 28, 2013 7:20 pm
by Thorium
IdeasVacuum wrote:....Does that mean that Apple's app checking is not as good as they would have us believe?
You can pretty much include what files you want in your package. There are no restrictions on that.

Re: iPhone apps use Windows exes?

Posted: Sat Sep 28, 2013 11:31 pm
by chi
To shed some light...

Hit Tennis 3 was made in Unity, therefore it is a managed .net dll. So it´s just a C# script compiled to a dll which you can use on any supported Unity platform (Win, Mac, Linux, IOS, Android, XBox360, Playstation3, Wii, ...)
Wanna take a closer look? Download dotPeek (http://www.jetbrains.com/decompiler/), drop the dll and see the decompiled code (if not obfuscated) ;)

cheers, chi