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

feat: adds guide for React Native on iOS #85

Merged
merged 9 commits into from
Mar 2, 2023
Merged

feat: adds guide for React Native on iOS #85

merged 9 commits into from
Mar 2, 2023

Conversation

brigonzalez
Copy link
Contributor

Description

  • adds guide for React Native on iOS

Testing required outside of automated testing?

  • Not Applicable

Screenshots (if appropriate):

  • Not Applicable

Rollback / Rollforward Procedure

  • Roll Forward
  • Roll Back

Reviewer Checklist

  • Description of Change
  • Description of outside testing if applicable.
  • Description of Roll Forward / Backward Procedure
  • Documentation updated for Change

@brigonzalez brigonzalez requested a review from a team as a code owner February 27, 2023 21:21
@vercel
Copy link

vercel bot commented Feb 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
developers-basistheory-com ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 1, 2023 at 10:25PM (UTC)

@brigonzalez brigonzalez marked this pull request as draft February 27, 2023 21:21
@brigonzalez
Copy link
Contributor Author

waiting on a new image


Open your new React Native project in Xcode by opening `AwesomeProject.xcworkspace` in your project under the `ios` directory.

With the Xcode window in focus, select File > Add Packages. In the dialog that appears, enter "[https://github.com/Basis-Theory/basistheory-ios](https://github.com/Basis-Theory/basistheory-ios)" in the search field on the top right, then select "AwesomeProject" for Add to Project,
Copy link
Contributor

Choose a reason for hiding this comment

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

is this like this because it is ReactNative and you can't install it with pod install?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had issues with the build using CocoaPods. it seems there are a few extra steps going down that route

Copy link
Contributor

Choose a reason for hiding this comment

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

is that just true for this ReactNative part or for any iOS app?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's more complex because it's within React Native. it works fine an a native iOS app

At this point, you may get an error telling you that `BasisTheoryElements` isn't compatible with the minimum iOS deployment set up for the project. In that case, in the Project Navigator tab in Xcode click on the "AwesomeProject" project and under the "AwesomeProject" target,
select "14.0" for the Minimum Deployment.

Now we need to make `RCTViewManager` available to be used in Swift. We'll go back to the bridging header created earlier and add an import for the `RCTViewManager` header.
Copy link
Contributor

Choose a reason for hiding this comment

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

These sentences sound a bit odd? I'm not sure exactly what to change although:

Suggested change
Now we need to make `RCTViewManager` available to be used in Swift. We'll go back to the bridging header created earlier and add an import for the `RCTViewManager` header.
Back in the bridging header we need to make `RCTViewManager` available in Swfit. To accomplish this, we need to add an import for the `RCTViewManager` header.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol I'm not a fan of this suggestion either though

export default App;
```

Lastly, we'll add a button to trigger our `tokenize` method and a text view to view our tokenize response.
Copy link
Contributor

Choose a reason for hiding this comment

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

the same concern here, and legit not sure what todo. This one sentence feels like it blends in between the code blocks. Maybe sub-steps if possible?

Copy link
Contributor

Choose a reason for hiding this comment

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

@brigonzalez I resolved that one because it had a suggestion - although do we have the option to make these substeps or do you not want to do that?

this seems just a bit awkward of a transition to the next thing todo.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm okay with making these substeps. my bad. I missed that part of your suggestion earlier. and by substeps, you just mean a new smaller header right?

brigonzalez and others added 2 commits March 1, 2023 10:32
Co-authored-by: James Armstead <james@basistheory.com>
@armsteadj1
Copy link
Contributor

man this feels soooo much better, thank you @brigonzalez

@brigonzalez brigonzalez marked this pull request as ready for review March 2, 2023 21:06
@brigonzalez brigonzalez merged commit 377b8ad into master Mar 2, 2023
@brigonzalez brigonzalez deleted the eng-4168 branch March 2, 2023 21:07
bt-platform-eng pushed a commit that referenced this pull request Mar 2, 2023
# [1.35.0](v1.34.1...v1.35.0) (2023-03-02)

### Features

* adds guide for React Native on iOS ([#85](#85)) ([377b8ad](377b8ad))
@bt-platform-eng
Copy link

🎉 This PR is included in version 1.35.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants