Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 58f0bfc

Browse files
committed
Adding nozip option to podspec
1 parent 60f8c8b commit 58f0bfc

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

CodePush.podspec

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,19 @@ Pod::Spec.new do |s|
1212
s.homepage = 'http://microsoft.github.io/code-push/'
1313
s.source = { :git => 'https://github.com/Microsoft/react-native-code-push.git', :tag => "v#{s.version}-beta" }
1414
s.platform = :ios, '7.0'
15-
s.source_files = 'ios/CodePush/*.{h,m}', 'ios/CodePush/SSZipArchive/*.{h,m}', 'ios/CodePush/SSZipArchive/aes/*.{h,c}', 'ios/CodePush/SSZipArchive/minizip/*.{h,c}'
1615
s.public_header_files = 'ios/CodePush/CodePush.h'
1716
s.preserve_paths = '*.js'
1817
s.library = 'z'
1918
s.dependency 'React'
20-
19+
20+
s.default_subspec = 'Full'
21+
22+
s.subspec 'Full' do |ss|
23+
s.source_files = 'ios/CodePush/*.{h,m}', 'ios/CodePush/SSZipArchive/*.{h,m}', 'ios/CodePush/SSZipArchive/aes/*.{h,c}', 'ios/CodePush/SSZipArchive/minizip/*.{h,c}'
24+
end
25+
26+
s.subspec 'NoZip' do |ss|
27+
s.source_files = 'ios/CodePush/*.{h,m}'
28+
end
29+
2130
end

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,18 @@ We hope to eventually remove the need for steps #2-4, but in the meantime, RNPM
118118
pod 'CodePush', :path => './node_modules/react-native-code-push'
119119
```
120120

121-
*NOTE: The above path needs to be relative to your app's `Podfile`, so adjust it as neccessary.*
121+
CodePush depends on an internal copy of the `SSZipArchive` library, so if your project already includes that (either directly or via a transitive dependency), then you can install a version of CodePush which excludes its by using the following subspec:
122+
123+
```ruby
124+
pod 'CodePush', :path => './node_modules/react-native-code-push', :subspecs => ['NoZip']
125+
```
126+
127+
*NOTE: The above paths needs to be relative to your app's `Podfile`, so adjust it as neccessary.*
122128
123129
2. Run `pod install`
124130
125131
*NOTE: The CodePush `.podspec` depends on the `React` pod, and so in order to ensure that it can correctly use the version of React Native that your app is built with, please make sure to define the `React` dependency in your app's `Podfile` as explained [here](http://facebook.github.io/react-native/docs/embedded-app-ios.html#install-react-native-using-cocoapods).*
126-
132+
127133
#### Plugin Installation (iOS - Manual)
128134

129135
1. Open your app's Xcode project

0 commit comments

Comments
 (0)