2

My question is, is the default iPhone menu a UIcollection view created with storyboarding, or is there more to its abilities? (in order to avoid emulating its functionality)

Morkrom
  • 578
  • 7
  • 26
  • 2
    If this is going to be submitted to the App Store (rather than enterprise distribution), creating a "wrapper app" of widgets or attempting to emulate anything like the iOS icon grid violates the submission guidelines. – Jack Lawrence Mar 11 '13 at 15:06
  • 1
    Since the Springboard was already part of the first version of iPhone OS, and `UICollectionView` is new since iOS6 it's very unlikely Springboard is an `UICollectionView`. However, if you want to make a similiar layout: that would be perfectly possible using an `UICollectionView` – s1m0n Mar 12 '13 at 16:30

2 Answers2

5

If you want to understand SpringBoard's view hierarchy:

  1. Launch the iOS Simulator if it's not already running.
  2. Make sure you're looking at SpringBoard in the simulator.
  3. In Xcode, choose Product > Attach to Process > springboard. The springboard process is way down in the “System” section of the list.
  4. Still in Xcode, choose Product > Debug > Pause.
  5. In Xcode's debug console (where it should show the (lldb) prompt), type po [[UIApp keyWindow] recursiveDescription].

Voila, you get a printout of SpringBoard's entire on-screen view hierarchy. Mine starts out like this:

(lldb) po [[UIApp keyWindow] recursiveDescription]
$0 = 0x0b63abf0 <SBAppWindow: 0xce3ef10; baseClass = UIWindow; frame = (0 0; 320 480); layer = <UIWindowLayer: 0xce3f010>>
   | <SBUIRootView: 0xb162de0; frame = (0 0; 320 480); layer = <CALayer: 0xb162e60>>
   |    | <UIView: 0xb163010; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0xb1630c0>>
   |    |    | <SBWallpaperView: 0xb1632a0; baseClass = UIImageView; frame = (0 0; 320 480); userInteractionEnabled = NO; layer = <CALayer: 0xb160f70>>
   |    |    |    | <UIImageView: 0xb1610d0; frame = (0 0; 0 0); hidden = YES; userInteractionEnabled = NO; layer = <CALayer: 0xb161130>>
   |    |    |    | <UIImageView: 0xb161160; frame = (0 0; 0 0); hidden = YES; userInteractionEnabled = NO; layer = <CALayer: 0xb163390>>
   |    |    | <SBIconContentView: 0xb163da0; frame = (0 0; 320 480); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0xb163e50>>
   |    |    |    | <UIView: 0xc939710; frame = (0 371; 320 109); opaque = NO; autoresize = W+TM; layer = <CALayer: 0xc939770>>
   |    |    |    |    | <SBDockIconListView: 0xc9381d0; frame = (0 20; 320 89); autoresize = TM; layer = <CALayer: 0xc9382c0>>
...
rob mayoff
  • 375,296
  • 67
  • 796
  • 848
  • Does this still work in 2018? It shows an error message "Ensure “SpringBoard” is not already running, and `username` has permission to debug it." – Ennabah Nov 09 '18 at 21:16
  • I'm able to do it with Xcode 10.1 on macOS 10.13.6, but I have a non-standard SIP configuration. Specifically, I booted my recovery partition, opened Terminal, and ran `csrutil enable --without debugging --without dtrace`. That means I can use the debugger and dtrace to analyze system processes. – rob mayoff Nov 09 '18 at 22:08
  • I tried `~ lldb -n SpringBoard` on my MBP running macOS 10.14, that showed an error message `attach failed: unable to attach`. When I switched to my another MBP running 10.13.6, it ran successfully. Do you recommend running `csrutil enable --without debug --without dtrace` on my personal 10.14 MB without booting from a recovery partition? Or maybe you have an explanation why it's not working on 10.14.. – Ennabah Nov 09 '18 at 22:15
  • I don't have a Mac running 10.14 to experiment on. You must boot your recovery partition to modify your SIP configuration (using `csrutil`). The changes then take effect when you reboot back in your normal partition. – rob mayoff Nov 09 '18 at 22:18
1

From Wikipedia article on Springboard:

Springboard, or Home Screen is the standard application that manages the iOS home screen. Other tasks include starting WindowServer, launching and bootstrapping applications and setting some of the device's settings on startup.

Black Frog
  • 11,595
  • 1
  • 35
  • 66