This is a fork of Lucas Jones's cpuminer-multi, ( https://github.com/lucasjones/cpuminer-multi ) compiled for arm64 iOS devices. Credits go to the initial developers and contributors.
if you want to keep the same argument formatting and parsing.
In order for notifications to be received in the UI, instead of reading from stderr, I am posting notifications from inside cpu-miner.c passing the log message to the UI.
I have added a throttle in submit_upstream_work in order to maintain the speed in reasonable limits, since I noticed that some pools might ban you if a) the pool has small startup diff b) the device can cope well at first with this diff and sends hashes very fast.
I've added -x objective-c in the Makefile in order to compile with objc.
Included necessary CoreFoundation framework for the C functions.
In the case of the program being loaded as a library, flags need to be set inside threads in order to be able to stop them, because we don't want them to exit the main thread when done (although its faster to kill and restart the app if you're caught in a processing miner thread)
This will create a "minerd.a" library. Drag minerd.a in Xcode
Compile openssl for iOS and drag libcrypto.a in Xcode project
Compile jansson for iOS and drag libjansson.a to Xcode project
Compile Curl for iOS and drag libcurl.a to Xcode project
(If you're having problems compiling or prefer precompiled binaries of the cpuminer project and dependencies , I am alternatively including them in Precompiled Binaries folder, just drag them in the Xcode project.)
请发表评论