Calendar & Clock app code

Discussion in 'iOS Programming' started by zoran, Oct 5, 2017.

Tags:
  1. zoran macrumors 68040

    Joined:
    Jun 30, 2005
    #1
    Is it possible to see programming code of the Calendar and Clock apps of iOS?
     
  2. zoran thread starter macrumors 68040

    Joined:
    Jun 30, 2005
    #2
    Its amazing that those two apps have code that provide a preview of their function on the app icons! Thats the code im looking for.
     
  3. Mascots macrumors 68000

    Mascots

    Joined:
    Sep 5, 2009
    #3
    No, their code is not available and there's no way to mirror what is done to the app icons: it is done on the OS level in Springboard.

    The most you can do is replace the app icon within your app but that requires your app to be open and the user to agree to a prompt.
     
  4. zoran thread starter macrumors 68040

    Joined:
    Jun 30, 2005
    #4
    Springboard?

    I got no clue what you mean here! :(
     
  5. Mascots, Oct 6, 2017
    Last edited: Oct 14, 2017

    Mascots macrumors 68000

    Mascots

    Joined:
    Sep 5, 2009
    #5
    Springboard is the application that creates and manages the home screen (among other things). Within there are a set of classes (SBClockApplicationIcon) which manage the icons views accordingly.
    That is all behavior private to Apple and has nothing really to do with the application itself.

    However, Apple has recently added a method called setAlternateIconName which lets you change your icon to something predefined, with users permission.
     
  6. zoran thread starter macrumors 68040

    Joined:
    Jun 30, 2005
    #6
    So, in case i want to make an app, say for eg. like a digital clock and have the icon displaying time just like "clock" cant it be done?
     
  7. Mascots macrumors 68000

    Mascots

    Joined:
    Sep 5, 2009
  8. zoran thread starter macrumors 68040

    Joined:
    Jun 30, 2005
    #8
    And the reason is because the icons are managed by Springboard, is that correct?

    When you say predefined, what do u mean exactly?
     
  9. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #9
    While you can change the app's icon image, these images must be saved in advance in the project directory.

    Also, when the icon changes, the system will show an alert to the user saying 'You have changed the icon for {app name}".

    Because of that alert, it wouldn't be possible to replicate what the Clock app does, since it would have to be A) done while the app is launched and B) would have to show the user the popup alert every time the icon changes, which in the case of the clock app, would be every second.
     
  10. zoran thread starter macrumors 68040

    Joined:
    Jun 30, 2005
    #10
    Im not willing to replace the iOS's clock app, im only trying to test to see if i can make a different clock app with the same potentials as far as the icon i concerned.
     
  11. deadworlds macrumors 65816

    deadworlds

    Joined:
    Jun 15, 2007
    Location:
    Citrus Heights,CA
    #11
    Not possible.
     
  12. bjet767 macrumors 6502a

    Joined:
    Oct 2, 2010
    #12

Share This Page

11 October 5, 2017