Skip to content

Fix ios build for xcode 12 + use_frameworks! #510

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

Merged

Conversation

stu-dev
Copy link
Contributor

@stu-dev stu-dev commented Dec 22, 2020

Summary

Fix for issue described in #509

Test Plan

Build a new RN project referencing PR branch

npx react-native init RNAsyncStorage && cd RNAsyncStorage
yarn add https://github.com/stu-dev/async-storage#fix/xcode-12-use-frameworks
  • Add use_frameworks! to Podfile (also disable flipper)
npx pod-install
yarn ios

Copy link
Member

@tido64 tido64 left a comment

Choose a reason for hiding this comment

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

This looks fine to me. I don't know why CircleCI didn't trigger for this PR so I tested this manually on my own machine, from react-native 0.60 through 0.63, and didn't hit any issues.

@krizzu: Any last comments?

@tido64 tido64 linked an issue Jan 16, 2021 that may be closed by this pull request
4 tasks
@krizzu
Copy link
Member

krizzu commented Jan 16, 2021

We had PR merged previously to remove React-Core dependency to address other issue. I just want to be sure that this change would not break other people builds. Is there some way to use different dependencies based on usage of use_framework in cocoa?

@tido64
Copy link
Member

tido64 commented Jan 16, 2021

We had PR merged previously to remove React-Core dependency to address other issue. I just want to be sure that this change would not break other people builds. Is there some way to use different dependencies based on usage of use_framework in cocoa?

Yeah, I didn't use use_framework when testing locally, so I'm not quite sure what the other issue was about.

@stu-dev
Copy link
Contributor Author

stu-dev commented Jan 16, 2021

We had PR merged previously to remove React-Core dependency to address other issue. I just want to be sure that this change would not break other people builds. Is there some way to use different dependencies based on usage of use_framework in cocoa?

I mean technically the PR you reference broke the build for me, so may have affected others. I also don't think the issue in question was reproducible? Could have easily been caused by caching issues

Edit: The number of PRs attached to this issue on the main RN repo shows that there is an overwhelming consensus that React-Core is correct

@krizzu
Copy link
Member

krizzu commented Jan 18, 2021

We had PR merged previously to remove React-Core dependency to address other issue. I just want to be sure that this change would not break other people builds. Is there some way to use different dependencies based on usage of use_framework in cocoa?

I mean technically the PR you reference broke the build for me, so may have affected others. I also don't think the issue in question was reproducible? Could have easily been caused by caching issues

Edit: The number of PRs attached to this issue on the main RN repo shows that there is an overwhelming consensus that React-Core is correct

Looks like React-Core is indeed the correct here - we'll just have to remember that once we do that change, we should instruct whoever comes with the related issue, to delete the pod folder, do pod install and in Xcode clean the project and build it again.

I'll do some testing later today to confirm this works and approve this

Copy link
Member

@krizzu krizzu left a comment

Choose a reason for hiding this comment

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

@tido64 @stu-dev
So I just tested locally, I covered scenarios:

  • fresh RN app, and AsyncStorage as dependency, works fine.
  • used use_frameworks!, disabled flipper and changed dependency to React-Core. Had to clear Pods and build directory through Xcode
  • removed use_frameworks!, but kept React-Core

And all of those works just fine. Good to go 👍

@tido64
Copy link
Member

tido64 commented Jan 18, 2021

Thanks everyone! Merging this.

@tido64 tido64 merged commit 59945b2 into react-native-async-storage:master Jan 18, 2021
@krizzu
Copy link
Member

krizzu commented Jan 18, 2021

🎉 This PR is included in version 1.13.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

iOS fails to build with xcode 12 + use_frameworks!
3 participants