Means to set "missingDimensionStrategy"
complete
jameswilddev
Some libraries require that "missingDimensionStrategy" be set in the Gradle file, for example react-native-iap on Android requires this to pick either Google Play or Amazon's store.
I had a go at writing a config plugin for this but I'll be honest I don't know much about how any of this new stuff works and it just doesn't seem to do anything for me https://github.com/jameswilddev/missing-dimension-strategy-expo-config-plugin so perhaps something built by Expo themselves would be better
James Edmonston
jameswilddev FYI I was able to integrate
react-native-iap
by doing the following.Create
plugins/AndroidStrategies.js
in your project root, with the following contents:const { withAppBuildGradle } = require('@expo/config-plugins');
module.exports = function androidStrategiesPlugin(config) {
return withAppBuildGradle(config, (config) => {
config.modResults.contents +=
'android { defaultConfig { missingDimensionStrategy "store", "play" } }';
return config;
});
};
Add
'./plugins/AndroidStrategies.js',
to your app.json
's plugins
array.Brent Vatne
complete
Brent Vatne
this config plugin is quite simple: https://github.com/jameswilddev/missing-dimension-strategy-expo-config-plugin/blob/master/app.plugin.ts
install it and add "missing-dimension-strategy-expo-config-plugin" to your plugins in app.json, with any options you want to set on it. eg:
"plugins": [["missing-dimension-strategy-expo-config-plugin", { option: "value" }]]
. ideally libraries like react-native-iap would just provide a config plugin as needed for such properties. learn more about config plugins: https://docs.expo.dev/guides/config-plugins/