Category Archives: Mac OS X

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…)

Publishing iOS QT app in Apple App Store

I downloaded provisioning profiles with XCode:

(more…)

Building QT6.7 on MacOS Sonoma

I installed MacOS Sonoma on HyperV, installed XCode and used the following commands to check compiler and SDK versions:

admin@son ~ % xcode-select -print-path
/Applications/Xcode.app/Contents/Developer
admin@son ~ %  xcrun -sdk macosx -find clang
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
admin@son ~ % clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: x86_64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
admin@son ~ % xcrun -sdk macosx --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk
(more…)

Installing MacOS Sonoma on HyperV

First I downloaded Sonoma on my Big Sur machine via Software Update:

and tried the following commands:

(more…)

Updating MacOS

I created partition images and tried to update my MacOS from UI:

(more…)

Building QT6.4.2 for MacOS and iOS

Build QT for MacOS separately in Debug and Release configuration:

tar xf qt-everywhere-src-6.4.2.tar.xz
cd ~/build/qt
export MY_QT_SRC_DIR=~/repos/qt-everywhere-src-6.4.2
export MY_MODE=release
#export MY_MODE=debug

export MY_INSTALL_PATH=~/libs/QT6.4/${MY_MODE}/MacOs
${MY_QT_SRC_DIR}/configure -prefix $MY_INSTALL_PATH -c++std c++20 -opensource -confirm-license \
  -static -static-runtime -${MY_MODE} -force-debug-info \
  -no-openssl -securetransport -DQT_NO_EXCEPTIONS=1 \
  -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity \
  -skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua \
  -skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects \
  -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland \
  -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquick3dphysics -skip qtspeech -skip qtlocation \
  -skip qthttpserver \
  -- -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
  && cmake --build . --parallel \
  && cmake --install .
(more…)

Building my app with QT6.4 on MacOs

I built QT6.4 and downloaded and installed QT Creator 8.0.1 and copied it to my MacOs machine:

scp qt-creator-opensource-mac-x86_64-8.0.1.dmg admin@192.168.0.112:/Users/admin/Downloads

QT Creator started successfully because I made .config folder writable while running my app with QT6.2. I added QT versions and kits:

(more…)

Building QT6.4 for MacOS – separate Debug and Release

I continued my experimentation in same SSH session where I built QT6.4 for MacOS with Ninja generator with the same QT sources location:

scp /mnt/d/dev.distrib/qt-everywhere-src-6.4.0.tar.xz admin@192.168.0.112:/Users/admin/repos
tar xf qt-everywhere-src-6.4.0.tar.xz
cd ~/build/qt
export MY_QT_SRC_DIR=~/repos/qt-everywhere-src-6.4.0

QT did not built with -debug-and-release option so I decided to build debug and release version separately with the following configurations:

(more…)