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

Cannot use custom icons #1523

Open
2 tasks done
dusan-ivanco opened this issue Jul 17, 2023 · 6 comments
Open
2 tasks done

Cannot use custom icons #1523

dusan-ivanco opened this issue Jul 17, 2023 · 6 comments

Comments

@dusan-ivanco
Copy link

OS: macOS Ventura
Platform: iOS 16
react-native: 0.72.3
expo: 49 (installed as module in bare react native app
react-native-vector-icons: 10.0.0

Description

Until now, I have been using "Expo 45" and "React Native 0.68.2" in my application, and the use of a custom font was seamless. However, now I have tried to switch to "Expo 49" and "React Native 0.72.3" (clean install - not upgrade), but I am struggling with this error.

import {
  createIconSet
} from 'react-native-vector-icons';

const Icon = createIconSet(require('@/assets/fonts/Icon.json'), 'Icon', 'Icon.ttf');

export {
  Icon
};
Possible Unhandled Promise Rejection (id: 0):
Error: Unable to download file: Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSErrorFailingURLStringKey=Icon.ttf, NSErrorFailingURLKey=Icon.ttf, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "BackgroundDownloadTask <383A311B-B683-46ED-B733-8808E73F3228>.<4>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundDownloadTask <383A311B-B683-46ED-B733-8808E73F3228>.<4>, NSLocalizedDescription=unsupported URL}
Error: Unable to download file: Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSErrorFailingURLStringKey=Icon.ttf, NSErrorFailingURLKey=Icon.ttf, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "BackgroundDownloadTask <383A311B-B683-46ED-B733-8808E73F3228>.<4>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundDownloadTask <383A311B-B683-46ED-B733-8808E73F3228>.<4>, NSLocalizedDescription=unsupported URL}
    at construct (native)
    at apply (native)
    at _construct (http://10.1.1.1:8081/index.bundle//&platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=sk.my.app:4478:28)
    at Wrapper (http://10.1.1.1:8081/index.bundle//&platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=sk.my.app:4440:25)
    at construct (native)
    at _createSuperInternal (http://10.1.1.1:8081/index.bundle//&platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=sk.my.app:167347:322)
    at call (native)
    at CodedError (http://10.1.1.1:8081/index.bundle//&platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=sk.my.app:167360:26)

In Xcode, I have the font added in Resources and also in "Copy Bundle Resources". Just as an example, the "Montserrat font" that I use in react-native-paper works without any issues.
Snímka obrazovky 2023-07-17 o 19 50 06
Can you please help me?

@dusan-ivanco
Copy link
Author

Sorry - my Info.plist
Snímka obrazovky 2023-07-17 o 19 59 05

@mikehuebner
Copy link

mikehuebner commented Jul 19, 2023

Also seeing this one

Possible Unhandled Promise Rejection (id: 13):
Error: Unable to download file: Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSErrorFailingURLStringKey=remixicon.ttf, NSErrorFailingURLKey=remixicon.ttf, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "BackgroundDownloadTask <76AB4557-3D9F-4508-8452-CF9660A6F3D6>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundDownloadTask <76AB4557-3D9F-4508-8452-CF9660A6F3D6>.<1>, NSLocalizedDescription=unsupported URL}
 WARN  Sending `onInstallConversionDataLoaded` with no listeners registered.

@mikehuebner
Copy link

I got a fix for this, will post shortly.

@dpeek
Copy link

dpeek commented Jul 25, 2023

Having the same problem, fix would be appreciated :)

@matinzd
Copy link

matinzd commented Aug 11, 2023

Just moved the project to use Expo. Works fine without an issue on bare but broken on Expo.

@matinzd
Copy link

matinzd commented Aug 15, 2023

Please follow this pull request for more info: expo/vector-icons#267

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

4 participants