Search code examples
iphonexcodedebianjailbreak

iPhone .deb App installation Problem


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??


Solution

  • Thanks for the replies guys, 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
          +Myapp.app
       +-DEBIAN
        -control
        -postinst
        -postrm
       +-System
         +-Library
           +-LaunchDaemons
             +- com.myLaunchDaemon.plist
       +-private
         +-var
           +-mobile
             +- 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?