简体   繁体   English

如何在 iOS 扩展应用程序上使用 IPC(基于 C++)?

[英]How to use IPC (C++ based) on iOS Extension App?

I am currently implementing an iOS App using QT.我目前正在使用 QT 实现一个 iOS 应用程序。 Although it is a QT-generated Project, it is very similar to iOS.虽然是QT生成的项目,但与iOS非常相似。

I added the Extension App to Main App and I would like to use IPC without pure iOS function.我将扩展应用程序添加到主应用程序,我想使用没有纯 iOS 功能的 IPC。 So, I want to use shared momory or named pipeline (C++ based).所以,我想使用共享内存或命名管道(基于 C++)。

But I lack knowledge of ios.但我缺乏ios知识。 So I don't know sandboxed path of Extension App.所以我不知道扩展应用程序的沙盒路径。 Which path should I create a pipe line at (using mkfifo function)??我应该在哪个路径创建管道(使用 mkfifo 函数)??

I attached the information about my extension app as a screenshot.我附上了有关我的扩展应用程序的信息作为屏幕截图。

enter image description here在此处输入图片说明

  • I tried to create a pipe line in relative path, but it failed.我试图在相对路径中创建一条管道,但失败了。

enter image description here在此处输入图片说明

The /tmp path only worked on the simulator. /tmp 路径仅适用于模拟器。 In order to operate on the device, after adding the App Group, it took the App Group path and created a pipe line in that path, and it worked correctly为了在设备上进行操作,添加了App Group后,取了App Group路径,并在该路径中创建了管道,运行正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM