IPhone SDK Questions

Discussion in 'Mac Programming' started by CBX, Jun 6, 2008.

  1. CBX macrumors regular

    Joined:
    May 15, 2007
    #1
    Is it possible to create an application that

    a) connects to a database
    - if so what does it use to connect ODBC?
    - can it connect to any database?

    b) display/update the programs icon to display information. what id be looking to do is update the icon when some event occurs in the database in the same way that the mail application notifies users by changing the program icon to display the number of emails when they are recieved?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    The SDK does not support background apps so what you want is pretty much not possible: you could only update the icon (if this is possible) when your app was running so the icon wouldn't be visible anyway.
     
  3. CBX thread starter macrumors regular

    Joined:
    May 15, 2007
    #3
    Thats a shame.

    Thanks for the info though.

    Any info on the db side of things?
     
  4. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #4
    The iPhone SDK is under NDA. So nobody who could give you an answer is allowed to do so. You can register as an iPhone developer, sign the NDA, and then read all the documentation yourself.
     
  5. CBX thread starter macrumors regular

    Joined:
    May 15, 2007
    #5

    Didnt realise it was NDA as the SDK is available for all to download?

    So you can download it and use it but not tell anyone about what it can and cant do??:confused:
     
  6. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    Yes, that's 100% correct.
     
  7. CBX thread starter macrumors regular

    Joined:
    May 15, 2007
    #7
    Whats the point of that?
     
  8. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #8
    Ask Apple.

    Don't like it? The don't agree to the conditions and don't download the SDK.

    The SDK is still pre-release software and as such is covered by NDA like all other Apple pre-release software.
     
  9. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #9
    Well, it is not available for all to download. It is only available to those who are willing to agree to Apple's confidentiality terms. The reason is this: They way Apple does it, Microsoft employees or Nokia employees can download the iPhone SDK (which they would likely be very interested in), but they would have to accept the NDA. So they can write iPhone apps if they want to, but they cannot take any ideas and put them into their own products. Everything that is truly publicly available they can take and use any way they like (unless it is protected by copyright, or by patents). Legally, the iPhone SDK is a trade secret as long as it stays under NDA.

    On the Apple Cocoa-Dev mailing list, the rule is "any questions and answers about iPhone SDK will be removed and the poster reported to Developer Relations".
     
  10. fishkorp macrumors 68020

    fishkorp

    Joined:
    Apr 10, 2006
    Location:
    Ellicott City, MD
    #10
    I'll answer (kind of) your questions. The iPhone SDK can use SQLite for a database, check out the SQLite Books example app on how it works.

    And you can add an application badge to the icon. I have an app that counts the number of "things" on app exit, then the little red badge shows up on the app icon with that number in it. Assuming your UIApplication is called 'application' you do:
    Code:
    [application setApplicationBadge: [NSString stringWithFormat: @"%u", THE_VALUE_YOU_WANT_HERE]];
    
    So it can be done, with legit code provided by Apple, not hacks or using the non-SDK toolchain. It's not a background process at all, unless you want it to pull data all the time. The only way you can update the badge is while the app is running or when it exits.

    You'd probably find answers to these questions if you just read the documentation and samples. It's not rocket science.
     

Share This Page