Skip to content
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
tadasr:masterfrom
admah:add-podspec
Open

Add podspec to support iOS auto-linking in RN >=0.60#20
admah wants to merge 2 commits into
tadasr:masterfrom
admah:add-podspec

Conversation

@admah
Copy link
Copy Markdown

@admah admah commented Aug 7, 2019

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's Podfile will allow those using this on React Native >=0.60 to auto-link.

@thehellmaker
Copy link
Copy Markdown

@tadasr @admah When is this going in ? Its been a while. If this isn't going in i want to open PR and then push to main repo

ZachJMoore added a commit to ZachJMoore/react-native-iot-wifi that referenced this pull request Oct 18, 2019
Copy link
Copy Markdown

@josectobar josectobar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the podspec file needs to actually go in the root directory and not in the ios folder.

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}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
s.source_files = "ios/**/*.{h,m}"
s.source_files = "ios/**/*.{h,m}"
s.dependancy = "React"

@admah
Copy link
Copy Markdown
Author

admah commented Nov 1, 2019

I've updated the Podspec location and added the dependency.

@@ -0,0 +1,18 @@
require 'json'

package = JSON.parse(File.read(File.join(__dir__, '../package.json')))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants