-
Notifications
You must be signed in to change notification settings - Fork 0
/
react-native-one-core.podspec
46 lines (38 loc) · 2.05 KB
/
react-native-one-core.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
sdk = JSON.parse(File.read(File.join(__dir__, 'core-sdk.json')))['ios']
Pod::Spec.new do |s|
s.name = "react-native-one-core"
s.version = package['version']
s.summary = package['description']
s.license = package['license']
s.authors = package['author']
s.homepage = package['homepage']
s.platform = :ios, "13.0"
s.source = { :git => "https://gitlab.procivis.ch/procivis/one/react-native-one-core.git" }
s.source_files = "ios/**/*.{h,m,swift}"
s.requires_arc = true
s.ios.vendored_frameworks = "ios/one_coreFFI.xcframework"
s.prepare_command = <<-CMD
FRAMEWORK_URL=#{sdk['url']}
SHA_1_CHECKSUM=#{sdk['sha1']}
if [ ! -d ./ios/one_coreFFI.xcframework ]; then
echo "Downloading ONE Core Framework"
curl -L -o ./ios/deploy.zip $FRAMEWORK_URL
pushd ./ios >/dev/null
if ! echo "$SHA_1_CHECKSUM *deploy.zip" | shasum -c -s; then
echo !!!!!!!!!!!!!!!!!
echo ERROR: Downloaded Framwork CRC Mismatch
echo Expected: $SHA_1_CHECKSUM
echo 'Actual: ' `shasum -b deploy.zip`
echo !!!!!!!!!!!!!!!!!
exit 2
fi
popd >/dev/null
unzip ./ios/deploy.zip "ios/one_core/Sources/*" >/dev/null
mv ./ios/one_core/Sources/* ./ios
rm -rf ./ios/one_core ./ios/deploy.zip
fi
CMD
s.dependency "React-Core"
end