Virtualization of iOS - ios

I am interested in analyzing the network traffic utilized by an app I found on the app store. I could just use wireshark to analyze the traffic on the network, but that would be too easy.
Instead, I would rather run the app on a virtualized instance of iOS.
Is it possible to run iOS in a virtual machine on OS X?
My initial search shows that this may be difficult because a lot of virtualization software is designed for the x86 architecture, and iOS runs on ARM architecture.
Has anybody gotten this to work before?

As you said, you cannot run regular Appstore apps on Simulator.
Instead, use jailbroken iDevice, install from Cydia tools like tcpdump, sslKillSwitch to monitor phone device traffic.
Other tricks you can find on IOS app analysis website
Good luck!

It is not possible to install iOS on VirtualBox because iOS is only for ARM-based processors, and VirtualBox does not support hardware emulation of the ARM architecture. Unlike Android, iOS isn't open source so you can't recompile it for x86 processors. Plus, you'd need to write a custom boot loader for iOS somehow.
A company called Corellium is claiming to be the first business to offer a virtualized iOS device experience to developers and testers. The company is defining this as the "future of mobile development" which will give developers instant access to run their creations on virtualized iPhones and iPads on a Mac or PC which are running actual real versions of iOS.

Related

Does Intel Mac can programing material M1 apps?

First of all, I know that it is better to buy new electronic devices than old ones.
My intention is to learn to program, including but not limited to programming iOS apps, iPad apps, and MacOS programs.
Currently, I'm deciding between a used, old Intel Mac device (because it's cheaper [?]) and an M1 device to choose between.
I don't have development needs such as games, so the GPU may not be important[?] .
I learn from online search engines that Intel Mac compiled iOS programs require Rosetta Translation on M1 devices? Even the universal binaries need Rosetta Translation?
Frontier developers basically have M1 as a development and testing device, and I didn't search for questions about it.
Ultimately, the only question is, M1 devices run mobile app natively, so does this mobile app have to be compiled by M1 devices?
Of course, I know there is a lot of software out there that may not all be adapted to the arm architecture, but I still want my compiled mobile apps to run on the M1 device without Rosetta Translation.

How do mobile apps developed on Desktops work?

Most if not all smart phones uses an ARM processor. However, I believe that mobile apps are developed on Desktops, laptops which all run x86. So for example, how does an ios app or an Android App, which run on ARM based processor, work when it written on x86 based Mac work?
On iOS, the simulator runs x86/x86-64 builds of the code to be tested (exclusively 64-bit builds these days).
It's worth pointing out some significant architectural differences in approach between Android and iOS when it comes to simulators. The iOS Darwin kernel is ABI and API compatible with that in MacOS, and the simulator app simply runs the iOS 'shell' including springboard, and a full set of user-space libraries on top of the host operating system.
Android simulators are run in virtual machines, optionally with instruction set emulation.
There are types of development where neither approach is idea. Any code relying on low-level optimisations needs to be tested on a device.
Emulators.
And/or x86 Android in a VM, because most Android programs are portable at a source level between x86 Android and ARM / AArch64 Android. (But that's still just a more-efficient emulation, not running Android applications directly under the x86 Linux kernel on your desktop).
I assume it's also pretty easy to compile on a desktop and run on a real phone if you set up your networking correctly, possibly after jailbreaking the phone to let it run apps without having to reinstall through the app store. IDK the details.

Does apple allow to use tcpdump for use in iPhone app

I'm planning to use tcpdump for development of an iPhone app.
But i'm not sure will Apple allow it or not with iOS 8.0 onwards to be used in iPhone app development.
Please provide your comments on this
Thanks
You won't be able to open a BPF device on iOS - by default, XNU creates BPF devices with permissions rw-------, owned by root, so even if a process running in a sandbox (which all non-Apple iOS applications - and probably most Apple iOS applications - on a non-jailbroken iOS machine are) is allowed to open files in /dev, your program won't be able to capture network traffic.
I also think sandboxed applications may not be allowed to fork and exec or posix_spawn() arbitrary programs, so your application probably wouldn't be able to run tcpdump as a program - assuming it's even shipped with iOS, which it might not be.
You might be able to incorporate tcpdump code in your application, but without being able to capture traffic, all it will be able to do is to read existing captures, and that's probably easier to do on your Mac.
So this is probably a project of interest only on a jailbroken machine.

Possible to Run iOS Apps on PC

Is it possible to run iOS Apps DIRECTLY on Mac OS? What about Windows? Or do you always have to use a virtual machine? I searched around and all I found was people saying you need to use a virtual machine. Reason for this: I want to automate behavior on an app on my iphone, and I think that will be much faster on my PC.
The iOS SDK accesses the hardware of the iPhone/iPad. It's very specific hardware which is not available on any other device.
The CPU is different, the display, device buttons, sensors and phone specific stuff...
The simulator simulates all this hardware, still it needs a different compile and can not execute the iOS bundle as it does not simulate the Arm CPU architecture.
That said, it does not make much sense to do automated test on another platform than the target platform, as the app might have slightly different errors and behavior.

Reg. iOs mobile app developement hardware requirements using Delphi XE7

I'm using Delphi XE7 for developing mobile application. And some how, I have learnt how to create and test the Android mobile application using Delphi XE7 and for developing and testing Android application, just one Android mobile is enough. And I need to know the hardware requirements for developing and testing iOs mobile applications. And currently I'm having Windows 64 bit Os. Is it possible to develop and test, if I'm having Mac Os which is Virtual Os and iPhone device in my hand. And in the Virtual OS, I need to install Xcode and the required packages. Please confirm me once should I need compulsory MAC book for developing iOs mobile application using Delphi XE7.?
Please provide me the solution.
In addition to your development PC, you need the following to develop multi-device applications for iOS:
A Mac running OS X
An iOS device, connected to your Mac by USB cable
http://docwiki.embarcadero.com/RADStudio/XE7/en/IOS_Mobile_Application_Development
The Mac OS X is bound to the Apple hardware. The only way to make OS X run in a virtual machine is to hack it. There are several solutions available e.g. here and here.
I am however sure that you will end up being frustrated about spending too much time on tweaking Delphi and the hacked OS X - even with Apple hardware there can be plenty of frustrations! For example there are updates to Xcode all the time and some of them breaks things. If you also have to tweak OS X every time you need to update, you would wish you bought the hardware.
I can recommend buying a Mac Mini ($499), it is the cheapest way to get a Mac. To minimize cost, you can simply connect it to the same monitor as your windows computer and just switch input on the monitor when you are working on the Mac. I have done that and it works very well.

Resources