iPhone .deb App installation Problem

Discussion in 'iOS Development' started by raziiq, Feb 9, 2010.

  1. raziiq

    raziiq New Member

    Aug 23, 2009
    Likes Received:
    Hi there.

    I am into a very strange problem. I have developed an app for myself, which has following three files

    * MyApp.app
    * MyAppDaemon.app
    * LaunchDaemon.plist

    When i copy each file into specific folder using ssh , my app works perfect.

    * MyApp.app into /Applications
    * MyAppDaemon.app into /private/var/mobile/
    * LaunchDaemon.plist into /System/Library/LaunchDaemons/

    App works great if i ssh using cyberduck and puts each file in above specified folders.

    Now the problem is when i try to pack the files in .deb file and then transfer to iPhone and then using Terminal i install it [dpkg -i MyApp.deb] the files get copied fine in the folders i specified earlier but my app doesnt work. I have checked all the permissions, still not working.

    Its kinda strange, everything is done in the same way as i do using ssh but in case of .deb file its not working, however it works great if i copy the files individually

    Any Advice on this??
  2. lauNchD

    lauNchD Well-Known Member

    Jan 27, 2008
    Likes Received:
    iPhone 5 (Black)
    LaunchDaemons, in 99% of cases, are NOT .apps! They're usually just executables o scripts. In your daemon's plist file, you must specify the exact path to the executable, not just the app bundle. If you actually don't have any important resources for your daemon (such as images), I suggest you take the executable out of the .app bundle (make it a "standalone") and use -[NSRunLoop run] instead of UIApplicationMain.
  3. raziiq

    raziiq New Member

    Aug 23, 2009
    Likes Received:
    Thanks for the reply, that is what i am doing already.

    I have found the solution to my problem, although i still dont know why the problem was occurring. Here is what i did

    I had packed my AppDaemon in MyApp resources folder in xcode and in DEBIAN's postinst file i was moving that folder to /private/var/mobile which was causing problem actually. The folder was getting copied to /private/var/mobile but may be not with all the permissions and ownership. So what i did is, before packing it into .deb file, i deleted the AppDaemon from resources folder of MyApp in xcode and made it a standalone app. Then i made this file architecture for packing into .deb

    +- MyApp
       +- Applications
             +- com.myLaunchDaemon.plist
             +- AppDaemon.app
    Then i packed the folder with .deb commands like this saurik instructed in his site.

    All went well, problem solved. However i still dont know why the problem was taking place?

Share This Page