config-plugin-react-native-intercom icon indicating copy to clipboard operation
config-plugin-react-native-intercom copied to clipboard

Cannot destructure property 'iosApiKey' of 'props' as it is undefined.

Open DjordjePetrovic opened this issue 3 years ago • 4 comments

Getting -> Cannot destructure property 'iosApiKey' of 'props' as it is undefined.

With the latest version of the lib.

Installed with yarn add config-plugin-react-native-intercom // also tried expo install

added keys to app.json

and when I run the project lib complains about missing prop

UPDATE: it appears it won't read the config from app.json file, but if I added it inside app.config.js everything works fine

Thanks!

DjordjePetrovic avatar Jun 08 '22 10:06 DjordjePetrovic

Thanks for opening this, I'll take a look into it and see If I can find out more about the issue!

cmaycumber avatar Jun 08 '22 21:06 cmaycumber

Can you please tried with this I resolved using below code in app.json file. "plugins": [ [ "config-plugin-react-native-intercom", { "iosApiKey": "<Your Key>", "androidApiKey": "<Your Key>", "appId": "<App Id>", "iosPhotoUsageDescription": "Upload to support center" } ] ]

reena-amakein avatar Jun 15 '22 08:06 reena-amakein

@cmaycumber @DjordjePetrovic Hi, I tried to move the logic to the app.config.js but still got the same error as you have. Could you share your solution maybe? Thanks

AleksandarBisevac avatar Aug 02 '22 10:08 AleksandarBisevac

@DjordjePetrovic @AleksandarBisevac if it is still relevant could you please share your full plugins section(replacing keys) either from app.json or app.config.js?

enagorny avatar Mar 15 '23 22:03 enagorny