Skip to content

Conversation

@Simek
Copy link
Contributor

@Simek Simek commented Aug 6, 2020

Summary

Currently when creating Native Module package for iOS the invalid Objective-C implementation file extension (.mm) is provided in project.pbxproj. This causes the inability to open and edit the package .m file in XCode.

This PR fixes that issue simply by replacing the incorrect file extension with the correct one.

Test Plan

After generating the project with the change I can open implementation code in the XCode.

What's required for testing (prerequisites)?

XCode!

What are the steps to reproduce (after prerequisites)?

Generate iOS Native Project and try to open main file in XCode.

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I mentioned this change in CHANGELOG.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)

Copy link
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

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

Hey! Thanks a lot for the PR and sorry for the late review. We need mm extension for C++ modules afaik. Can you add a conditional to have mm for C++ module and m for rest like we do for swift?

@Simek
Copy link
Contributor Author

Simek commented Sep 30, 2020

Hey! Thanks a lot for the PR and sorry for the late review. We need mm extension for C++ modules afaik. Can you add a conditional to have mm for C++ module and m for rest like we do for swift?

@satya164 Thank you for the review! I have a stashed changeset with review changes ready, but I want to ask one question before I push it: Dose the Swift project requires .m files too? It is not obvious from the current file, because .m files are present in some swift conditionals but not all of them (PBXBuildFile section do not include source .m file for example).

@satya164
Copy link
Member

I had received a PR for adding Swift and C++ so I am not 100% sure, but if I understand correctly, for both Swift and Obj-C, we need .m and for C++ we need .mm :)

@Simek
Copy link
Contributor Author

Simek commented Sep 30, 2020

I hope that I made the correct changes. I have tried to clean up the logic a bit by merging conditionals (so now there are always three branches: CPP, Swift and rest). Let me know what do you think and if updates are correct in the first place. 🙂

@Simek Simek requested a review from satya164 September 30, 2020 21:16
@satya164 satya164 changed the title fix Obj-C file extension in project.pbxproj fix: fix Obj-C file extension in project.pbxproj Oct 1, 2020
@satya164 satya164 merged commit 85835e6 into callstack:master Oct 1, 2020
olessavluk added a commit to smarkets/react-native-seon that referenced this pull request Jul 4, 2022
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.

2 participants