Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Shell command on iOS (system command)
QtWS25 Last Chance

Shell command on iOS (system command)

Scheduled Pinned Locked Moved Mobile and Embedded
iosshellsystem command
2 Posts 2 Posters 4.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    melmi
    wrote on 4 May 2015, 09:23 last edited by
    #1

    Hello everyone,
    I'm actually trying to execute a shell command on ios using the "system" command in Qt.
    system("launchctl list > process.txt");
    That return me this error : shell-init: Operation not permitted.

    I also try to use QProcess but this doesn't work too.
    QProcess process;
    process.start("launchctl list > process.txt");
    That doesn't return me error message but that doesn't work too.
    I just have "program received signal 20, thrad:42d2a;qaddr"

    I don't know if my problem is because I try to execute shell command on iOS, or if my app isn't allowed to execute shell command.

    I know this command existe on iOS because I can excute it with a ssh connection.

    Thanks for your help.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      shav
      wrote on 5 May 2015, 08:52 last edited by
      #2

      Hi,

      As I know you can't execute any commands or shell-script on the iOS from you application on official devices. Because security policy doesn't allowing you to do this. Application can't work with any datas not from application folder. If you need something to be execute you can try to copy shell script into application folder and then execute it.

      Also I recommend you read Apple documentation about certificate and how it works on iOS platform. In general, when you build your app and install it to official devices your application must be subscribe using special certificate which you need to receive from Apple (Apple iOS Developer program). If your application will not be subscribe with this certificate other people can't install your application and your application not be approve in App Store.

      Other link:

      • App Store Review Guidelines

      P.S. From your post I understand you are using jailbreak device, right? If so I recommend to you don't use it. Because on the official device it couldn't work.
      P.S.S. iOS and OS X application can't execute any third-part processes and script. Because certificate will block all third-part calls. But if you don't need to post you app to App Store you could skip Code sign of your app (I've use it only on OS X, on iOS you need special certificate).

      Mac OS and iOS Developer

      1 Reply Last reply
      0

      1/2

      4 May 2015, 09:23

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved