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
475 stars 22 forks source link

App Clip Not Installed in iOS 17.5 #41

Open MisterCommand opened 1 month ago

MisterCommand commented 1 month ago

After running expo run:ios and expo run:ios --scheme in the example application provided, the app clip does not appear on the home screen.

vishaljak commented 1 month ago

having the same issue

artem-alek commented 1 month ago

I thought i was doing something wrong...same here...the clip doesnt load or get added. no build issues

nahn20 commented 1 month ago

I've found that this happens after installing the real app. I've been working around this issue by wiping the device, but that's only a feasible solution when developing using the simulator.

vishaljak commented 1 month ago

can you list the steps for the workaround please? @nahn20

nahn20 commented 1 month ago

can you list the steps for the workaround please? @nahn20

  1. Open the app clip in the iOS Simulator
  2. In the Simulator menu: Device -> Erase All Content and Settings

In theory you could also wipe your real device, but I don't think that's a feasible solution. I'd only recommend using a throwaway Simulator.

artem-alek commented 1 month ago

I've found that this happens after installing the real app. I've been working around this issue by wiping the device, but that's only a feasible solution when developing using the simulator.

are you saying that when i run npx expo run:ios and it installs the full app on the simulator, i have to

  1. Delete the real app from the simulator
  2. run npx expo run:ios --schema (select app clip)

this then will work?

nahn20 commented 1 month ago

I've found that this happens after installing the real app. I've been working around this issue by wiping the device, but that's only a feasible solution when developing using the simulator.

are you saying that when i run npx expo run:ios and it installs the full app on the simulator, i have to

1. Delete the real app from the simulator

2. run npx expo run:ios --schema (select app clip)

this then will work?

I'm saying that whenever you install the full app on the simulator you have to erase all the data from the simulator to get it working again. It's not an elegant solution, but it only takes a few seconds and means that you can test app clip again on a fresh device.

artem-alek commented 1 month ago

I've found that this happens after installing the real app. I've been working around this issue by wiping the device, but that's only a feasible solution when developing using the simulator.

are you saying that when i run npx expo run:ios and it installs the full app on the simulator, i have to

1. Delete the real app from the simulator

2. run npx expo run:ios --schema (select app clip)

this then will work?

I'm saying that whenever you install the full app on the simulator you have to erase all the data from the simulator to get it working again. It's not an elegant solution, but it only takes a few seconds and means that you can test app clip again on a fresh device.

I cant get the app clip to work at all.

When i erase all contents and then run npx expo run:ios --schema appClip

I get an error where the URL is not found.

CommandError: Device has no app to handle the URI: .......://expo-development-client/?url=http%3A%2F%2F192.168.182.209%3A8081

nahn20 commented 1 month ago

I've found that this happens after installing the real app. I've been working around this issue by wiping the device, but that's only a feasible solution when developing using the simulator.

are you saying that when i run npx expo run:ios and it installs the full app on the simulator, i have to

1. Delete the real app from the simulator

2. run npx expo run:ios --schema (select app clip)

this then will work?

I'm saying that whenever you install the full app on the simulator you have to erase all the data from the simulator to get it working again. It's not an elegant solution, but it only takes a few seconds and means that you can test app clip again on a fresh device.

I cant get the app clip to work at all.

When i erase all contents and then run npx expo run:ios --schema appClip

I get an error where the URL is not found.

CommandError: Device has no app to handle the URI: .......://expo-development-client/?url=http%3A%2F%2F192.168.182.209%3A8081

That's because Expo is trying to open your main app, not the app clip. I get this issue every time too. It's slightly less convenient, but you can just open the app manually.

artem-alek commented 1 month ago

I've found that this happens after installing the real app. I've been working around this issue by wiping the device, but that's only a feasible solution when developing using the simulator.

are you saying that when i run npx expo run:ios and it installs the full app on the simulator, i have to

1. Delete the real app from the simulator

2. run npx expo run:ios --schema (select app clip)

this then will work?

I'm saying that whenever you install the full app on the simulator you have to erase all the data from the simulator to get it working again. It's not an elegant solution, but it only takes a few seconds and means that you can test app clip again on a fresh device.

I cant get the app clip to work at all. When i erase all contents and then run npx expo run:ios --schema appClip I get an error where the URL is not found. CommandError: Device has no app to handle the URI: .......://expo-development-client/?url=http%3A%2F%2F192.168.182.209%3A8081

That's because Expo is trying to open your main app, not the app clip. I get this issue every time too. It's slightly less convenient, but you can just open the app manually.

Im not a big expert on how to do that manually? I run npx expo run:ios --schema clipApp and it loads with not problem but then it opens the main app and isClip() is always false. I am using tabs as my root as well.

nahn20 commented 1 month ago

I've found that this happens after installing the real app. I've been working around this issue by wiping the device, but that's only a feasible solution when developing using the simulator.

are you saying that when i run npx expo run:ios and it installs the full app on the simulator, i have to

1. Delete the real app from the simulator

2. run npx expo run:ios --schema (select app clip)

this then will work?

I'm saying that whenever you install the full app on the simulator you have to erase all the data from the simulator to get it working again. It's not an elegant solution, but it only takes a few seconds and means that you can test app clip again on a fresh device.

I cant get the app clip to work at all. When i erase all contents and then run npx expo run:ios --schema appClip I get an error where the URL is not found. CommandError: Device has no app to handle the URI: .......://expo-development-client/?url=http%3A%2F%2F192.168.182.209%3A8081

That's because Expo is trying to open your main app, not the app clip. I get this issue every time too. It's slightly less convenient, but you can just open the app manually.

Im not a big expert on how to do that manually? I run npx expo run:ios --schema clipApp and it loads with not problem but then it opens the main app and isClip() is always false. I am using tabs as my root as well.

App clips don't currently open automatically. You need it to show up on your home screen (which is what this issue thread is for!). Once it shows up on your home screen, you can just click on it to run your app clip.

If your app clip is not showing up on your home screen in 17.5, it's likely because you previously installed the main app. In this case, you can solve the issue by starting with a fresh device (I would recommend running app clip in simulator and using Device -> Erase All Content and Settings whenever this issue happens). Deleting the main app does not fix this issue. You need to restart with a fresh device that has no memory of the main app ever being installed.

As far as I can tell, this is not an issue in TestFlight. Once I've tested the app clip in simulator (where I can comfortably erase all content), I then create a TestFlight build to test on a real device.

artem-alek commented 1 month ago

I've found that this happens after installing the real app. I've been working around this issue by wiping the device, but that's only a feasible solution when developing using the simulator.

are you saying that when i run npx expo run:ios and it installs the full app on the simulator, i have to

1. Delete the real app from the simulator

2. run npx expo run:ios --schema (select app clip)

this then will work?

I'm saying that whenever you install the full app on the simulator you have to erase all the data from the simulator to get it working again. It's not an elegant solution, but it only takes a few seconds and means that you can test app clip again on a fresh device.

I cant get the app clip to work at all. When i erase all contents and then run npx expo run:ios --schema appClip I get an error where the URL is not found. CommandError: Device has no app to handle the URI: .......://expo-development-client/?url=http%3A%2F%2F192.168.182.209%3A8081

That's because Expo is trying to open your main app, not the app clip. I get this issue every time too. It's slightly less convenient, but you can just open the app manually.

Im not a big expert on how to do that manually? I run npx expo run:ios --schema clipApp and it loads with not problem but then it opens the main app and isClip() is always false. I am using tabs as my root as well.

App clips don't currently open automatically. You need it to show up on your home screen (which is what this issue thread is for!). Once it shows up on your home screen, you can just click on it to run your app clip.

If your app clip is not showing up on your home screen in 17.5, it's likely because you previously installed the main app. In this case, you can solve the issue by starting with a fresh device (I would recommend running app clip in simulator and using Device -> Erase All Content and Settings whenever this issue happens). Deleting the main app does not fix this issue. You need to restart with a fresh device that has no memory of the main app ever being installed.

As far as I can tell, this is not an issue in TestFlight. Once I've tested the app clip in simulator (where I can comfortably erase all content), I then create a TestFlight build to test on a real device.

Thank you for a detailed explanation. I remember seeing a app clip on my simulator once then never again after i deleted it and its been days of attempts to make it work. I will try your method.

artem-alek commented 1 month ago

I've found that this happens after installing the real app. I've been working around this issue by wiping the device, but that's only a feasible solution when developing using the simulator.

are you saying that when i run npx expo run:ios and it installs the full app on the simulator, i have to

1. Delete the real app from the simulator

2. run npx expo run:ios --schema (select app clip)

this then will work?

I'm saying that whenever you install the full app on the simulator you have to erase all the data from the simulator to get it working again. It's not an elegant solution, but it only takes a few seconds and means that you can test app clip again on a fresh device.

I cant get the app clip to work at all. When i erase all contents and then run npx expo run:ios --schema appClip I get an error where the URL is not found. CommandError: Device has no app to handle the URI: .......://expo-development-client/?url=http%3A%2F%2F192.168.182.209%3A8081

That's because Expo is trying to open your main app, not the app clip. I get this issue every time too. It's slightly less convenient, but you can just open the app manually.

Im not a big expert on how to do that manually? I run npx expo run:ios --schema clipApp and it loads with not problem but then it opens the main app and isClip() is always false. I am using tabs as my root as well.

App clips don't currently open automatically. You need it to show up on your home screen (which is what this issue thread is for!). Once it shows up on your home screen, you can just click on it to run your app clip. If your app clip is not showing up on your home screen in 17.5, it's likely because you previously installed the main app. In this case, you can solve the issue by starting with a fresh device (I would recommend running app clip in simulator and using Device -> Erase All Content and Settings whenever this issue happens). Deleting the main app does not fix this issue. You need to restart with a fresh device that has no memory of the main app ever being installed. As far as I can tell, this is not an issue in TestFlight. Once I've tested the app clip in simulator (where I can comfortably erase all content), I then create a TestFlight build to test on a real device.

Thank you for a detailed explanation. I remember seeing a app clip on my simulator once then never again after i deleted it and its been days of attempts to make it work. I will try your method.

My biggest problem is i cant see the clip installed on the device even after restart. but I am not using dev-client but just run:ios on simulator.

artem-alek commented 1 month ago

any fix for this any time soon?

axelv71 commented 1 day ago

I have the same problem as you, I can't see the App Clip on the home page. However, I can see it in Settings>App Extract. But I can't launch it.

Has anyone figured out how to solve this bug?

vishaljak commented 23 hours ago

It was not working on the simulator but I got it to work on a real device.

Just double check the invocation link for the app clip from your phone's developer settings (local experiences)

bndkt commented 17 hours ago

Hello all, sorry I didn't have time to focus on this library in the past weeks. I'm just catching up now. Can confirm that I have the same problem and even wiping the Simulator device doesn't help. I also notices that in a 17.5 simulator, the "Local Experience" menu within developer settings is gone, which is Apple's recommended way of testing App Clips (https://developer.apple.com/documentation/appclip/testing-the-launch-experience-of-your-app-clip#Test-invocations-with-a-local-experience).

I'll continue to investigate but am inclined to wait until iOS 18 is out on Monday and then see how it goes with the new Simulator, as Apple keeps changing things ...