• Stars
    star
    286
  • Rank 144,690 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tools for running iOSMac apps on macOS 10.14 Beta

Update: @biscuitehh released an easier method for enabling/building iOSMac apps: try that method if this tool doesn't work.

List of interesting Marzipan/iOSMac repos:

Tools to build and run iOS UIKit applications on macOS 10.14 Mojave, using the iOSMac framework announced at WWDC.

screenshot of an iOSMac app

Usage instructions:

Initial Setup - Only has to be done once

You will need a Mac running macOS 10.14 Beta, with Xcode 10 Beta installed. (It must be a physical Mac: virtual machines cannot show iOSMac applications, which require GPU acceleration.).

Disable SIP

You need to disable System Integrity Protection on your computer. You can find tutorials online, such as this one.

Note that disabling System Integrity Protection makes your Mac insecure, but is needed for enabling iOSMac support. Please reenable SIP when you're not running iOSMac applications.

Select Xcode

Make sure Xcode Beta is selected as the active Xcode.

sudo xcode-select --switch /Applications/Xcode-beta.app

Download and Install MarzipanTool

First, install MarzipanTool's Swift libraries and the linker wrapper on your computer. Run

git clone https://github.com/zhuowei/MarzipanTool.git
cd MarzipanTool
./installtool.sh

Note that this assumes /usr/local/ is writable. If you have Homebrew installed, it should be writable. If not, run sudo ./installtool.sh instead.

Enabling iOSMac

These steps bypasses macOS's restrictions and allows your own iOSMac applications to run. You need to keep these programs running when you are testing your own iOSMac applications.

First, open Voice Memos to make sure iOS services are started.

After it starts, in one terminal, run

cd MarzipanTool
./uikitsystemenabler.sh

You should see something like this:

