“MPGDPRConsent”的定义必须在需要之前从模块“mParticle_Apple_SDK.Swift”导入

问题描述 投票:0回答:1

项目升级到react-native后出现以下错误0.73

iOS最低开发:iOS 13

仅显示所有错误

/node_modules/react-native-marticle/ios/RNMParticle/RNMParticle.m:648:34:“MPGDPRConsent”的定义必须在需要之前从模块“mParticle_Apple_SDK.Swift”导入

package.json

"react": "18.2.0",
"react-native": "^0.73.0",
"react-native-mparticle": "^2.7.12",

pod 文件

platform :ios, '14.0'
install! 'cocoapods', :deterministic_uuids => false
target 'myApp' do
  config = use_native_modules!
  use_modular_headers!
  
   pod 'mParticle-Apple-SDK', '~> 8.17' 
   
   
     pre_install do |installer|
    installer.pod_targets.each do |pod|
      if pod.name == 'mParticle-Apple-SDK'
        def pod.build_type;
          Pod::BuildType.new(:linkage => :dynamic, :packaging => :framework)
        end
      end
    end
  end
  
   post_install do |installer|
    react_native_post_install(installer)
    
    # Exclude arm64 architecture for simulators (for Apple Silicon)
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  end
end
ios swift react-native cocoapods
1个回答
0
投票

升级至

包.json

"react-native-mparticle": "^2.7.13",

Pod 文件

pod 'mParticle-Apple-SDK', '~> 8.27.4'

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name == 'mParticle-Apple-SDK'
      def pod.build_type;
        Pod::BuildType.new(:linkage => :dynamic, :packaging => :framework)
      end
    end
  end
end
© www.soinside.com 2019 - 2024. All rights reserved.