Skip to content

Commit

Permalink
feat(prebuild-config): add fallback image on ios to prevent submissio…
Browse files Browse the repository at this point in the history
…n failure (#27774)

# Why

If no `icon` is defined, such as in expo/examples, then the iOS build
submission will fail with:

```
[altool] 2024-03-19 18:22:24.315 *** Error: Asset validation failed Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, 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/user_interface (ID: b326a4c5-3bf5-4d80-95e4-e7fb608e285f) (90022)
```

Ref:
https://expo.dev/accounts/bacon/projects/mar19-test/submissions/830d9df0-224f-47b6-a187-ac8d10d8815c


<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

This PR mitigates the chance of failure by creating a full white icon of
1024x1024 when no icon is defined.


<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

Copied the resulting image in an app, built and submitted:

- Build details:
https://expo.dev/accounts/bacon/projects/mar19-test/builds/badd6130-c8c9-4286-a705-3c419b81eb79
- Submission details:
https://expo.dev/accounts/bacon/projects/mar19-test/submissions/c0fd6104-db9f-481f-98e5-541015ed6b12


<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
  • Loading branch information
EvanBacon and expo-bot committed Mar 23, 2024
1 parent 2f8e635 commit c51eda3
Show file tree
Hide file tree
Showing 19 changed files with 184 additions and 56 deletions.
2 changes: 2 additions & 0 deletions packages/@expo/cli/e2e/__tests__/prebuild-test.ts
Expand Up @@ -183,6 +183,7 @@ it(
"ios/Podfile.properties.json",
"ios/basicprebuild/AppDelegate.h",
"ios/basicprebuild/AppDelegate.mm",
"ios/basicprebuild/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png",
"ios/basicprebuild/Images.xcassets/AppIcon.appiconset/Contents.json",
"ios/basicprebuild/Images.xcassets/Contents.json",
"ios/basicprebuild/Images.xcassets/SplashScreenBackground.imageset/Contents.json",
Expand Down Expand Up @@ -296,6 +297,7 @@ it(
"ios/Podfile.properties.json",
"ios/githubtemplateprebuild/AppDelegate.h",
"ios/githubtemplateprebuild/AppDelegate.mm",
"ios/githubtemplateprebuild/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png",
"ios/githubtemplateprebuild/Images.xcassets/AppIcon.appiconset/Contents.json",
"ios/githubtemplateprebuild/Images.xcassets/Contents.json",
"ios/githubtemplateprebuild/Images.xcassets/SplashScreenBackground.imageset/Contents.json",
Expand Down
3 changes: 3 additions & 0 deletions packages/@expo/image-utils/CHANGELOG.md
Expand Up @@ -6,7 +6,10 @@

### 🎉 New features

- Expose `createSquareAsync` to generate a square image from a color. ([#27774](https://github.com/expo/expo/pull/27774) by [@EvanBacon](https://github.com/EvanBacon))

### 🐛 Bug fixes

- Fixed vulnerability with update semver from 7.5.3 to 7.5.4. ([#26876](https://github.com/expo/expo/pull/26876) by [@GaelCO](https://github.com/GaelCO))

### 💡 Others
Expand Down
4 changes: 2 additions & 2 deletions packages/@expo/image-utils/build/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/@expo/image-utils/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@expo/image-utils/build/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions packages/@expo/image-utils/build/jimp.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion packages/@expo/image-utils/build/jimp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@expo/image-utils/build/jimp.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c51eda3

Please sign in to comment.