Macos Run Ios Simulator

  1. Ipad Emulator For Mac
  2. Macos Run Ios Simulator Free
  3. Ios Emulator
  4. Macos Run Ios Simulator Full

Besides the method in my last blog, I keep trying other methods to run the decrypted iOS App. Then I thought of the Xcode Simulator, which had no possibility to run the real iOS Apps before, due to the x86_64 platform restriction. But now, the Simulator from M1 Mac is also the arm64 architecture. Is it possible to run the decrypted iOS App in the simulator now ?

Test Your App on macOS. Xcode supports debugging, testing, and profiling your iOS app natively on Macs with Apple silicon. When you open your iOS project in Xcode 12 or later, you have the option to build your app and run it directly on macOS. This option doesn’t run your app in a Simulator; it runs it as an iOS App for Mac. From the XCode menu, select Open Developer Tool Simulator. In the dock, control (or right) click on the Simulator icon. Select Options Show in Finder. While holding down Command and Option, drag the Simulator icon to the applications directory. This creates an alias to it.

Mar 06, 2016 OS X: launcher for iOS Simulator and bypassing Xcode Starting iOS Simulator in macOS using an Automator Application On OS X, the best way to almost natively test apps or websites is by using the so called “ iOS Simulator ” (now named simply “Simulator”) which is available as part of the installed Xcode Development Tools. OnWorks Website provides multiples Opeative systems to start up for free. You only need to choose one of them and click the button 'Run online'. You will have to wait a few seconds for us to be assigned a workstation with the chosen OS. It is a free emulation platform that.

Of course, Yes Now !!!

I wrote a tool to patch a macho file from iOS platform to Simulator platform.

Next I will talk about how to find the patch points.

Drag the decrypted iOS App into the iOS Simulator, and click to launch.

I got the crash :

Tetris 99 pc download. Note the Termination Reason: Binary with wrong platform.

Question: How does the OS distinguish the arm64 machos from different platforms ?

I found the answer from the dyld source code

Emulator

We can see there are at least 2 kinds of load commands that can be used to mark platform:

  • LC_BUILD_VERSION

  • LC_VERSION_MIN_XXX

Run

From my test, it seems that the load command LC_ENCRYPTION_INFO[_64] is also marked as PLATFORM_IOS. So I have to patch 3 kinds of load commands to mark the macho as PLATFORM_IOSSIMULATOR:

  • Remove the load command LC_ENCRYPTION_INFO[_64]
  • Remove the load command LC_VERSION_MIN_XXX
  • Patch the platform to 7 (PLATFORM_IOSSIMULATOR) in the command LC_BUILD_VERSION

From my test, I can directly launch the iOS App from the Simulator after the patch, if SIP is disabled. And I have to re-sign it with ad-hoc (free developer) if SIP is enabled.

Ipad Emulator For Mac

Macos Run Ios Simulator

Through the effort before, I can launch the iOS App from Xcode Simulator successfully.

Macos Run Ios Simulator Free

Macos Run Ios Simulator

But there are some known issues for some specific Apps:

  • Some iOS App Extensions process crash
  • Crash due to lack of sandbox entitlements
  • Maybe other issues for specific App

I have tried to patch to PLATFORM_MACOS directly:

Ios Emulator

  • There is no problem for iOS command line program, and it is useful when you need to run iOS command line program on the M1 Mac.
  • For iOS UI Application, we need to use environment variable DYLD_FORCE_PLATFORM=2 to help us load UIKit.framework from /System/iOSSupport directory.

Next are the test results for arm64 macho loading :

Ios

Macos Run Ios Simulator Full

  • Arm64 executable process can load arm64e dylib directly.

  • Arm64e executable process cannot load arm64 dylib.

    Patch cpu subtype to 0x80000002 can bypass the platform check to load it successfully.

  • macOS process cannot load iOS platform dylib, error: mach-o, but not built for platform macOS

    Just patch the load_command 0x25=LC_VERSION_MIN_IPHONEOS to 0x24=LC_VERSION_MIN_MACOSX