EddyVerbruggen / cordova-plugin-app-icon-changer

Change the homescreen icon of your Cordova iOS app at runtime!
MIT License
32 stars 20 forks source link

plugin is not changing the icon. #7

Closed msmadja closed 5 years ago

msmadja commented 5 years ago

The plugin is not changing the icon to the right one. the plugin showing me success message 'your icon have changed' but nothing happen after I click on 'ok' button.

I tried to debug this in the Xcode IDE and I saw that after the 'OK' clicked it return nil object.

WhatsApp Image 2019-03-24 at 12 36 42

WhatsApp Image 2019-03-24 at 12 36 23

My code is:

 if (gwCordovaService.isCordova) {
        AppIconChanger.isSupported((supported) => {
          console.info("AppIconChanger Supported? " + supported);
          AppIconChanger.changeIcon(
            {
              iconName: `icon_${ containerCustomer.app_id }`,
              suppressUserNotification: true
            },
            () => {
              console.log("icon Updated");
            },
            (err) => {
              console.log(err)
             }
          );
        });
      }

I run this code in Angular 6 framework after device ready called. also I run this on Iphone 7 on debug mode. using USB cable and development provision profile.

sin-tanaka commented 5 years ago

@msmadja It worked for My environment.

Do you add *-info-plist > CFBundleIcons and IconImageFile to root of Resource directory?

Ref: https://github.com/EddyVerbruggen/cordova-plugin-app-icon-changer#preparing-your-app-for-icon-switching

msmadja commented 5 years ago

@sin-tanaka sure. I solved it.
My problem was wrong path of the images. I close this issue. Tnx for your help.