Adding Web Clips Programatically

Discussion in 'iOS Development' started by Collateral, Dec 10, 2009.

  1. Collateral

    Collateral Active Member

    Joined:
    Sep 23, 2007
    Messages:
    1,974
    Likes Received:
    6
    Device:
    iPhone 3GS (Black)
    How would i go about adding a web clip through a program? I have been looking and can't really find it. As an alternative, is iBlank open source? If so, where can i find the source code?

    Thanks

    Please Register or Log in to view images

  2. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    Not sure, but i do know iBlank isn't open source. Though, i'm sure if you asked the developer about your first question he/she would tell you.
  3. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    Dump UIKit. I believe there is a handler class that represents a webclip, UIWebClip. And then, there are methods to add those to the home screen via UIApplication.
  4. Collateral

    Collateral Active Member

    Joined:
    Sep 23, 2007
    Messages:
    1,974
    Likes Received:
    6
    Device:
    iPhone 3GS (Black)
    I know this is an old thread, but I am still looking for the answer. I've looked at UIWebClip.h and I dont know how to use this in xcode. Obviously importing it doesn't work because i'm not supposed to use it.

    How do i use undocumented headers in xcode?


    As for coding, i also cannot figure out how to deploy the webclip to the homescreen, because I cant find a method that would do that in UIWebClip.h

    EDIT: I did find
    Code:
    - (void)addWebClipToHomeScreen:(id)arg1;
    in UIApplication.h though. But i can't use it, because i need to import UIApplication.h to use it.


    I've looked EVERYWHERE. Please help. Thanks.
  5. Axis

    Axis Super Moderator Staff Member

    Joined:
    Dec 2, 2007
    Messages:
    6,288
    Likes Received:
    133
    Device:
    iPhone 4S (White)
    Just add a category to UIApplication, declaring the method. You need not provide an implementation.

Share This Page