-
Notifications
You must be signed in to change notification settings - Fork 931
feat(ios): warn user if pod install was not run #679
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
Conversation
|
FYI I directly wrote typescript even if the files around were js. Hope that's not an issue. I tried keeping the surface of the PR as thin as possible to make for easier code conflicts |
|
maybe @orta you want to make sure I parse the podfile.lock correctly? |
|
It's little bit janky - is there possibly already a proper yaml parser in the dependency tree? Sometimes the ruby yaml writer can be either |
|
|
||
| export default function readPodfileLock(podfileLockPath: string) { | ||
| logger.debug(`Reading ${podfileLockPath}`); | ||
| const podLockContent = fs.readFileSync(podfileLockPath, 'utf8'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs a try/catch with a nice error message on what happened
|
Thanks will do @orta |
|
@orta I depend on "SPEC CHECKSUM" as the keys are easy to get from here, is that OK? |
|
@Titozzz we've just merged the PR migrating platforms-ios to TS. Would you mind rebasing? :) |
|
@Titozzz that should be fine, as you're mainly just looking for the existence 👍 |
|
Will do tomorrow |
packages/platform-ios/src/link-pods/getDependenciesFromPodfileLock.ts
Outdated
Show resolved
Hide resolved
|
Isn’t there a pod command or utility that can just make sure the pod lock is up to date with the Podfile? |
…Lock.ts Co-Authored-By: Michał Pierzchała <thymikee@gmail.com>
737f930 to
3cec6b7
Compare
thymikee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely!


Summary:
Let's detect if the user forgot to run pod install after installing a native library 😄
Test Plan:
yarn add some-library-with-ios-native-code
react-native run-ios will print an error message until you run pod install warning you that some-library-with-ios-native-code has not been found in the lockfile so it's probably not properly linked