Results 1 to 4 of 4
Discuss How to execute Shell or Terminal commands in App? : (unzip) at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; Hi, Can anyone let me know if it's possible to execute Shell or Terminal commands ...
  1. #1
    Senior Professional Array

    Join Date
    Sep 2007
    Posts
    370
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    29

    Default How to execute Shell or Terminal commands in App? : (unzip)

    Hi,

    Can anyone let me know if it's possible to execute Shell or Terminal commands from inside my application?

    I'm only really interested in unzip. This command works fine inside Terminal but i'd like to programatically execute it in my app.

    I've read the possibility of NSTask for unzipping but this isn't available in the 2.0+ framework.

    I'm basically just looking for a simple unzipping solution for my application.

    Many thanks



  2. #2
    Senior Professional Array spektro's Avatar

    Join Date
    Mar 2008
    Posts
    178
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    15

    Default

    try this:

    system("the command you want it to run");

    Cheers

  3. #3
    Senior Professional Array

    Join Date
    Sep 2007
    Posts
    370
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    29

    Default

    Thanks, this works great.

  4. #4
    Senior Professional Array

    Join Date
    Sep 2007
    Posts
    370
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    29

    Default

    Following on from my original question. Does anyone know how I might be able to run the following lines in my app:

    launchctl unload -w /System/Library/LaunchDaemons/com.apple.CommCenter.plist
    launchctl load -w /System/Library/LaunchDaemons/com.apple.CommCenter.plist
    I seem to be having problems. I'm guessing because i'm not running it as Root

 

 

Similar Threads

  1. execute shell command from Windows
    By goodron in forum iPhone Developer Exchange
    Replies: 1
    Last Post: 12-21-2010, 09:50 AM
  2. [INFO] Various Mac/Unix Terminal Commands
    By DaxTsurugi in forum Genuine Mac Support
    Replies: 11
    Last Post: 02-09-2009, 10:31 AM
  3. help for using the Terminal (shell)
    By ramislebob in forum Tools
    Replies: 1
    Last Post: 11-26-2008, 06:14 PM
  4. [2.02] - Unable to Type/Execute Commands via MobileTerminal
    By Kayser Sose in forum Free Toolchain Software (Cydia App's)
    Replies: 3
    Last Post: 10-03-2008, 05:25 AM
  5. SSH and Terminal can#t execute a program
    By creaventure in forum Free Toolchain Software (Cydia App's)
    Replies: 0
    Last Post: 09-30-2007, 01:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 06:23 AM.
twitter, follow us!