This repository was archived by the owner on Jan 14, 2025. It is now read-only.
Add podspec to support iOS auto-linking in RN >=0.60#20
Open
admah wants to merge 2 commits into
Open
Conversation
ZachJMoore
added a commit
to ZachJMoore/react-native-iot-wifi
that referenced
this pull request
Oct 18, 2019
josectobar
reviewed
Oct 30, 2019
josectobar
left a comment
There was a problem hiding this comment.
the podspec file needs to actually go in the root directory and not in the ios folder.
josectobar
reviewed
Oct 30, 2019
| s.platform = :ios, "9.0" | ||
|
|
||
| s.source = { :git => "https://github.com/tadasr/react-native-iot-wifi.git", :tag => "#{s.version}" } | ||
| s.source_files = "ios/**/*.{h,m}" |
There was a problem hiding this comment.
Suggested change
| s.source_files = "ios/**/*.{h,m}" | |
| s.source_files = "ios/**/*.{h,m}" | |
| s.dependancy = "React" |
Author
|
I've updated the Podspec location and added the dependency. |
josectobar
reviewed
Nov 5, 2019
| @@ -0,0 +1,18 @@ | |||
| require 'json' | |||
|
|
|||
| package = JSON.parse(File.read(File.join(__dir__, '../package.json'))) | |||
There was a problem hiding this comment.
since the file is now in the root directory the reference for the package.json needs to be at the same level as the podspec file.
Suggested change
| package = JSON.parse(File.read(File.join(__dir__, '../package.json'))) | |
| package = JSON.parse(File.read(File.join(__dir__, './package.json'))) |
|
|
||
| s.source = { :git => "https://github.com/tadasr/react-native-iot-wifi.git", :tag => "#{s.version}" } | ||
| s.source_files = "ios/**/*.{h,m}" | ||
| s.dependancy = "React" |
There was a problem hiding this comment.
Had to change this line along with @josectobar's recommendation in order to get this to work.
Suggested change
| s.dependancy = "React" | |
| s.dependency 'React' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding the podspec and
pod 'react-native-iot-wifi', :podspec => '../node_modules/react-native-iot-wifi/ios/react-native-iot-wifi.podspec'to the user'sPodfilewill allow those using this on React Native >=0.60 to auto-link.