rocwong-cn / react-native-aes-kit

AES-CBC-PKCS5Padding
18 stars 16 forks source link

encrypt is not a function when running on ios (it is because of missing podspec file) #8

Closed Thanhal-P-A closed 4 years ago

Thanhal-P-A commented 4 years ago

Add this file as RCTAesCrypto.podspec inside node_modules/react-native-aes-kit before pod install

require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
  s.name         = 'RCTAesCrypto'
  s.version      = package["version"]
  s.summary      = package["description"]
  s.author       = package["author"]

  s.homepage     = package["homepage"]

  s.license      = package["license"]
  s.platform     = :ios, "8.0"

  s.source       = { :git => "https://github.com/rocwangv/react-native-aes-kit.git", :tag => "#{s.version}" }
  s.source_files = "ios/**/*.{h,m,swift}"
  s.preserve_paths  = "**/*.js"

  s.dependency 'React'
end

You can patch-package react-native-aes-kit after this to commit the changes.