To run and test this project locally, you will need to change your project's package name/bundle identifier. You can set your own package name/bundle identifier in the app.json
.
Go to your AppsFlyer account and create an iOS or Android app(or both). Learn more here.
- Go to
components/AppsFlyer/InitializeSDKHandler.js
. - Change the
devKey
to your key. - If you are using an iOS app, add your
appID
. Else, do not change it.
- We want to create a link that will add an item to the users' grocery list once they will click it.
- Create a OneLink template. Learn more here.
- Create a new OneLink custom link.
- In the new link:
- Set the
deep link value
to your desired category('Vegetables', 'Fruits', etc. Full categories options are inlocal_data/Categories.json
). - Under the Additional Parameters section, add a custom parameter name
deep_link_sub1
with an Item from the category above(Full items options are inlocal_data/Categories.json
). - Add another custom parameter name
deep_link_sub2
and set it to the units mode of the item(true
for units,false
for kilograms). - Add another custom parameter name
deep_link_sub3
and set it to the quantity of the item.
- Set the
- Copy your template subdomain(with the extension
.onelink.me
). - Go to
app.json
- For Android - paste it into the
"host"
key, and add yourtemplate ID
to the"pathPrefix"
key. - For iOS - add the subdomain to the
"associatedDomains"
key.
- Go to
components/AppsFlyer/UserInviteHandler.js
. - Copy your custom template ID and paste it here.
We highly recommend running and testing your app on a real iOS or Android device(and not a simulated one).
- Now that your app is running, click the link and see your DeepLink item in the
Modal
window. - If you accept the item, it will automatically be added to your list.
- You can send an item to a friend using the Share screen, and generate your own links.