discussions-and-proposals icon indicating copy to clipboard operation
discussions-and-proposals copied to clipboard

Support for iOS 14 App Clip

Open vrgimael opened this issue 4 years ago • 9 comments

Introduction

Well, this is pretty self explanatory, someone is gonna have to start this thread.

As most of you are probably aware now, Apple just released the App Clip feature, allowing users to use part of an app without downloading it.

This seems like a very cool feature that could get implemented quite widely in apps as a form of "trial" before downloading, so it would be great to have it working seamlessly with RN if possible.

Discussion points

The App Clip is of course a very native feature as of now, and is designed to run a piece of iOS code.

So the questions really are:

  • How could a RN app possibly make use of the App Clip?
  • Could we ever run RN in the App Clip without installing the whole thing?
  • Any thoughts about this feature so far?

vrgimael avatar Jun 24 '20 15:06 vrgimael

Useful links for this discussion: https://reactnative.dev/docs/app-extensions

https://developer.apple.com/app-clips/

https://developer.apple.com/documentation/app_clips

Worth noting that App Clips must be less than 10mb in size - we should profile how small a barebones RN app would be

I’m unclear if they also have a memory limit, similar to Today Extensions (see first link from React Native links, which says Today Extensions have a memory limit of 16mb which can be difficult for RN to stay under)

SRandazzo avatar Jun 24 '20 18:06 SRandazzo

This would be really cool. Not sure if this is something I should add here but android instant apps could be a nice addition as it provides something similar.

In terms of file size I'm thinking expo would also need a different approach. Again, not sure if this is useful to bring up here.

Finally, I read somewhere that it can be a separate app, but it needs to be in the same archive. Wouldn't that mean that a "RN lite" of sorts could do the trick, and then the only other thing needed is an approach to bundle the archive? These apps can be smaller because the features you're supposed to build with them are limited anyway.

My first thought would be utilities for basic clips with good instructions.

RWOverdijk avatar Jun 24 '20 18:06 RWOverdijk

I made POC of App Clip with RN. Please share your thought :) https://medium.com/@nazrdogan/create-app-clips-for-ios-14-in-react-native-abfade233fea https://github.com/nazrdogan/ReactNativeAppClips

nazrdogan avatar Jun 30 '20 01:06 nazrdogan

That looks quite promising @nazrdogan , well done! Can't wait to see more about App Clips and Widgets (#250)

chmiiller avatar Sep 15 '20 12:09 chmiiller

our parent app has firebase configured, when building appclip target with inherit! :complete, the appclip builds fine, but receives an error that firebase not configured, unrecognized selector sent. We do not want to register firebase for appclip. Is there anyway to only include react-native required pods in appclip?

dftaher avatar Nov 23 '20 14:11 dftaher

@dftaher instead of inherit you can just specify required pod in app clip target. https://gist.github.com/nazrdogan/a15d7fc6925d685ccd0d27eddfe4147b you can even remove unnecessary things

nazrdogan avatar Nov 23 '20 16:11 nazrdogan

So is it a good solution to have a separate project for the app clip / instant app? Did anyone tried this and succeeded? How will you upload it on the stores?

mustvlad avatar Jul 13 '21 12:07 mustvlad

I have created App-Clip taken reference from @nazrdogan. It does work pretty well in Simulator.
But when I developed with the Physical Device the Hot Reload / Hot Refresh is not working, as content is not reflecting the changes.

The device and mac both are connected to the same WiFi Network. I have to manually reload every time by shaking the device and selecting reload from the debugger menu.

I don't know is this the right place to ask for this.

This Video is from Simulator https://user-images.githubusercontent.com/73235572/159864348-11070db8-e735-454a-8c9d-56a7a5fa7ce4.mp4

This is from the Actual Device

https://user-images.githubusercontent.com/73235572/159865127-3d5ec252-514d-41f5-b4d7-98c5de072482.mp4

kieran-Collins avatar Mar 24 '22 07:03 kieran-Collins

@nazrdogan Hey i read your article , followed the steps and got app-clips integrated , well done and thank you

@dftaher Hey , did you manage to fix this , i am working on App clips and having the same issue. If you get it resolved please share the process.

punittttt avatar May 17 '22 20:05 punittttt