iPhone apps use Windows exes?

For everything that's not in any way related to PureBasic. General chat etc...
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

iPhone apps use Windows exes?

Post 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
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Thorium
Addict
Addict
Posts: 1308
Joined: Sat Aug 15, 2009 6:59 pm

Re: iPhone apps use Windows exes?

Post 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.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: iPhone apps use Windows exes?

Post 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Thorium
Addict
Addict
Posts: 1308
Joined: Sat Aug 15, 2009 6:59 pm

Re: iPhone apps use Windows exes?

Post 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.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: iPhone apps use Windows exes?

Post by PB »

Not sure it's random though, because there were lots (about 12) such DLLs in the app.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: iPhone apps use Windows exes?

Post 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?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Thorium
Addict
Addict
Posts: 1308
Joined: Sat Aug 15, 2009 6:59 pm

Re: iPhone apps use Windows exes?

Post 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.
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Re: iPhone apps use Windows exes?

Post 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
Et cetera is my worst enemy
Post Reply