React-RCTPushNotification.podspec 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright (c) Facebook, Inc. and its affiliates.
  2. #
  3. # This source code is licensed under the MIT license found in the
  4. # LICENSE file in the root directory of this source tree.
  5. require "json"
  6. package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
  7. version = package['version']
  8. source = { :git => 'https://github.com/facebook/react-native.git' }
  9. if version == '1000.0.0'
  10. # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
  11. source[:commit] = `git rev-parse HEAD`.strip
  12. else
  13. source[:tag] = "v#{version}"
  14. end
  15. folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
  16. folly_version = '2020.01.13.00'
  17. Pod::Spec.new do |s|
  18. s.name = "React-RCTPushNotification"
  19. s.version = version
  20. s.summary = "A library for handling push notifications for your app, including permission handling and icon badge number."
  21. s.homepage = "https://reactnative.dev/"
  22. s.documentation_url = "https://reactnative.dev/docs/pushnotificationios"
  23. s.license = package["license"]
  24. s.author = "Facebook, Inc. and its affiliates"
  25. s.platforms = { :ios => "10.0", :tvos => "10.0" }
  26. s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
  27. s.source = source
  28. s.source_files = "*.{m,mm}"
  29. s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
  30. s.header_dir = "RCTPushNotification"
  31. s.pod_target_xcconfig = {
  32. "USE_HEADERMAP" => "YES",
  33. "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
  34. "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\""
  35. }
  36. s.framework = "UserNotifications"
  37. s.dependency "FBReactNativeSpec", version
  38. s.dependency "RCTTypeSafety", version
  39. s.dependency "React-Core/RCTPushNotificationHeaders", version
  40. s.dependency "ReactCommon/turbomodule/core", version
  41. s.dependency "React-jsi", version
  42. end