Mining YTN on iOS Mobile

JackMx
1 min readFeb 13, 2022

Warning: This will make your phone heat and damage your battery life.

Get MobileMiner:

https://github.com/spacecodes/MobileMinerBitZeny

Get Arm version of Lenten miner, from the GitHub master (not the tarball as it is missing files):

https://github.com/yentencoin/yenten-arm-miner-yespowerr16

You will need to add this to fix the byteswap.h missing on MacOS:

#elif defined(__APPLE__)

// Mac OS X / Darwin features

#include <libkern/OSByteOrder.h>

#define bswap_16(x) OSSwapInt16(x)

#define bswap_32(x) OSSwapInt32(x)

#define bswap_64(x) OSSwapInt64(x)

You may also have to remove blake2b support (in code, and Makefiles) as it seem to fail to build.

Then, Build it:

make CC=”$(xcrun — sdk iphoneos — find clang) -isysroot $(xcrun — sdk iphoneos — show-sdk-path) -arch arm64 -target arm64-apple-ios12.0"

It will fail to create the final cpu-miner but it’s fine, we just need the .o

Packaged the minerd.a lib:

ar cru minerd.a sugarmaker-cpu-miner.o sugarmaker-util.o sugarmaker-sha2.o sugarmaker-YespowerYtn.o sugarmaker-YespowerIots.o sugarmaker-YespowerIso.o sugarmaker-YespowerItc.o sugarmaker-YespowerLitb.o sugarmaker-YespowerNull.o sugarmaker-YespowerSugar.o sugarmaker-YespowerUrx.o yespower-1.0.1/sugarmaker-yespower-opt.o yespower-1.0.1/sugarmaker-sha256.o

Copy miners.a and combat/libjansson.a into the MobileMiner directory.

Build the app in Xcode. It should work. Then run it on your connected iPhone, iPad.

I mined successfully on both iPhone7 and an iPad, in both case the chip was the A10 Fusion. If you experience with other devices, let me know!

Don’t forget to run your phone on ice…

--

--