npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-change-appicon

v0.0.5

Published

Change AppIcon for iOS

Readme

react-native-change-appicon

Change app icon for iOS

Installation

yarn add react-native-change-appicon react-native link react-native-change-appicon

Documentation

1.Add a ViewController to your project as a rootViewController which inherited from UIViewController and write the following code in ViewController.m file:

#import "ViewController.h"
#import <objc/runtime.h>

@interface ViewController ()

@end

@implementation ViewController

- (instancetype)init
{
  self = [super init];
  if (self) {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
      Method presentM = class_getInstanceMethod(self.class, @selector(presentViewController:animated:completion:));
      Method presentSwizzlingM = class_getInstanceMethod(self.class, @selector(ox_presentViewController:animated:completion:));
      method_exchangeImplementations(presentM, presentSwizzlingM);
    });
  }
  return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)ox_presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion {
  if ([viewControllerToPresent isKindOfClass:[UIAlertController class]]) {
    UIAlertController *alertController = (UIAlertController *)viewControllerToPresent;
    if (alertController.title == nil && alertController.message == nil) {
      return;
    } else {
      [self ox_presentViewController:viewControllerToPresent animated:flag completion:completion];
      return;
    }
  }
  [self ox_presentViewController:viewControllerToPresent animated:flag completion:completion];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

2.Change the rootViewController at AppDelegate.m of your project:

#import "ViewController.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  UIViewController *rootViewController = [[ViewController alloc] init];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  return YES;
}

@end

3.Add icons to your project which you want to change to. (Icons are all in the 'icons' directory in the Example project)

4.Add key-values in the Info.plist file like this: (you should change the icon names 'icon0*.png' to your own icon names and one-to-one correspondence with pictures from icons directory)

CFBundlePrimaryIcon:APP default icon CFBundleAlternateIcons:Alternate icons(All your alternate icons should write here) UINewsstandIcon: news stand icon

your project -> Info.plist -> right click -> Open As -> Source Code:

  <key>CFBundleIcons</key>
  <dict>
    <key>CFBundleAlternateIcons</key>
    <dict>
      <key>icon01.png</key>
      <dict>
        <key>CFBundleIconFiles</key>
        <array>
          <string>icon01.png</string>
        </array>
        <key>UIPrerenderedIcon</key>
        <false/>
      </dict>
      <key>icon02.png</key>
      <dict>
        <key>CFBundleIconFiles</key>
        <array>
          <string>icon02.png</string>
        </array>
        <key>UIPrerenderedIcon</key>
        <false/>
      </dict>
    </dict>
    <key>CFBundlePrimaryIcon</key>
    <dict>
      <key>CFBundleIconFiles</key>
      <array>
        <string>icon01.png</string>
      </array>
      <key>UIPrerenderedIcon</key>
      <false/>
    </dict>
    <key>UINewsstandIcon</key>
    <dict>
      <key>CFBundleIconFiles</key>
      <array>
        <string></string>
      </array>
      <key>UINewsstandBindingEdge</key>
      <string>UINewsstandBindingEdgeLeft</string>
      <key>UINewsstandBindingType</key>
      <string>UINewsstandBindingTypeMagazine</string>
    </dict>
  </dict>

5.Usage:

import ChangeAppIcon from 'react-native-change-appicon';



ChangeAppIcon.changeAppIconWithName('icon02.png');