oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.46k stars 2.13k forks source link

"ITMS-90853: Invalid font" on TestFlight review #1658

Closed CreatlV closed 2 months ago

CreatlV commented 2 months ago

Environment

react-native-icons 10.1.0 react-native 0.73.2

Description

All new builds sent for external review on TestFlight are immediately auto rejected as an invalid binary with the error message: "ITMS-90853: Invalid font - There was a error validating the font named 'FontAwesome6Free-Solid' at '(package-name-here)/FontAwesome6_Solid.ttf'. 'glyf' table instructions."

Happy for any guidance on what could be causing this!

DKerpen commented 2 months ago

Having the same problem, fix would be appreciated :)

charway commented 2 months ago

same problem

JeevanPI commented 2 months ago

same problem

aliturab333 commented 2 months ago

Same Problem here, fix would be much appreciated :)

ITMS-90853: Invalid font - There was an error validating the font named 'FontAwesome6Free-Solid' at 'AppName.app/FontAwesome6_Solid.ttf'. ‘glyf’ table instructions.

CreatlV commented 2 months ago

We were not actually using FontAwesome6 so a workaround for us that appear to be passing the immediate testflight rejection was adding the following to the end of podfile post_install for every target.

resources_script_path = "#{Pod::Config.instance.installation_root}/Pods/Target Support Files/Pods-(AppName)/Pods-(AppName)-resources.sh"
    if File.exist?(resources_script_path)
      resources_content = File.read(resources_script_path)
      updated_content = resources_content.lines.reject { |line| line.include?('Fonts/FontAwesome6_') }.join
      File.open(resources_script_path, "w") { |file| file.puts updated_content }
      puts "Removed FontAwesome6 references"
    end
DKerpen commented 2 months ago

We don't need the FontAwesome, so I created a PatchPackage without it. Should help us for now.

aliturab333 commented 2 months ago

We don't need the FontAwesome, so I created a PatchPackage without it. Should help us for now.

Can you share that patch

DKerpen commented 2 months ago

We don't need the FontAwesome, so I created a PatchPackage without it. Should help us for now.

Can you share that patch

Delete the FontAwesome6-Files in node_modules/react-native-vector-icons/Fonts and then run "yarn patch-package react-native-vector-icons"

aliturab333 commented 2 months ago

We don't need the FontAwesome, so I created a PatchPackage without it. Should help us for now.

Can you share that patch

Delete the FontAwesome6-Files in node_modules/react-native-vector-icons/Fonts and then run "yarn patch-package react-native-vector-icons"

Thanks, and do I need to delete FontAwesome6 files from the node_module/react-native-vector-icons ? as there are aslo FontAwesome6 files outside the node_modules/react-native-vector-icons/Fonts folder

DKerpen commented 2 months ago

We don't need the FontAwesome, so I created a PatchPackage without it. Should help us for now.

Can you share that patch

Delete the FontAwesome6-Files in node_modules/react-native-vector-icons/Fonts and then run "yarn patch-package react-native-vector-icons"

Thanks, and do I need to delete FontAwesome6 files from the node_module/react-native-vector-icons ? as there are aslo FontAwesome6 files outside the node_modules/react-native-vector-icons/Fonts folder

Deleting the Files in the Fonts-Directory should be enough

JeevanPI commented 2 months ago

We don't need the FontAwesome, so I created a PatchPackage without it. Should help us for now.

Can you share that patch

Delete the FontAwesome6-Files in node_modules/react-native-vector-icons/Fonts and then run "yarn patch-package react-native-vector-icons"

Thanks, This solution fixed my issue.

aliturab333 commented 2 months ago

We don't need the FontAwesome, so I created a PatchPackage without it. Should help us for now.

Can you share that patch

Delete the FontAwesome6-Files in node_modules/react-native-vector-icons/Fonts and then run "yarn patch-package react-native-vector-icons"

Thanks, and do I need to delete FontAwesome6 files from the node_module/react-native-vector-icons ? as there are aslo FontAwesome6 files outside the node_modules/react-native-vector-icons/Fonts folder

Deleting the Files in the Fonts-Directory should be enough

Thanks, Issue resolved

RayHughes commented 2 months ago

This appears to be related to the new Font Menu functionality in iOS 18. I'm assuming things changed in the backend when the iPhone 16 was announced.

While we don't use this package, we do use font awesome.

blumk commented 2 months ago

Opening FontAwesome6_Solid.ttf on macOS shows the same error, you can manually fix the error and create a patch-package.

image
RayHughes commented 2 months ago

@blumk patching will remove FA, cause we depend on it.

blumk commented 2 months ago

@RayHughes You can simply replace the invalid FontAwesome6_Solid.ttf file with a fixed file and then create a patch-package (instead of deleting the file). FontAwesome6_Solid.ttf.zip

ben-edge commented 2 months ago

Same issue here - we are using the icons from FA6 so this is currently blocking us from uploading new builds.

iit2008047 commented 2 months ago

Same here .. can some one please update the font and release a version. Thanks again

1880akshay commented 2 months ago

Here is the PR fixing the ttf file: https://github.com/oblador/react-native-vector-icons/pull/1660

cvincentcoleman commented 2 months ago

Having this issue as well. Replacing with a patch package didn't work for me

blumk commented 2 months ago

@cvincentcoleman Try adding a postinstall step to copy/replace the font file using https://github.com/webextensions/copy-files-from-to

Example: package.json

  "postinstall": "npx --yes copy-files-from-to",
  "copyFiles": [
    {
      "from": "node_modules/react-native-vector-icons/Fonts/FontAwesome6_Regular.ttf",
      "to": "node_modules/react-native-vector-icons/Fonts/FontAwesome6_Solid.ttf"
    },
    {
      "from": "node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Regular.ttf",
      "to": "node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Solid.ttf"
    }
  ],
    "copyFilesSettings": {
    "whenFileExists": "overwrite"
  }
johnf commented 2 months ago

Thanks all, this has been fixed in #1658 and a release should roll out shortly

oblador commented 2 months ago

Released in 10.2.0.