facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.13k stars 24.2k forks source link

Asset validation failed #34070

Closed luan-nvg closed 2 years ago

luan-nvg commented 2 years ago

Description

Xcode 13

"react": "17.0.1", "react-native": "0.68.2",

I'm having problems uploading the project to apple, I've tried several solutions Note: for some reason the GENERAL tab in my project destination disappeared

Errors so far:

Asset validation failed (90023)
Missing required icon file. The bundle does not contain an 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/user_interface (ID: c2f8d801-e383-427d-a58e-c8b1e9895c25)

Asset validation failed (90704)
Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/. (ID: 51029efb-1bd3-422f-8817-e366402a69fa)

Asset validation failed (90022)
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: 1d7500a3-cbf2-4115-a849-997dfc09ca93)

Pod:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '15.5'

target 'my_project' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)

    installer.pods_project.targets.each do |target|
      if target.name == "React-Core.common-AccessibilityResources"
        target.remove_from_project
      end
    end

    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    `sed -i -e  $'s/__IPHONE_10_0/__IPHONE_15_5/' Pods/RCT-Folly/folly/portability/Time.h`

    copy_pods_resources_path = "Pods/Target Support Files/Pods-my_project/Pods-my_project-resources.sh"
    string_to_replace = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"'
    assets_compile_with_app_icon_arguments = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${BUILD_DIR}/assetcatalog_generated_info.plist"'
    text = File.read(copy_pods_resources_path)
    new_contents = text.gsub(string_to_replace, assets_compile_with_app_icon_arguments)
    File.open(copy_pods_resources_path, "w") {|file| file.puts new_contents }

  end

  target 'my_projectTests' do
    inherit! :complete
    # Pods for testing
  end

end

target 'my_project-tvOS' do
  # Pods for my_project-tvOS

  target 'my_project-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

target 'my_projectNotificationServiceExtension' do
  pod 'OneSignal', '>= 3.0', '< 4.0'
end

Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>XXXX</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIconName</key>
    <string>AppIcon</string>
    <key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconName</key>
            <string>AppIcon</string>
            <key>CFBundleIconFiles</key>
            <array>
                <string>20x20.png</string>
                <string>29x29.png</string>
                <string>40x40.png</string>
                <string>50x50.png</string>
                <string>57x57.png</string>
                <string>58x58.png</string>
                <string>60x60.png</string>
                <string>72x72.png</string>
                <string>76x76.png</string>
                <string>80x80.png</string>
                <string>87x87.png</string>
                <string>100x100.png</string>
                <string>114x114.png</string>
                <string>120x120.png</string>
                <string>144x144.png</string>
                <string>152x152.png</string>
                <string>167x167.png</string>
                <string>180x180.png</string>
                <string>1024x1024.png</string>
            </array>
            <key>UIPrerenderedIcon</key>
            <false/>
        </dict>
        <key>UINewsstandIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string></string>
            </array>
            <key>UINewsstandBindingType</key>
            <string>UINewsstandBindingTypeMagazine</string>
            <key>UINewsstandBindingEdge</key>
            <string>UINewsstandBindingEdgeLeft</string>
        </dict>
    </dict>
    <key>CFBundleIcons</key>
    <dict/>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(MARKETING_VERSION)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.googleusercontent.apps.703084581804-fumcmm3perbsbbf3trp6nub0p03g02kl</string>
            </array>
        </dict>
    </array>
    <key>CFBundleVersion</key>
    <string>$(CURRENT_PROJECT_VERSION)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
    <key>NSCameraUsageDescription</key>
    <string>The application allows you to capture a photo to use on your profile or in your rooms, using your camera.</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>The application records your location to more quickly notify you of message delivery.</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>The application allows you to capture a photo to use on your profile or in your rooms, using your gallery.</string>
    <key>UIAppFonts</key>
    <array>
        <string>Ionicons.ttf</string>
        <string>AntDesign.ttf</string>
        <string>Entypo.ttf</string>
        <string>EvilIcons.ttf</string>
        <string>Feather.ttf</string>
        <string>FontAwesome.ttf</string>
        <string>FontAwesome5_Brands.ttf</string>
        <string>FontAwesome5_Regular.ttf</string>
        <string>FontAwesome5_Solid.ttf</string>
        <string>Fontisto.ttf</string>
        <string>Foundation.ttf</string>
        <string>MaterialCommunityIcons.ttf</string>
        <string>MaterialIcons.ttf</string>
        <string>Octicons.ttf</string>
        <string>SimpleLineIcons.ttf</string>
        <string>Zocial.ttf</string>
        <string>ubuntu-bold.ttf</string>
        <string>ubuntu-medium-italic.ttf</string>
    </array>
    <key>UIBackgroundModes</key>
    <array>
        <string>remote-notification</string>
    </array>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UIRequiresFullScreen</key>
    <true/>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>XSAppIconAssets</key>
    <string>Media.xcassets/AppIcons.appiconset</string>
</dict>
</plist>

Version

0.68.2

Output of npx react-native info

info Fetching system and libraries information... System: OS: macOS 12.4 CPU: (8) x64 Intel Core 2 Duo P9xxx (Penryn Class Core 2) Memory: 787.92 MB / 7.91 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.15.1 - /usr/local/bin/node Yarn: Not Found npm: 7.24.2 - ~/Documents/my_project/node_modules/.bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.4/13F17a - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

go up to apple

Snack, code example, screenshot, or link to a repository

in the description

cortinico commented 2 years ago

Asset validation failed (90023) Missing required icon file. The bundle does not contain an 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/user_interface[](https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface) (ID: c2f8d801-e383-427d-a58e-c8b1e9895c25)

Asset validation failed (90704) Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/.[](https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/.) (ID: 51029efb-1bd3-422f-8817-e366402a69fa)

Asset validation failed (90022) 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[](https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface) (ID: 1d7500a3-cbf2-4115-a849-997dfc09ca93)

Have you provided the missing icons that are requested in this error message? Also this is not necessarily related to React Native

luan-nvg commented 2 years ago

Asset validation failed (90023) Missing required icon file. The bundle does not contain an 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/user_interface[](https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface) (ID: c2f8d801-e383-427d-a58e-c8b1e9895c25) Asset validation failed (90704) Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/.[](https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/.) (ID: 51029efb-1bd3-422f-8817-e366402a69fa) Asset validation failed (90022) 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[](https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface) (ID: 1d7500a3-cbf2-4115-a849-997dfc09ca93)

Have you provided the missing icons that are requested in this error message? Also this is not necessarily related to React Native

I provided yes, and I opened it here because in version 63 I didn't have this problem

cortinico commented 2 years ago

I provided yes, and I opened it here because in version 63 I didn't have this problem

I'm sorry but we're at RN 0.69 and we can't offer support for the RN version you're using as it's 2+ years old. I'd suggest to try against the latest version of RN and re-open if the issue persists

luan-nvg commented 2 years ago

I provided yes, and I opened it here because in version 63 I didn't have this problem

I'm sorry but we're at RN 0.69 and we can't offer support for the RN version you're using as it's 2+ years old. I'd suggest to try against the latest version of RN and re-open if the issue persists

Sorry, I have version 0.68.2 and I was opening the package-Json of an example project.