computer:MarzipanTool zhuowei$ ./uikitsystemenabler.sh 
(lldb) process attach --name "UIKitSystem"
Process 604 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00007fff67fb50d6 libsystem_kernel.dylib`mach_msg_trap + 10

Open another terminal and run

cd MarzipanTool
sudo ./uikitenabler.sh

You should see something like

computer:MarzipanTool zhuowei$ sudo ./uikitenabler.sh 
dtrace: script 'tracescript.d' matched 1 probe
dtrace: allowing destructive actions

Keep these two terminal windows open.

Porting an application

Apps can be compiled for iOSMac by building a modified Simulator binary using MarzipanTool's linker wrapper.

Unsupported features

iOSMac only supports a subset of UIKit features. Thus, most nontrivial apps will not run without modification. For example, the Kickstarter app can't build due to these missing classes:

  • UIWebView - Used by HockeyApp SDK, Facebook SDK, and some pages in the app
  • SFSafariViewController - used by the app
  • CTTelephonyNetworkInfo - used for analytics
  • SLComposeViewController - used for email share
  • MFMailComposeViewController - used for email share
  • OpenGLES - used by OpenTok for rendering
  • AddressBook - used by Stripe SDK

So if your app uses HockeyApp, Facebook SDK, or Stripe SDK, it will fail to build.

In addition, there are many issues, possibly due to differences between the iOS Simulator and iOSMac's build of UIKit:

  • a UILabel set to center in Storyboard instead aligns to the right (?!).
  • UIScrollViews and UITableViews must have both Scroll Indicators disabled in Storyboard, otherwise the application crashes on launch

Proper iOSMac headers may fix some of these issues.

If you have any advice on shimming/replacing these classes, please update this guide!

Modifying build settings

Bundle ID: Change bundle identifier to "com.apple.stocks". (This is required due to a limitation of my approach for enabling iOSMac. Other approaches such as Hamzasood's bootloader patch allow using any bundle id, but are more difficult to install.)

Enable linker wrapper: Go to your project's configuration, choose Build Settings, select All, then search for Other Linker Flags. Add the line

-fuse-ld=/usr/local/share/marzipantool/ldwrap

This needs to be done for all targets in your project.

A screenshot of the configuration page

Fix Text Rendering: Drag the NSBundle+AppKitCompat.m file from the MarzipanTool repo (if you're using Objective-C) or the NSBundle+AppKitCompat.swift (if Swift) file to your project. Otherwise Storyboard UILabels crash the application.

Build the application

  • Choose iPhone 8 Plus Simulator as the build target device.
  • Product -> Clean Build Folder
  • Product -> Build

Run the application

  • Make sure that the two enabler scripts are still running, and that lldb is not stuck.
  • Open the Products group in Xcode's left side, right click the .app, and select Show in Finder
  • Right click and select Show Package Contents
  • Double click the main executable to launch app.

Issues?

If you encounter any problems, please open an issue.

License

This project is licensed under the MIT License.

More Repositories

1

nft_ptr

C++ `std::unique_ptr` that represents each object as an NFT on the Ethereum blockchain
Rust
1,957
star
2

MCPELauncher

Source code for BlockLauncher, a launcher that patches Minecraft for Android
Java
654
star
3

WDBRemoveThreeAppLimit

Objective-C
510
star
4

MacDirtyCowDemo

Get root on macOS 13.0.1 with CVE-2022-46689 (macOS equivalent of the Dirty Cow bug), using the testcase extracted from Apple's XNU source.
C
366
star
5

VisionOSStereoScreenshots

Take 3D stereoscopic screenshots in the visionOS emulator.
M
340
star
6

Boardwalk

Source code for Boardwalk, a Minecraft Java Edition launcher for Android (not actively developed)
Java
339
star
7

RaspberryJuice

A plugin for Bukkit implementing the Minecraft Pi API
Java
326
star
8

Xenologer

#notglass #untilnow
Shell
264
star
9

DSReality

Swift
249
star
10

marina

Understanding SwiftUI by reimplementing it to render to HTML ⛵ - you shouldn't use this, use https://github.com/swiftwebui/SwiftWebUI instead
Swift
243
star
11

ClubhouseAPI

119
star
12

HvDecompile

Decompiling macOS Hypervisor.framework by hand
Objective-C
113
star
13

hipster.house

HTML
102
star
14

CoreTrustDemo

Proof-of-concept for CVE-2022-26766 on macOS 12.3.1
C
80
star
15

MetalShaderTools

Tools and samples for understanding Apple's Metal shading language and its LLVM Bitcode shader files
LLVM
72
star
16

XNUQEMUScripts

Some scripts I made to patch iOS device trees.
Java
59
star
17

worthdoingbadly.com

My blog where I make a new coding project every Thursday.
HTML
45
star
18

PocketInvEditor

A inventory editor for Minecraft PE on Android
Java
45
star
19

MemojiCatalyst

iOS Memoji editor ported to run on macOS through Catalyst
Objective-C
45
star
20

ryujinx-ios

NOTHING USEFUL HERE; trying to see if Ryujinx's new Apple Silicon port would also runs on iOS
Swift
44
star
21

dsc_extractor_badly

Modifications to Apple's dsc_extractor to fix ObjC selector names. You don't need this.
C++
42
star
22

iOS-run-macOS-executables-tools

Failed experiment for running command line macOS tools on jailbroken iOS. There's nothing useful here.
C
39
star
23

ModPEScripts

A collection of scripts for the ModPE Script Runtime used to modify Minecraft PE
JavaScript
38
star
24

PCICrash

PCIDriverKit proof-of-concept for CVE-2022-26763
Objective-C
38
star
25

MCPELauncher-addons

Addons by myself aka 500 Internal Server Error
C++
29
star
26

GhidraLog4Shell

Java
27
star
27

DisneyPlusMetadataDownloader

pulls metadata from Disney+. Probably useless for you.
Python
25
star
28

MinecraftPEModWiki

Shell
23
star
29

Varodahn

Some code to experiment with Steam In-Home Streaming
Java
21
star
30

LearningIOSurfaceAccelerator

Learning how to use IOSurfaceAccelerator
Swift
21
star
31

SimServerAndroid

Gets SIM card ICCID/runs 3G Authentication over ADB shell
Java
21
star
32

iOSAvatarUITester

Example for using iOS's private frameworks to create Animoji/Memoji in an app
Objective-C
21
star
33

UnleashTheGoogle

DOESN'T WORK ANYMORE: Enables Dogfooding and Team Debug features of Google Search for Android
Java
20
star
34

loljava

Demonstration of the Java System.arraycopy type confusion vulnerability
Java
20
star
35

macOS-Virtualization-framework-tools

Useless tools for exploring Virtualization.framework
Objective-C
20
star
36

WDBDDISSH

DOESN'T WORK YET, PLEASE IGNORE
Shell
17
star
37

NUS-Downloader-WiiU

C#
16
star
38

VirtualizationDemo

demoing Virtualization.framework changes in macOS 12 beta
Swift
16
star
39

SimServeriOS

Runs SIM-AKA Authentication on a jailbroken iPhone for VoLTE/VoWiFi/IMS research. Exposes a http interface compatible with fasferraz/USIM-https-server
Objective-C
16
star
40

PocketInvEditor-app

The free version of PocketInvEditor. Requires the PocketInvEditor library project.
Java
16
star
41

SwitchBrowserUnlock

Unlocking the Nintendo Switch's hidden browser. Set DNS to 104.236.216.051.
15
star
42

TweetbotLoginProxy

JavaScript
15
star
43

libcorkscrew-ndk

Libcorkscrew (a stack trace printer from Android source) modified to build on the Android NDK
C
15
star
44

DecryptAppBadly

A terrible iOS app decryptor for jailbroken devices
Objective-C
14
star
45

MCPELauncher-app

This is the part that actually builds an APK for MCPELauncher
Java
14
star
46

BleachThisCode

Obfuscates C/C++ programs by replacing everything with whitespace and #define's
C++
13
star
47

wiiu-tools

Ambulance!
Python
12
star
48

FakeHVF

Useless learning project: simulates Hypervisor.framework APIs on top of Linux KVM
C
11
star
49

is_like_a

"more than just a simple ebooks bot." - @mralext20
Ruby
11
star
50

myglasscatfacts

An example for using the Google Glass MyGlass API
Java
10
star
51

nexus7-baremetal

Baremetal development for the Nexus 7 2012 (Grouper) and Nexus 6P (Angler)
C
10
star
52

NotifyTooth

A tool to forward notifications to Google Glass from a tethered phone.
Java
10
star
53

actions-on-google-php

Prototyping an AI Chatbot for Google Assistant for Google Home using the Actions on Google API in PHP
PHP
10
star
54

UnixTalkToInstagramProxy

A proxy to allow browsing Instagram with the Unix `talk` command. Inspired by alt text of https://xkcd.com/1810/.
Java
8
star
55

ClickFast

Android app that tricks a user into clicking a button
Java
8
star
56

scanmediaplz

Forces the Android media scanner to run
Java
8
star
57

Piplup

WIP: decompile Playdate Pulp .pdx files back to .json project files
JavaScript
7
star
58

arctic

NO LONGER WORKS THIS IS NOW USELESS DON'T BOTHER DOWNLOADING
Java
7
star
59

nyandroid-daydream

An Android daydream based on the Nyandroid easter egg from Android 4.0
Java
7
star
60

PocketMine-BLScriptEnable

Sends the enable ModPE script command to connected BlockLauncher clients
PHP
7
star
61

HackerTyper

A clone of duiker101's Hacker-Typer
C
7
star
62

MacUptimeChanger

Changes the result of macOS's `uptime` command with a kernel extension
C
6
star
63

fake-arm-macOS-sdk

Obsolete: Xcode 12 Beta's out now. -- Script that modifies Xcode 11’s macOS SDK to build for ARM
Shell
6
star
64

YoutubePlaysEverything

Twitch Plays Everything knockoff for YouTube Gaming
Python
6
star
65

PillAppSwitcher

Android app that demonstrates retrieving recent tasks through adb shell
Java
6
star
66

FFMPEGShortcutsApp

A Siri Shortcut extension that uses FFMPEG to convert an audio file into a .wav
Swift
6
star
67

Xenologer-src-glasshome

GlassHome.apk
6
star
68

vectordrawable

Backported VectorDrawable from Android 5.0 Lollipop to Android 4.1; used in Nyandroid
Java
5
star
69

Chromosphere

A launcher for Corona based games
Java
5
star
70

Colmena

No longer works. Attempt at making a web U( for Hive Social using Mastodon's web UI as a base.
HTML
5
star
71

Flappy2048

Flappy bird and 2048 at the same time
JavaScript
4
star
72

FancyTwitterNames

JavaScript
4
star
73

CompRemote-server

The server for CompRemote lite
Java
4
star
74

design

Zhuowei Zhang's design portfolio
CSS
4
star
75

MinecraftClassicDeobfuscate

Don't bother with this branch - use Steveice10's fork at https://github.com/Steveice10/MinecraftClassicDeobfuscate
Shell
4
star
76

zhuowei.github.com

HTML
4
star
77

Fait

Currently just code to interact with iOS's Lockdownd
Go
3
star
78

addongen

JavaScript
3
star
79

BitcodeEvaluation

App that dumps its own main executable, for comparing differences between original and Bitcode built code
Objective-C
3
star
80

Ironsand

Notes on testing VirtualBox's DevPlayground virtual device plugin sample on macOS
C++
3
star
81

AMDPSP_Extract

Extract AMD Secure Processor components from a BIOS image
Python
3
star
82

my-vscode-macros

My personal vscode macros used with exceedsystem/vscode-macros
JavaScript
3
star
83

unnamedL

The unnamed Android L SDK port for Nexus 7 (2012): build tools
Shell
3
star
84

CompRemote-client

The sources for CompRemote lite, a Blackberry PlayBook app
ActionScript
3
star
85

MCPIScripts

A collection of scripts for Minecraft Pi
JavaScript
3
star
86

mcpetexturenames

JavaScript
3
star
87

Mercator

Java
3
star
88

trippyvideo

JavaScript
3
star
89

AGXShaderExplorer

Objective-C
3
star
90

m3exploration

Generating adversarial avatars for m3inference with PyTorch and Foolbox
Python
3
star
91

Xenologer-src-glasssetup

Modified APKTool dump of GlassSetup.apk. Prebuilt APKs at the main Xenologer repo.
3
star
92

Keybored

Android keyboard that sends keypresses from a PC on Wi-Fi to the phone
Java
2
star
93

as3craft-classic

ActionScript
2
star
94

Xenologer-util-recolada

Sets up the Bluetooth identity socket to allow MyGlass to work
Java
2
star
95

Nyastrocat

Astrocade + Nyancat
Assembly
2
star
96

PTPatchUpdater

Java
2
star
97

MC-Android-Patch

Java
2
star
98

SGX5Dec

Useless
Python
2
star
99

MemeMaker

Image macro generator for the Apple Watch
Swift
2
star
100

Xenologer-src-glasscamera

GlassCamera.apk
2
star