permission in MacOS during development
-
Dear all.
I a developing an application using bluetooth LE. I have a C++ version and a Python version. The C++ version works as expected, I added a modified info.plist
For python I read I should create a stand-alone app using pyside6-deploy. This app includes a modified info.plist. For me this is clear (however I did not succeed in creating the app, but that is another problem).
My question is about debugging/testing. I use Qt Creator and/or Visual Studio Code for it a one way or the other. these IDE should use a modified info.plist file that makes it possible to accesss bluetooth / microphone. How is this going and what should I do to debug mu application in the IDE with access to a modified info.plist Is this done by the IDE already?
kind regards - jan
-
Dear all.
I a developing an application using bluetooth LE. I have a C++ version and a Python version. The C++ version works as expected, I added a modified info.plist
For python I read I should create a stand-alone app using pyside6-deploy. This app includes a modified info.plist. For me this is clear (however I did not succeed in creating the app, but that is another problem).
My question is about debugging/testing. I use Qt Creator and/or Visual Studio Code for it a one way or the other. these IDE should use a modified info.plist file that makes it possible to accesss bluetooth / microphone. How is this going and what should I do to debug mu application in the IDE with access to a modified info.plist Is this done by the IDE already?
kind regards - jan
@Jan-Menssen you tell your build system to use your pre made/stored file instead of creating one from scratch for example:
If you have your custom Info.plist file inside a MacOS folder of your source folder://qmake QMAKE_INFO_PLIST = MacOS/Info.plist
//cmake set(MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/MacOS/Info.plist")
If the debugger is set up correctly, QtC and VSCode should both be able to easily debug your application.
-
Correct, this is for C++ development, I did this and this works.
But how does it work in Python?
As far as I (currently) know this is handled by the IDE, -
what works?
what is handled by the IDE?
There's no difference, between c++ and python in this regard. This is a cmake/qmake setting. If you're using something besides cmakeList or qmake-project file for your Python project , then I'm afraid, you'll have to read the related manual. -
Adding a info.plist file in cmake results in a working app. The modified info.plist is added to the app.
as far as I know, (and I am a newby in Qt) Cmake is originally intended for C/C++ development. And wits some options, also for other task. (deploying).
I do not know how to use it with python. IN QT creator I have a *,pyproject file which do not contain the info.plist fileStill in QT Creator while debugging, Bluetooth access is granted and I am able to run my python. How does that work?
If I create a standalone python app (with pyside6-deploy) I should add the info.plist file but when I used the same code in the QT Creator environment this file is not needed?
-
Adding a info.plist file in cmake results in a working app. The modified info.plist is added to the app.
as far as I know, (and I am a newby in Qt) Cmake is originally intended for C/C++ development. And wits some options, also for other task. (deploying).
I do not know how to use it with python. IN QT creator I have a *,pyproject file which do not contain the info.plist fileStill in QT Creator while debugging, Bluetooth access is granted and I am able to run my python. How does that work?
If I create a standalone python app (with pyside6-deploy) I should add the info.plist file but when I used the same code in the QT Creator environment this file is not needed?
@Jan-Menssen
CMake is an open-source, cross-platform build system generator. It's used to manage the build process in a compiler-independent manner. CMake controls the software compilation process using simple platform and compiler-independent configuration files, known as CMakeLists.txt, and generates native build environments.CMake is not limited to a single programming language. It is designed to be multi-language and can be used with various programming languages. While CMake is most commonly associated with C and C++ projects, it supports many other languages, including:
- C
- C++
- Fortran
- CUDA
- Objective-C
- ASM (Assembly Language)
- Swift
- Java
- Python
- Rust
to name only a few.
I'm not a Python expert, but from a quick search:
The pyproject.toml file in a Python project doesn't directly handle macOS bundle creation or Info.plist files. For such tasks, you typically use tools like py2app in conjunction with setuptools or another compatible build system. You'll need to define the Info.plist configuration in a setup.py or setup.cfg and run the appropriate bundling command.