Skip to content

Conversation

@theohdv
Copy link
Contributor

@theohdv theohdv commented Jan 24, 2022

Description of the change

Could not upgrade to expo 44 because iOS build was failing.

As explained here: expo/expo#15622 (comment)

Old style imports are not supported anymore from expo 44.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests

Code review

  • This pull request has a descriptive title and information useful to a reviewer
  • Issue from task tracker has a link to this pull request
@justblender
Copy link

justblender commented Jan 24, 2022

@theohdv, this seems to be related to my issue #660.

To avoid breaking compatibility with older versions of React Native, I propose to just inverse the condition in RCTConvert+InstabugEnums.h:

-#if __has_include("RCTConvert.h") - #import "RCTConvert.h" -#else +#if __has_include("React/RCTConvert.h") #import <React/RCTConvert.h> +#else + #import "RCTConvert.h" #endif

Although as far as "breaking compatibility with older versions" goes, move to namespaced includes happened in RN 0.40.0, which is quite an outdated version today. Still, it's good to have a backup in any case.

@theohdv
Copy link
Contributor Author

theohdv commented Jan 25, 2022

@justblender Thanks for the suggestion !
Yes would be better like that, did you try your solution with expo 44 ?

@justblender
Copy link

Yes would be better like that, did you try your solution with expo 44 ?

@theohdv, yes. I'm using expo@44.0.5 on a bare workflow RN 0.67.0 project and it compiles just fine after applying that change via patch-package.

@theohdv theohdv force-pushed the fix/expo-44-support branch from 00195e4 to 6b3a65b Compare January 25, 2022 12:32
@theohdv
Copy link
Contributor Author

theohdv commented Jan 25, 2022

@justblender thanks a lot, just made the changes

@codecov
Copy link

codecov bot commented Jan 27, 2022

Codecov Report

Merging #663 (6b3a65b) into master (dd6075a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #663 +/- ## ======================================= Coverage 88.23% 88.23% ======================================= Files 24 24 Lines 459 459 Branches 91 91 ======================================= Hits 405 405 Misses 46 46 Partials 8 8 

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd6075a...6b3a65b. Read the comment docs.

@AliAbdelfattah AliAbdelfattah changed the title feat: fix expo 44 ios build error [MOB-7935] Favor namespaced import of React/RCTConvert.h Jan 28, 2022
@AliAbdelfattah AliAbdelfattah added the READY FOR MERGE Reviewed and ready for merge (after release request) label Jan 28, 2022
@AliAbdelfattah AliAbdelfattah changed the base branch from master to release/10.13.0 March 8, 2022 11:52
@AliAbdelfattah AliAbdelfattah merged commit 9338238 into Instabug:release/10.13.0 Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

READY FOR MERGE Reviewed and ready for merge (after release request)

3 participants