react-native-google-mobile-ads 15.3.0 → 15.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- const version = exports.version = '15.3.0';
8
+ const version = exports.version = '15.3.1';
9
9
  //# sourceMappingURL=version.js.map
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '15.3.0';
2
+ export const version = '15.3.1';
3
3
  //# sourceMappingURL=version.js.map
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "15.3.0";
1
+ export declare const SDK_VERSION = "15.3.1";
2
2
  export { default, MobileAds } from './MobileAds';
3
3
  export { AdsConsentDebugGeography, AdsConsentInfo, AdsConsentInfoOptions, AdsConsentInterface, AdsConsentPrivacyOptionsRequirementStatus, AdsConsentStatus, AdsConsentUserChoices, } from './specs/modules/NativeConsentModule';
4
4
  export { AdsConsentPurposes } from './AdsConsentPurposes';
@@ -1,2 +1,2 @@
1
- export declare const version = "15.3.0";
1
+ export declare const version = "15.3.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-mobile-ads",
3
- "version": "15.3.0",
3
+ "version": "15.3.1",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Google Mobile Ads is an easy way to monetize mobile apps with targeted, in-app advertising.",
6
6
  "main": "lib/commonjs/index.js",
@@ -123,6 +123,129 @@ exports[`Expo Config Plugin Tests Should modify AndroidManifest.xml 3`] = `
123
123
  </manifest>"
124
124
  `;
125
125
 
126
+ exports[`Expo Config Plugin Tests Should modify AndroidManifest.xml idempotently 1`] = `
127
+ "<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example" xmlns:tools="http://schemas.android.com/tools">
128
+ <uses-permission android:name="android.permission.INTERNET"/>
129
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
130
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
131
+ <uses-permission android:name="android.permission.VIBRATE"/>
132
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
133
+ <queries>
134
+ <intent>
135
+ <action android:name="android.intent.action.VIEW"/>
136
+ <category android:name="android.intent.category.BROWSABLE"/>
137
+ <data android:scheme="https"/>
138
+ </intent>
139
+ </queries>
140
+ <application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
141
+ <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="TestAppId" tools:replace="android:value"/>
142
+ <meta-data android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT" android:value="true" tools:replace="android:value"/>
143
+ <meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING" android:value="true" tools:replace="android:value"/>
144
+ <meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION" android:value="true" tools:replace="android:value"/>
145
+ <meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
146
+ <meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="47.0.0"/>
147
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
148
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
149
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@anonymous/example"/>
150
+ <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true">
151
+ <intent-filter>
152
+ <action android:name="android.intent.action.MAIN"/>
153
+ <category android:name="android.intent.category.LAUNCHER"/>
154
+ </intent-filter>
155
+ <intent-filter>
156
+ <action android:name="android.intent.action.VIEW"/>
157
+ <category android:name="android.intent.category.DEFAULT"/>
158
+ <category android:name="android.intent.category.BROWSABLE"/>
159
+ <data android:scheme="com.example"/>
160
+ </intent-filter>
161
+ </activity>
162
+ <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
163
+ </application>
164
+ </manifest>"
165
+ `;
166
+
167
+ exports[`Expo Config Plugin Tests Should modify AndroidManifest.xml idempotently 2`] = `
168
+ "<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example" xmlns:tools="http://schemas.android.com/tools">
169
+ <uses-permission android:name="android.permission.INTERNET"/>
170
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
171
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
172
+ <uses-permission android:name="android.permission.VIBRATE"/>
173
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
174
+ <queries>
175
+ <intent>
176
+ <action android:name="android.intent.action.VIEW"/>
177
+ <category android:name="android.intent.category.BROWSABLE"/>
178
+ <data android:scheme="https"/>
179
+ </intent>
180
+ </queries>
181
+ <application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
182
+ <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="TestAppId" tools:replace="android:value"/>
183
+ <meta-data android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT" android:value="true" tools:replace="android:value"/>
184
+ <meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING" android:value="true" tools:replace="android:value"/>
185
+ <meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION" android:value="true" tools:replace="android:value"/>
186
+ <meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
187
+ <meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="47.0.0"/>
188
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
189
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
190
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@anonymous/example"/>
191
+ <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true">
192
+ <intent-filter>
193
+ <action android:name="android.intent.action.MAIN"/>
194
+ <category android:name="android.intent.category.LAUNCHER"/>
195
+ </intent-filter>
196
+ <intent-filter>
197
+ <action android:name="android.intent.action.VIEW"/>
198
+ <category android:name="android.intent.category.DEFAULT"/>
199
+ <category android:name="android.intent.category.BROWSABLE"/>
200
+ <data android:scheme="com.example"/>
201
+ </intent-filter>
202
+ </activity>
203
+ <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
204
+ </application>
205
+ </manifest>"
206
+ `;
207
+
208
+ exports[`Expo Config Plugin Tests Should modify AndroidManifest.xml idempotently 3`] = `
209
+ "<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example" xmlns:tools="http://schemas.android.com/tools">
210
+ <uses-permission android:name="android.permission.INTERNET"/>
211
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
212
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
213
+ <uses-permission android:name="android.permission.VIBRATE"/>
214
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
215
+ <queries>
216
+ <intent>
217
+ <action android:name="android.intent.action.VIEW"/>
218
+ <category android:name="android.intent.category.BROWSABLE"/>
219
+ <data android:scheme="https"/>
220
+ </intent>
221
+ </queries>
222
+ <application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
223
+ <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="TestAppId" tools:replace="android:value"/>
224
+ <meta-data android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT" android:value="true" tools:replace="android:value"/>
225
+ <meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING" android:value="true" tools:replace="android:value"/>
226
+ <meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION" android:value="true" tools:replace="android:value"/>
227
+ <meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
228
+ <meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="47.0.0"/>
229
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
230
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
231
+ <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@anonymous/example"/>
232
+ <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true">
233
+ <intent-filter>
234
+ <action android:name="android.intent.action.MAIN"/>
235
+ <category android:name="android.intent.category.LAUNCHER"/>
236
+ </intent-filter>
237
+ <intent-filter>
238
+ <action android:name="android.intent.action.VIEW"/>
239
+ <category android:name="android.intent.category.DEFAULT"/>
240
+ <category android:name="android.intent.category.BROWSABLE"/>
241
+ <data android:scheme="com.example"/>
242
+ </intent-filter>
243
+ </activity>
244
+ <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
245
+ </application>
246
+ </manifest>"
247
+ `;
248
+
126
249
  exports[`Expo Config Plugin Tests Should modify Info.plist 1`] = `
127
250
  "<?xml version="1.0" encoding="UTF-8"?>
128
251
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -416,3 +539,297 @@ exports[`Expo Config Plugin Tests Should modify Info.plist 3`] = `
416
539
  </dict>
417
540
  </plist>"
418
541
  `;
542
+
543
+ exports[`Expo Config Plugin Tests Should modify Info.plist idempotently 1`] = `
544
+ "<?xml version="1.0" encoding="UTF-8"?>
545
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
546
+ <plist version="1.0">
547
+ <dict>
548
+ <key>CFBundleDevelopmentRegion</key>
549
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
550
+ <key>CFBundleDisplayName</key>
551
+ <string>example</string>
552
+ <key>CFBundleExecutable</key>
553
+ <string>$(EXECUTABLE_NAME)</string>
554
+ <key>CFBundleIdentifier</key>
555
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
556
+ <key>CFBundleInfoDictionaryVersion</key>
557
+ <string>6.0</string>
558
+ <key>CFBundleName</key>
559
+ <string>$(PRODUCT_NAME)</string>
560
+ <key>CFBundlePackageType</key>
561
+ <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
562
+ <key>CFBundleShortVersionString</key>
563
+ <string>1.0.0</string>
564
+ <key>CFBundleSignature</key>
565
+ <string>????</string>
566
+ <key>CFBundleURLTypes</key>
567
+ <array>
568
+ <dict>
569
+ <key>CFBundleURLSchemes</key>
570
+ <array>
571
+ <string>com.example</string>
572
+ </array>
573
+ </dict>
574
+ </array>
575
+ <key>CFBundleVersion</key>
576
+ <string>1</string>
577
+ <key>GADApplicationIdentifier</key>
578
+ <string>TestIosId</string>
579
+ <key>GADDelayAppMeasurementInit</key>
580
+ <true/>
581
+ <key>LSRequiresIPhoneOS</key>
582
+ <true/>
583
+ <key>NSAppTransportSecurity</key>
584
+ <dict>
585
+ <key>NSAllowsArbitraryLoads</key>
586
+ <true/>
587
+ <key>NSExceptionDomains</key>
588
+ <dict>
589
+ <key>localhost</key>
590
+ <dict>
591
+ <key>NSExceptionAllowsInsecureHTTPLoads</key>
592
+ <true/>
593
+ </dict>
594
+ </dict>
595
+ </dict>
596
+ <key>NSUserTrackingUsageDescription</key>
597
+ <string>TestUserTrackingUsageDescription</string>
598
+ <key>SKAdNetworkItems</key>
599
+ <array>
600
+ <dict>
601
+ <key>SKAdNetworkIdentifier</key>
602
+ <string>TestSkAdNetworkItem1</string>
603
+ </dict>
604
+ <dict>
605
+ <key>SKAdNetworkIdentifier</key>
606
+ <string>TestSkAdNetworkItem2</string>
607
+ </dict>
608
+ </array>
609
+ <key>UILaunchStoryboardName</key>
610
+ <string>SplashScreen</string>
611
+ <key>UIRequiredDeviceCapabilities</key>
612
+ <array>
613
+ <string>armv7</string>
614
+ </array>
615
+ <key>UIRequiresFullScreen</key>
616
+ <false/>
617
+ <key>UIStatusBarStyle</key>
618
+ <string>UIStatusBarStyleDefault</string>
619
+ <key>UISupportedInterfaceOrientations</key>
620
+ <array>
621
+ <string>UIInterfaceOrientationPortrait</string>
622
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
623
+ <string>UIInterfaceOrientationLandscapeLeft</string>
624
+ <string>UIInterfaceOrientationLandscapeRight</string>
625
+ </array>
626
+ <key>UISupportedInterfaceOrientations~ipad</key>
627
+ <array>
628
+ <string>UIInterfaceOrientationPortrait</string>
629
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
630
+ <string>UIInterfaceOrientationLandscapeLeft</string>
631
+ <string>UIInterfaceOrientationLandscapeRight</string>
632
+ </array>
633
+ <key>UIUserInterfaceStyle</key>
634
+ <string>Light</string>
635
+ <key>UIViewControllerBasedStatusBarAppearance</key>
636
+ <false/>
637
+ </dict>
638
+ </plist>"
639
+ `;
640
+
641
+ exports[`Expo Config Plugin Tests Should modify Info.plist idempotently 2`] = `
642
+ "<?xml version="1.0" encoding="UTF-8"?>
643
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
644
+ <plist version="1.0">
645
+ <dict>
646
+ <key>CFBundleDevelopmentRegion</key>
647
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
648
+ <key>CFBundleDisplayName</key>
649
+ <string>example</string>
650
+ <key>CFBundleExecutable</key>
651
+ <string>$(EXECUTABLE_NAME)</string>
652
+ <key>CFBundleIdentifier</key>
653
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
654
+ <key>CFBundleInfoDictionaryVersion</key>
655
+ <string>6.0</string>
656
+ <key>CFBundleName</key>
657
+ <string>$(PRODUCT_NAME)</string>
658
+ <key>CFBundlePackageType</key>
659
+ <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
660
+ <key>CFBundleShortVersionString</key>
661
+ <string>1.0.0</string>
662
+ <key>CFBundleSignature</key>
663
+ <string>????</string>
664
+ <key>CFBundleURLTypes</key>
665
+ <array>
666
+ <dict>
667
+ <key>CFBundleURLSchemes</key>
668
+ <array>
669
+ <string>com.example</string>
670
+ </array>
671
+ </dict>
672
+ </array>
673
+ <key>CFBundleVersion</key>
674
+ <string>1</string>
675
+ <key>GADApplicationIdentifier</key>
676
+ <string>TestIosId</string>
677
+ <key>GADDelayAppMeasurementInit</key>
678
+ <true/>
679
+ <key>LSRequiresIPhoneOS</key>
680
+ <true/>
681
+ <key>NSAppTransportSecurity</key>
682
+ <dict>
683
+ <key>NSAllowsArbitraryLoads</key>
684
+ <true/>
685
+ <key>NSExceptionDomains</key>
686
+ <dict>
687
+ <key>localhost</key>
688
+ <dict>
689
+ <key>NSExceptionAllowsInsecureHTTPLoads</key>
690
+ <true/>
691
+ </dict>
692
+ </dict>
693
+ </dict>
694
+ <key>NSUserTrackingUsageDescription</key>
695
+ <string>TestUserTrackingUsageDescription</string>
696
+ <key>SKAdNetworkItems</key>
697
+ <array>
698
+ <dict>
699
+ <key>SKAdNetworkIdentifier</key>
700
+ <string>TestSkAdNetworkItem1</string>
701
+ </dict>
702
+ <dict>
703
+ <key>SKAdNetworkIdentifier</key>
704
+ <string>TestSkAdNetworkItem2</string>
705
+ </dict>
706
+ </array>
707
+ <key>UILaunchStoryboardName</key>
708
+ <string>SplashScreen</string>
709
+ <key>UIRequiredDeviceCapabilities</key>
710
+ <array>
711
+ <string>armv7</string>
712
+ </array>
713
+ <key>UIRequiresFullScreen</key>
714
+ <false/>
715
+ <key>UIStatusBarStyle</key>
716
+ <string>UIStatusBarStyleDefault</string>
717
+ <key>UISupportedInterfaceOrientations</key>
718
+ <array>
719
+ <string>UIInterfaceOrientationPortrait</string>
720
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
721
+ <string>UIInterfaceOrientationLandscapeLeft</string>
722
+ <string>UIInterfaceOrientationLandscapeRight</string>
723
+ </array>
724
+ <key>UISupportedInterfaceOrientations~ipad</key>
725
+ <array>
726
+ <string>UIInterfaceOrientationPortrait</string>
727
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
728
+ <string>UIInterfaceOrientationLandscapeLeft</string>
729
+ <string>UIInterfaceOrientationLandscapeRight</string>
730
+ </array>
731
+ <key>UIUserInterfaceStyle</key>
732
+ <string>Light</string>
733
+ <key>UIViewControllerBasedStatusBarAppearance</key>
734
+ <false/>
735
+ </dict>
736
+ </plist>"
737
+ `;
738
+
739
+ exports[`Expo Config Plugin Tests Should modify Info.plist idempotently 3`] = `
740
+ "<?xml version="1.0" encoding="UTF-8"?>
741
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
742
+ <plist version="1.0">
743
+ <dict>
744
+ <key>CFBundleDevelopmentRegion</key>
745
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
746
+ <key>CFBundleDisplayName</key>
747
+ <string>example</string>
748
+ <key>CFBundleExecutable</key>
749
+ <string>$(EXECUTABLE_NAME)</string>
750
+ <key>CFBundleIdentifier</key>
751
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
752
+ <key>CFBundleInfoDictionaryVersion</key>
753
+ <string>6.0</string>
754
+ <key>CFBundleName</key>
755
+ <string>$(PRODUCT_NAME)</string>
756
+ <key>CFBundlePackageType</key>
757
+ <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
758
+ <key>CFBundleShortVersionString</key>
759
+ <string>1.0.0</string>
760
+ <key>CFBundleSignature</key>
761
+ <string>????</string>
762
+ <key>CFBundleURLTypes</key>
763
+ <array>
764
+ <dict>
765
+ <key>CFBundleURLSchemes</key>
766
+ <array>
767
+ <string>com.example</string>
768
+ </array>
769
+ </dict>
770
+ </array>
771
+ <key>CFBundleVersion</key>
772
+ <string>1</string>
773
+ <key>GADApplicationIdentifier</key>
774
+ <string>TestIosId</string>
775
+ <key>GADDelayAppMeasurementInit</key>
776
+ <true/>
777
+ <key>LSRequiresIPhoneOS</key>
778
+ <true/>
779
+ <key>NSAppTransportSecurity</key>
780
+ <dict>
781
+ <key>NSAllowsArbitraryLoads</key>
782
+ <true/>
783
+ <key>NSExceptionDomains</key>
784
+ <dict>
785
+ <key>localhost</key>
786
+ <dict>
787
+ <key>NSExceptionAllowsInsecureHTTPLoads</key>
788
+ <true/>
789
+ </dict>
790
+ </dict>
791
+ </dict>
792
+ <key>NSUserTrackingUsageDescription</key>
793
+ <string>TestUserTrackingUsageDescription</string>
794
+ <key>SKAdNetworkItems</key>
795
+ <array>
796
+ <dict>
797
+ <key>SKAdNetworkIdentifier</key>
798
+ <string>TestSkAdNetworkItem1</string>
799
+ </dict>
800
+ <dict>
801
+ <key>SKAdNetworkIdentifier</key>
802
+ <string>TestSkAdNetworkItem2</string>
803
+ </dict>
804
+ </array>
805
+ <key>UILaunchStoryboardName</key>
806
+ <string>SplashScreen</string>
807
+ <key>UIRequiredDeviceCapabilities</key>
808
+ <array>
809
+ <string>armv7</string>
810
+ </array>
811
+ <key>UIRequiresFullScreen</key>
812
+ <false/>
813
+ <key>UIStatusBarStyle</key>
814
+ <string>UIStatusBarStyleDefault</string>
815
+ <key>UISupportedInterfaceOrientations</key>
816
+ <array>
817
+ <string>UIInterfaceOrientationPortrait</string>
818
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
819
+ <string>UIInterfaceOrientationLandscapeLeft</string>
820
+ <string>UIInterfaceOrientationLandscapeRight</string>
821
+ </array>
822
+ <key>UISupportedInterfaceOrientations~ipad</key>
823
+ <array>
824
+ <string>UIInterfaceOrientationPortrait</string>
825
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
826
+ <string>UIInterfaceOrientationLandscapeLeft</string>
827
+ <string>UIInterfaceOrientationLandscapeRight</string>
828
+ </array>
829
+ <key>UIUserInterfaceStyle</key>
830
+ <string>Light</string>
831
+ <key>UIViewControllerBasedStatusBarAppearance</key>
832
+ <false/>
833
+ </dict>
834
+ </plist>"
835
+ `;
@@ -90,10 +90,26 @@ describe.each(['app.json', 'app.config.js', 'app.config.ts'])('Expo Config Plugi
90
90
  expect(androidManifest).toMatchSnapshot();
91
91
  });
92
92
 
93
+ it('Should modify AndroidManifest.xml idempotently', async () => {
94
+ await execAsync(`yarn expo prebuild --no-install ${testAppPath}`);
95
+ await execAsync(`yarn expo prebuild --no-install ${testAppPath}`);
96
+
97
+ const androidManifest = await fs.readFile(androidManifestPath, 'utf8');
98
+ expect(androidManifest).toMatchSnapshot();
99
+ });
100
+
93
101
  it('Should modify Info.plist', async () => {
94
102
  await execAsync(`yarn expo prebuild --no-install ${testAppPath}`);
95
103
 
96
104
  const infoPlist = await fs.readFile(infoPlistPath, 'utf8');
97
105
  expect(infoPlist).toMatchSnapshot();
98
106
  });
107
+
108
+ it('Should modify Info.plist idempotently', async () => {
109
+ await execAsync(`yarn expo prebuild --no-install ${testAppPath}`);
110
+ await execAsync(`yarn expo prebuild --no-install ${testAppPath}`);
111
+
112
+ const infoPlist = await fs.readFile(infoPlistPath, 'utf8');
113
+ expect(infoPlist).toMatchSnapshot();
114
+ });
99
115
  });
@@ -12,7 +12,15 @@ function addReplacingMainApplicationMetaDataItem(manifest, itemName, itemValue)
12
12
  };
13
13
  const mainApplication = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(manifest);
14
14
  mainApplication['meta-data'] = mainApplication['meta-data'] ?? [];
15
- mainApplication['meta-data'].push(newItem);
15
+ const existingItem = mainApplication['meta-data'].find(item => item.$['android:name'] === itemName);
16
+ if (existingItem) {
17
+ existingItem.$['android:value'] = itemValue;
18
+ existingItem.$['tools:replace'] =
19
+ 'android:value';
20
+ }
21
+ else {
22
+ mainApplication['meta-data'].push(newItem);
23
+ }
16
24
  return manifest;
17
25
  }
18
26
  const withAndroidAppId = (config, androidAppId) => {
@@ -33,7 +33,18 @@ function addReplacingMainApplicationMetaDataItem(
33
33
 
34
34
  const mainApplication = AndroidConfig.Manifest.getMainApplicationOrThrow(manifest);
35
35
  mainApplication['meta-data'] = mainApplication['meta-data'] ?? [];
36
- mainApplication['meta-data'].push(newItem);
36
+
37
+ const existingItem = mainApplication['meta-data'].find(
38
+ item => item.$['android:name'] === itemName,
39
+ );
40
+
41
+ if (existingItem) {
42
+ existingItem.$['android:value'] = itemValue;
43
+ existingItem.$['tools:replace' as keyof AndroidConfig.Manifest.ManifestMetaData['$']] =
44
+ 'android:value';
45
+ } else {
46
+ mainApplication['meta-data'].push(newItem);
47
+ }
37
48
 
38
49
  return manifest;
39
50
  }
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '15.3.0';
2
+ export const version = '15.3.1';