Aminoid / react-native-activity-recognition

React Native wrapper for the Activity Recognition API.
GNU General Public License v2.0
92 stars 79 forks source link

Add podspec for cocoapod #42

Open blaisebarre opened 2 years ago

blaisebarre commented 2 years ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-activity-recognition@3.2.0 for the project I'm working on.

When I install the cocoapods of my project, let me know :

[!] The RNActivityRecognition pod failed to validate due to 1 error:

Indeed, it missing a RNActivityRecognition.podspec in the lib. Here is the diff that solved my problem:

diff --git a/node_modules/react-native-activity-recognition/RNActivityRecognition.podspec b/node_modules/react-native-activity-recognition/RNActivityRecognition.podspec
new file mode 100644
index 0000000..f9b3123
--- /dev/null
+++ b/node_modules/react-native-activity-recognition/RNActivityRecognition.podspec
@@ -0,0 +1,18 @@
+require 'json'
+
+package = JSON.parse(File.read('./package.json'))
+
+Pod::Spec.new do |s|
+  s.name                = 'RNActivityRecognition'
+  s.version             = package['version']
+  s.summary             = package['description']
+  s.description         = package['description']
+  s.homepage            = package['homepage']
+  s.license             = package['license']
+  s.author              = package['author']
+  s.source              = { :git => "https://github.com/XebiaStudio/react-native-activity-recognition.git" }
+  s.platform            = :ios, "7.0"
+  s.source_files        = "ios/*.{h,m}"
+  s.preserve_paths      = "*.js"
+  s.dependency 'React-Core'
+end

This issue body was partially generated by patch-package.

tsachit commented 1 year ago

When do we get this? I had to manually the homepage value