Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple notice on application submit #8

Open
quentin-mdn opened this issue May 12, 2023 · 6 comments
Open

Apple notice on application submit #8

quentin-mdn opened this issue May 12, 2023 · 6 comments

Comments

@quentin-mdn
Copy link

quentin-mdn commented May 12, 2023

Hello,

Everytime we submit an application with dynamic icons to Apple Store we receive the mail below from Apple (this is a non-blocking notice).

"
ITMS-90892: Missing recommended icon - The bundle does not contain an alternate app icon for iPad of exactly '167x167' pixels, in .png format for iOS versions supporting iPad Pro. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleicons

ITMS-90892: Missing recommended icon - The bundle does not contain an alternate app icon for iPad of exactly '152x152' pixels, in .png format for iOS versions >= 10.0. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleicons
"

@outsung
Copy link
Owner

outsung commented May 16, 2023

Hmm. Let me check

@Oladeji233
Copy link

Any updates on this ?

@jaks2002
Copy link

@outsung @Oladeji233
any update on this ?????

@Oladeji233
Copy link

No, unfortunately I had to hold on the feature.

@jaks2002
Copy link

jaks2002 commented Dec 18, 2023

I have found solution add this patch-package


diff --git a/node_modules/expo-dynamic-app-icon/plugin/build/withDynamicIcon.js b/node_modules/expo-dynamic-app-icon/plugin/build/withDynamicIcon.js
index a416495..61921e2 100644
--- a/node_modules/expo-dynamic-app-icon/plugin/build/withDynamicIcon.js
+++ b/node_modules/expo-dynamic-app-icon/plugin/build/withDynamicIcon.js
@@ -21,7 +21,9 @@ const androidFolderNames = [
 const androidSize = [162, 108, 216, 324, 432];
 const iosFolderName = "DynamicAppIcons";
 const iosSize = 60;
-const iosScales = [2, 3];
+const ipad152Scale = 2.53;
+const ipad167Scale = 2.78;
+const iosScales = [2, 3, ipad152Scale, ipad167Scale];
 function arrayToImages(images) {
     return images.reduce((prev, curr, i) => ({ ...prev, [i]: { image: curr } }), {});
 }
@@ -136,6 +138,12 @@ const withIconAndroidImages = (config, { icons }) => {
 function getIconName(name, size, scale) {
     const fileName = `${name}-Icon-${size}x${size}`;
     if (scale != null) {
+        if(scale == ipad152Scale){
+        return `${fileName}@2x~ipad.png`;
+        }
+        if(scale == ipad167Scale){
+        return `${fileName}@3x~ipad.png`;
+        }
         return `${fileName}@${scale}x.png`;
     }
     return fileName;
@@ -253,7 +261,7 @@ async function createIconsAsync(config, { icons }) {
             const iconFileName = getIconName(key, iosSize, scale);
             const fileName = path_1.default.join(iosFolderName, iconFileName);
             const outputPath = path_1.default.join(iosRoot, fileName);
-            const scaledSize = scale * iosSize;
+            const scaledSize = Math.ceil(scale * iosSize);
             const { source } = await (0, image_utils_1.generateImageAsync)({
                 projectRoot: config.modRequest.projectRoot,
                 cacheType: "react-native-dynamic-app-icon",
diff --git a/node_modules/expo-dynamic-app-icon/plugin/src/withDynamicIcon.ts b/node_modules/expo-dynamic-app-icon/plugin/src/withDynamicIcon.ts
index 35dffdd..b89016b 100644
--- a/node_modules/expo-dynamic-app-icon/plugin/src/withDynamicIcon.ts
+++ b/node_modules/expo-dynamic-app-icon/plugin/src/withDynamicIcon.ts
@@ -33,7 +33,9 @@ const androidSize = [162, 108, 216, 324, 432];
 
 const iosFolderName = "DynamicAppIcons";
 const iosSize = 60;
-const iosScales = [2, 3];
+const ipad152Scale = 2.53;
+const ipad167Scale = 2.78;
+const iosScales = [2, 3, ipad152Scale, ipad167Scale];
 
 type IconSet = Record<string, { image: string; prerendered?: boolean }>;
 
@@ -197,9 +199,16 @@ const withIconAndroidImages: ConfigPlugin<Props> = (config, { icons }) => {
 
 // for ios
 function getIconName(name: string, size: number, scale?: number) {
-  const fileName = `${name}-Icon-${size}x${size}`;
+  
+  const fileName = `${name}-Icon-$${size}x${size}`;
 
   if (scale != null) {
+    if(scale == ipad152Scale){
+      return `${fileName}@2x~ipad.png`;
+    }
+    if(scale == ipad167Scale){
+      return `${fileName}@3x~ipad.png`;
+    }
     return `${fileName}@${scale}x.png`;
   }
   return fileName;
@@ -361,7 +370,7 @@ async function createIconsAsync(
       const fileName = path.join(iosFolderName, iconFileName);
       const outputPath = path.join(iosRoot, fileName);
 
-      const scaledSize = scale * iosSize;
+      const scaledSize = Math.ceil(scale * iosSize);
       const { source } = await generateImageAsync(
         {
           projectRoot: config.modRequest.projectRoot,

@Giasinit
Copy link

@akshayF12 So this is the solution? You could make a pull request to apply it to everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants