Author Archives: dmitriano

Generating QR code for my app

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');
}

?>
(more…)

Using Swift in a QT6 app

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();
(more…)

My first attempt to build Yandex Mobile Ads Example for iOS

According to the official repository docs I tried to install CocaPods:

 sudo gem install cocoapods

but got the following error:

ERROR:  Error installing cocoapods:
        The last version of drb (>= 0) to support your Ruby & RubyGems was 2.0.6. Try installing it with `gem install drb -v 2.0.6` and then running the current command again
        drb requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.

Installed some dependencies and the installation of CocoaPods succeeded:

sudo gem install drb -v 2.0.6
sudo gem install activesupport -v 6.1.7.8
sudo gem install cocoapods
(more…)

Version tolerant serialization in C++

Last time I have been working on a C++ binary serialization framework that allows to serialize simple data structures with a few lines of code. First, you add AWL_REFLECT macro to all your structures as follows:

#include "Awl/Reflection.h"
#include <string>
#include <vector>
#include <set>

struct A
{
    int a;
    bool b;
    std::string c;
    double d;

    AWL_REFLECT(a, b, c, d)
};
(more…)

“Null object reference” exceptions on Android 14 in a QT app

When I switched to QT 6.7.2 and set QT_ANDROID_TARGET_SDK_VERSION "34" (that is Android 14) my QT app started to crash with the following stack traces:

On google Pixel 5 64-bit only 1080x2340 Android 14 (SDK 34) arm64-v8a:

Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
  at android.os.Parcel.createExceptionOrNull (Parcel.java:3189)
  at android.os.Parcel.createException (Parcel.java:3167)
  at android.os.Parcel.readException (Parcel.java:3150)
  at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:202)
  at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:154)
  at android.content.ContentProviderProxy.call (ContentProviderNative.java:764)
  at android.content.ContentResolver.call (ContentResolver.java:2466)
  at android.content.ContentResolver.call (ContentResolver.java:2446)
  at ekfr.a (:com.google.android.gms@242013038@24.20.13 (190400-633713831):29)
  at com.google.android.gms.wallet.intentoperation.setupwizard.PaymentsSetupWizardAccountChangeIntentOperation.onHandleIntent (:com.google.android.gms@242013038@24.20.13 (190400-633713831):252)
  at com.google.android.chimera.IntentOperation.onHandleIntent (:com.google.android.gms@242013038@24.20.13 (190400-633713831):2)
  at ajdw.onHandleIntent (:com.google.android.gms@242013038@24.20.13 (190400-633713831):8)
  at pbh.run (:com.google.android.gms@242013038@24.20.13 (190400-633713831):70)
  at pbg.run (:com.google.android.gms@242013038@24.20.13 (190400-633713831):152)
  at elbx.run (:com.google.android.gms@242013038@24.20.13 (190400-633713831):21)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:644)
  at java.lang.Thread.run (Thread.java:1012)
(more…)

QT stopped compiling with QT_NO_EXCEPTIONS

QT 6.7.2 failed to build with QT_NO_EXCEPTIONS for Android with the following errors:

C:/dev/repos/qt-everywhere-src-6.7.2/qtbase/src/corelib/io/qprocess_unix.cpp:889:29: error: use of undeclared identifier 'e'
        failChildProcess(d, e.what(), FakeErrnoForThrow);
                            ^
C:/dev/repos/qt-everywhere-src-6.7.2/qtbase/src/corelib/io/qprocess_unix.cpp:890:7: error: expected expression
    } QT_CATCH (...) {
      ^
C:/dev/repos/qt-everywhere-src-6.7.2/qtbase/src/corelib/global/qexceptionhandling.h:28:23: note: expanded from macro 'QT_CATCH'
#  define QT_CATCH(A) else
                      ^
2 errors generated.
[673/5992] Building CXX object qtbase/src/corelib/CMakeFiles/Core.dir/itemmodels/qabstractitemmodel.cpp.o
ninja: build stopped: subcommand failed.
(more…)

Entering EU Digital Services Act compliance information in App Store Connect

I spent several hours trying to figure out how to Enter EU Digital Services Act compliance information in Apple App Store Connect. The keys steps I did were the following:

(more…)

Launching the iOS Simulator from Terminal

Running a default Simulator:

open -a Simulator.app

List of devices:

xcrun simctl list
(more…)

Building Lines Game for MacOS and iOS

To build my app for iOS I tried to run CMake from the command line without QT Creator:

cmake -S /Users/admin/dev/repos/examples/src/LinesGame/LinesGameQt -B . -DCMAKE_GENERATOR:STRING=Xcode \
  -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=./.qtc/package-manager/auto-setup.cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/Users/admin/dev/libs/QT6/release/iOS/bin/qmake6 \
  -DCMAKE_PREFIX_PATH:PATH=/Users/admin/dev/libs/QT6/release/iOS \
  -DCMAKE_C_COMPILER:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
  -DCMAKE_CXX_COMPILER:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ \
  -DCMAKE_TOOLCHAIN_FILE:FILEPATH=/Users/admin/dev/libs/QT6/release/iOS/lib/cmake/Qt6/qt.toolchain.cmake \
  -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 -DCMAKE_OSX_SYSROOT:STRING=iphoneos -DCMAKE_CXX_FLAGS_INIT:STRING= \
  -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM:STRING=XXXXXXX
(more…)

Publishing MacOS QT app in Apple App Store

First I set CMake generator to XCode in QT Creator Kits settings page:

(more…)