Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial setup clarification #125

Closed
berrymat opened this issue Feb 7, 2017 · 3 comments
Closed

Initial setup clarification #125

berrymat opened this issue Feb 7, 2017 · 3 comments

Comments

@berrymat
Copy link

berrymat commented Feb 7, 2017

Apologies, but I am a total beginner and had some issues getting set up. I started by creating a new React Native project using:

react-native init TestProject

This created the initial TestProject folder with sub-folders for ios and android. I went ahead and did:

cd TestProject
npm install --save react-native-sqlite-storage

I then wanted to setup my iOS project with CocoaPods and so:

cd ios
pod init

I then wanted to add the entry for this pod to my PodFile, but the line in the ReadMe seems incorrect because the node_modules folder is in my parent directory. I needed to use:

pod 'react-native-sqlite-storage', :path => '../node_modules/react-native-sqlite-storage'

Then on doing pod install I received a deprecated warning about React 0.11. What was worse was that running react-native run-ios failed with duplicate package issues. Indeed, from what I could see I had a React folder under react-native in my node_modules folder and another one under the Pods folder in ios.

After looking through the issues here I found this #84 which gave me a hint!

I started over and this time after npm installing react-native-sqlite-storage I edited the podspec file and removed:

  s.dependency 'React'

I then added both these lines to my PodFile:

  pod 'React', :path => '../node_modules/react-native'
  pod 'react-native-sqlite-storage', :path => '../node_modules/react-native-sqlite-storage'

As I know very little(!) I wanted to confirm that this is a correct approach and also wanted to put this information out there for others who might run into this.

I'm also happy to submit a pull request if that would help.

@andpor
Copy link
Owner

andpor commented Feb 8, 2017

You are absolutely correct. The CocoaPods based set-up instructions were incorrect. I have corrected them and tested based on your input. Will include in the next 3.2.2 release.

Thanks.

@andpor andpor closed this as completed Feb 8, 2017
@andpor
Copy link
Owner

andpor commented Feb 10, 2017

@berrymat - let me know how you make out with 3.2.2 with regards to Pods...

@berrymat
Copy link
Author

Yes it is working well. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants