@kesha-antonov/react-native-background-downloader 4.6.0 → 4.6.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.
package/README.md CHANGED
@@ -926,7 +926,45 @@ If you're using `react-native-mmkv`, you don't need to add the MMKV dependency m
926
926
  <details>
927
927
  <summary><strong>EXC_BAD_ACCESS crash on iOS with react-native-mmkv</strong></summary>
928
928
 
929
- This was fixed in v4.4.0. Update to the latest version. If you're not using `react-native-mmkv`, add `pod 'MMKV', '>= 1.0.0'` to your Podfile.
929
+ This was fixed in v4.4.0. Update to the latest version. The podspec declares the MMKV dependency itself, so you don't need to add anything to your Podfile. If you do pin it manually, exclude the broken 2.4.1 release (see the entry below):
930
+
931
+ ```ruby
932
+ pod 'MMKV', '>= 1.0.0', '!= 2.4.1'
933
+ ```
934
+ </details>
935
+
936
+ <details>
937
+ <summary><strong>iOS build fails with "use of undeclared identifier 'memset_s'" (MMKVCore)</strong></summary>
938
+
939
+ ```text
940
+ Pods/MMKVCore/Core/aes/AESCrypt.cpp:83:11
941
+ (void)memset_s(ptr, len, 0, len);
942
+ ^ use of undeclared identifier 'memset_s'
943
+ ```
944
+
945
+ This is an upstream bug in **MMKVCore 2.4.1** ([Tencent/MMKV#1675](https://github.com/Tencent/MMKV/issues/1675)) - it does not compile on Apple platforms. Update to the latest version of this library: the podspec now excludes exactly that release, so a fresh `pod install` resolves `MMKVCore 2.4.0` instead.
946
+
947
+ If you are on a version with the fix and still hitting this, your `Podfile.lock` is pinning the broken version. Refresh it:
948
+
949
+ ```bash
950
+ cd ios
951
+ pod update MMKV MMKVCore
952
+ ```
953
+
954
+ If some other pod in your graph forces `MMKVCore 2.4.1` and you cannot move off it, define the missing feature-test macro on the command line (the `#define` inside `AESCrypt.cpp` lands too late because CocoaPods force-includes the generated prefix header first):
955
+
956
+ ```ruby
957
+ # ios/Podfile
958
+ post_install do |installer|
959
+ installer.pods_project.targets.each do |target|
960
+ next unless target.name == 'MMKVCore'
961
+ target.build_configurations.each do |config|
962
+ config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
963
+ config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << '__STDC_WANT_LIB_EXT1__=1'
964
+ end
965
+ end
966
+ end
967
+ ```
930
968
  </details>
931
969
 
932
970
  <details>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kesha-antonov/react-native-background-downloader",
3
- "version": "4.6.0",
3
+ "version": "4.6.1",
4
4
  "description": "A library for React-Native to help you download large files on iOS and Android both in the foreground and most importantly in the background.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -27,7 +27,20 @@ Pod::Spec.new do |s|
27
27
  # resolve a newer MMKV when another pod (e.g. react-native-mmkv, which pins an
28
28
  # exact MMKVCore) requires one - we just don't impose our own higher floor.
29
29
  # See https://github.com/kesha-antonov/react-native-background-downloader/issues/162
30
- s.dependency 'MMKV', '>= 1.2.0'
30
+ #
31
+ # 2.4.1 is excluded: MMKVCore 2.4.1 fails to compile on Apple platforms with
32
+ # "use of undeclared identifier 'memset_s'" in Core/aes/AESCrypt.cpp. It defines
33
+ # __STDC_WANT_LIB_EXT1__ at the top of the .cpp, but CocoaPods force-includes the
34
+ # generated prefix header (-include ...-prefix.pch) first, so <string.h> is already
35
+ # parsed by then and Darwin never declares memset_s. Only that single release is
36
+ # blocked, so a fixed 2.4.2+ will be picked up without another release here.
37
+ # See https://github.com/Tencent/MMKV/issues/1675
38
+ # and https://github.com/kesha-antonov/react-native-background-downloader/issues/175
39
+ s.dependency 'MMKV', '>= 1.2.0', '!= 2.4.1'
40
+ # MMKVCore must be excluded explicitly as well: the broken source file lives in
41
+ # MMKVCore, and MMKV 2.4.0 depends on 'MMKVCore (~> 2.4.0)', which would still
42
+ # resolve to the broken 2.4.1 on its own.
43
+ s.dependency 'MMKVCore', '!= 2.4.1'
31
44
 
32
45
  # Enable codegen for new architecture
33
46
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1'