How to implement that

Discussion in 'iOS Programming' started by ali.m.habib, Feb 20, 2011.

  1. ali.m.habib macrumors newbie

    Joined:
    Jan 12, 2011
    #1
    Hi ,

    I added compiled.mach-o executable file to the main bundle of my ipad application , how to call it and pass parameters to it


    Best regards
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Auxiliary executables are banned on the app store.
     
  3. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #3
    excuse me

    I am newbie , and misunderstood you could u give me more details and example


    Best regards
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    No as doing what you are trying to do is banned on the app store. You can only have one executable. Your one executable may not use plugins or launch any other executable code. So if you want to get your app on the app store you will have to think of a different approach.
     
  5. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #5
    it's empeded in the code actually it's only one could u give me the manner
     
  6. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    I am confused: if you have a single executable within the bundle then you never need to be able to call that executable or pass parameters to it: iOS will automatically run that executable when the user touches the icon for your app in the Springboard. I suggest you describe, in detail and clarity, preferably using full words not "u" and other text-speak shortenings that make you exceptionally difficult to understand, the structure of what you have and what you are trying to accomplish.
     
  7. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #7

    I added existing file (compiled.mach-o executable) I want to call it from my application , it'll be embeded , calling this file reuired parameters
     
  8. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #8
    This is exactly what I have already told you is banned: you may not call any executable from your own code. All executable code must be compiled into a single executable which is what the iOS Springboard calls.
     
  9. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #9

    and I again say how to do that
     
  10. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #10

    What part of "you can't" don't you understand?
     
  11. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #11
    it's abcjgraound (like batch in widows) it's doesn't have any user interfacce

    so it will not as a new program or application

    is this available , am I give more explanations

    Best regards
     
  12. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #12
    This makes no difference to the rules: whether the executable has a UI or not your executable may not start any other executable
    If it's a different file on the file system then yes, it is a new program at an OS level so will get your application rejected.

    The only way to re-use the code is to compile it into your main application executable. If it's GPL code that will, of course, mean you have to GPL all the code to your application.

    Whatever you choose to do I'm not going to help any more.
     
  13. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #13
    this file wil be embeded in the main application, the outbut will be only one application , I want to use it like batch in windows
     
  14. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #14
    You need to statically link any code you want to execute during your main application's build so that it is included inside the main app's one binary file. Everything else, all other binaries or files, are rendered non-executable by the OS sandbox. So adding a mach-o binary to a bundle is pretty much worthless.
     
  15. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #15
    execuse me foor my naive uestions, but I am totally newbie , so could u give me more details
     
  16. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #17
  17. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #18
    Stop spamming, it's not possible. u asked same in iphonedevsdk. and they also said it doesn't work..
     
  18. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #19
    first of all, I am not spamming , I send to you the file to make my question clear no more no less ,

    secondly it's not your business if I am spamming or not
     
  19. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #20
    Code:
    storescu: Mach-O universal binary with 2 architectures
    storescu (for architecture i386):	Mach-O executable [B]i386[/B]
    storescu (for architecture x86_64):	Mach-O 64-bit executable [B]x86_64[/B]
    
    Something tells me it isn't going to work on any current iOS device. :p

    EDIT: Read the top part of this: http://www.na-mic.org/svn/NAMICSandBox/trunk/vtkPacs/Doc/PatchingDcmtk.txt for some hints.

    B
     
  20. ali.m.habib thread starter macrumors newbie

    Joined:
    Jan 12, 2011
    #21
    I rebuild it and it's now of kind Unix executable file (intel)

    is it ablicable to be used ,
    note , I rebuild using i386 only
     
  21. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #22
    Wonderful. If the iPad had a '386 in it.

    Did you read the link I provided in the edit.

    B
     

Share This Page