bndkt / react-native-app-clip

Easily add an App Clip for iOS apps built with React Native
https://bndkt.com/blog/2022/react-native-app-clip
504 stars 25 forks source link

Assets are not added to the bundle #12

Open JeroenJochems opened 1 year ago

JeroenJochems commented 1 year ago

When compiling an app clip in xcode, some of my assets are not added, or are somehow unavailable in the app:

Error: Unable to download file: Error Domain-NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo-{NSErrorFailingURLStringKey-icomoon.ttf,NSErrorFailingURLKey=icomoon.ttf...

Screenshot 2023-03-15 at 09 11 30

When I switch to the normal app scheme, it does work without problems.

GarettRogers commented 1 year ago

I have the same issue when trying to load a font in my assets folder. It is trying to access the url:

https://127.0.0.1:8081/assets/assets/fonts/Pacifico-Regular.ttf?platform=ios&hash=.....

I'm not sure how things work under the hood, but it seems weird to me that the 'assets' is duplicated at the beginning of the url.

Fannolo commented 1 year ago

did anyone find a solution to this problem?

manlio16 commented 1 year ago

???

RobertSasak commented 1 year ago

I did few checks on simulator. Here are my findings:

outlandnish commented 1 year ago

@RobertSasak related to your findings about not supporting gRPC network calls, it looks like this is failing because App Clips don't support background download sessions.

The error I see in the logs is failed to create a background NSURLSessionDownloadTask, as remote session is unavailable. There's a relevant support question on the Apple Developer forums: https://developer.apple.com/forums/thread/669148