I have a home made Trading Bot that short coins on Binance with some simple strategy:

From QT’s Purchasing:
//SKProductsRequestDelegate
-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
NSArray<SKProduct *> *products = response.products;
SKProduct *product = [products count] == 1 ? [[products firstObject] retain] : nil;
if (product == nil) {
//Invalid product ID
NSString *invalidId = [response.invalidProductIdentifiers firstObject];
QMetaObject::invokeMethod(backend, "registerQueryFailure", Qt::AutoConnection, Q_ARG(QString, QString::fromNSString(invalidId)));
} else {
//Valid product query
//Create a IosInAppPurchaseProduct
IosInAppPurchaseProduct *validProduct = new IosInAppPurchaseProduct(product, backend->productTypeForProductId(QString::fromNSString([product productIdentifier])));
if (validProduct->thread() != backend->thread()) {
validProduct->moveToThread(backend->thread());
QMetaObject::invokeMethod(backend, "setParentToBackend", Qt::AutoConnection, Q_ARG(QObject*, validProduct));
}
QMetaObject::invokeMethod(backend, "registerProduct", Qt::AutoConnection, Q_ARG(IosInAppPurchaseProduct*, validProduct));
}
[request release];
}
Copy Podfile
at the build stage:
message("Copy ${CMAKE_CURRENT_SOURCE_DIR}/Podfile -> ${CMAKE_BINARY_DIR}")
add_custom_target(copy_podfile
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/Podfile"
"${CMAKE_BINARY_DIR}"
COMMENT "Copying Podfile"
)
add_dependencies(${PROJECT_NAME} copy_podfile)
Copy Podfile
at the configuration stage:
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/Podfile"
"${CMAKE_BINARY_DIR}"
)
To build the example with CocoaPods do the following steps:
Install Ruby with rbenv on macOS and install CocoaPods without sudo
:
gem install cocoapods
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install rbenv
I have system Ruby:
% which -a ruby
/usr/bin/ruby
ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin23]
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
When my QT app starts first time on MacOS, its directory ./Application Support/Sharlines/Lines/
does not exit, but QT creates it when I write to QSettings
first time.
To create the local directory I added the following code:
// Local data directory does not exist when the app is run first time on MacOS.
if (fs::create_directories(GetLocalFolder()))
{
qDebug() << static_cast<QString>(qtil::Format() << "Local folder '" << GetLocalFolder() << "' has been created.");
}
First I created a PHP file lines-app-store.php
on sharlines.com website with the following content:
<?php
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
$macOs = stripos($_SERVER['HTTP_USER_AGENT'],"Mac");
$Android= stripos($_SERVER['HTTP_USER_AGENT'],"Android");
//check if user is using ipod, iphone or ipad...
if( $iPod || $iPhone || $iPad || $macOs)
{
//we send these people to Apple Store
header('Location: https://apps.apple.com/app/id6504194961');
}
else if($Android)
{
//we send these people to Android Store
header('Location: https://play.google.com/store/apps/details?id=net.geographx.LinesGame');
}
else
{
//we send these people to Windows Store
header('Location: https://www.microsoft.com/ru-ru/store/p/lines-3d/9nblggh5g9c6');
}
?>
I simply opened arboreus_examples/qt6/CMake/UsingSwift/UsingSwift_v3/CMakeLists.txt in QT Creator and was able to build it and run.
In its main.cpp
it creates a Swift wrapper and calls method:
ASwift* oSwift = new ASwift(&oEngine);
oSwift->mInit();
_A_DEBUG << oSwift->mString();