hunk.code_window:   as your development machine. This may not work on some public networks.
     ``localhost`` will not work for iOS unless you are in the simulator, and it
     only work on Android if your device is connected to your machine via usb.
   - Open the app on your device, then shake the device a little bit to reveal the
     developer menu. Tap on ``Debug JS Remotely``. This should open up a Chrome
     tab with the URL ``http://localhost:19001/debugger-ui``. From there, you can
     set breakpoints and interact through the JavaScript console. Shake the
     device and stop Chrome debugging when you're done.
  
hunk.labels: keep keep keep replace keep keep keep keep
hunk.after_edit: - Open the app on your device, then shake the device a little bit (or hit `Ctrl-Cmd-Z` on a Mac in the emulator) to reveal the
  
hunk.file_path: docs/versions/unversioned/guides/debugging.rst
hunk.type: replace
file: /**
   * Copyright (c) 2015-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  #import "ABI28_0_0ARTPattern.h"
  
  #import <ReactABI28_0_0/ABI28_0_0RCTLog.h>
  
  #import "ABI28_0_0RCTConvert+ART.h"
  
  @implementation ABI28_0_0ARTPattern
  {
    CGImageRef _image;
    CGRect _rect;
  }
  
  - (instancetype)initWithArray:(NSArray<id /* imagesource + numbers */> *)array
  {
    if ((self = [super initWithArray:array])) {
      if (array.count < 6) {
        ABI28_0_0RCTLogError(@"-[%@ %@] expects 6 elements, received %@",
                    self.class, NSStringFromSelector(_cmd), array);
        return nil;
      }
      _image = CGImageRetain([ABI28_0_0RCTConvert CGImage:array[1]]);
      _rect = [ABI28_0_0RCTConvert CGRect:array offset:2];
    }
    return self;
  }
  
  - (void)dealloc
  {
    CGImageRelease(_image);
  }
  
  // Note: This could use applyFillColor with a pattern. This could be more efficient but
  // to do that, we need to calculate our own user space CTM.
  
  - (void)paint:(CGContextRef)context
  {
    CGContextDrawTiledImage(context, _rect, _image);
  }
  
  
  
  @end
  