Skip to content

[MOB-11175] make-rn-sdk-compatible-with-expo#629

Merged
lposen merged 15 commits intomasterfrom
expo/MOB-11175-make-rn-sdk-compatible-with-expo
Apr 10, 2025
Merged

[MOB-11175] make-rn-sdk-compatible-with-expo#629
lposen merged 15 commits intomasterfrom
expo/MOB-11175-make-rn-sdk-compatible-with-expo

Conversation

@lposen
Copy link
Copy Markdown
Contributor

@lposen lposen commented Apr 7, 2025

🔹 JIRA Ticket(s) if any

✏️ Description

Fixes issues that cause expo builds to fail

Test

Just run the example app and make sure that everything loads as expected. None of the changes are high risk, so a quick smoke check is fine.

lposen added 6 commits April 7, 2025 13:46
… multiple files to use NativeModules directly, as expo does breaks when importing this from another file
…bleInAppManager and IterableInboxDataModel, otherwise expo gets upset
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2025

Lines Statements Branches Functions
Coverage: 38%
38.11% (178/467) 11.29% (20/177) 32.46% (50/154)

@lposen lposen requested a review from Copilot April 7, 2025 21:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

@qlty-cloud-legacy
Copy link
Copy Markdown

qlty-cloud-legacy Bot commented Apr 7, 2025

❌ 3 blocking issues (4 total)

Tool Category Rule Count
rubocop Lint Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem concurrent\-ruby should appear before xcodeproj. 2
prettier Style Incorrect formatting, autoformat by running qlty fmt. 1
ripgrep Lint // TODO: Organize these so that there are no circular dependencies 1

@qltysh one-click actions:

  • Auto-fix formatting (qlty fmt && git push)

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

import { NativeModules } from 'react-native';

import { Iterable } from '../../core';
import type { IterableInAppDeleteSource, IterableInAppLocation } from '../enums';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unused expression, expected an assignment or function call

import { NativeModules } from 'react-native';

import { Iterable } from '../../core';
import type { IterableInAppDeleteSource, IterableInAppLocation } from '../enums';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do not use comma operator here because it can be easily misunderstood or lead to unintended bugs.

IterableInboxImpressionRowInfo,
IterableInboxRowViewModel,
} from '../types';
import type { IterableInboxImpressionRowInfo, IterableInboxRowViewModel } from '../types';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unused expression, expected an assignment or function call

IterableInboxImpressionRowInfo,
IterableInboxRowViewModel,
} from '../types';
import type { IterableInboxImpressionRowInfo, IterableInboxRowViewModel } from '../types';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do not use comma operator here because it can be easily misunderstood or lead to unintended bugs.

IterableInAppManager,
IterableInAppMessage,
} from '../../inApp';
// TODO: Organize these so that there are no circular dependencies
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

TODO found

// expo throws an error if this is not imported directly due to circular
// dependencies
// See https://github.com/expo/expo/issues/35100
import type { IterableEdgeInsetDetails } from '../../core/types/IterableEdgeInsetDetails';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unused expression, expected an assignment or function call

// expo throws an error if this is not imported directly due to circular
// dependencies
// See https://github.com/expo/expo/issues/35100
import type { IterableInAppContentType } from '../enums/IterableInAppContentType';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unused expression, expected an assignment or function call

IterableInAppManager,
IterableInAppMessage,
} from '../../inApp';
// TODO: Organize these so that there are no circular dependencies
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

// TODO: Organize these so that there are no circular dependencies [ripgrep:TODO]

Comment thread example/Gemfile Outdated
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'concurrent-ruby', '< 1.3.4' No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Expected a newline at the end of the file.

Comment thread example/Gemfile Outdated
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'concurrent-ruby', '< 1.3.4' No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Final newline missing. [rubocop:Layout/TrailingEmptyLines]

IterableInAppManager,
IterableInAppMessage,
} from '../../inApp';
// TODO: Organize these so that there are no circular dependencies
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

// TODO: Organize these so that there are no circular dependencies [ripgrep:TODO]

lposen added 2 commits April 9, 2025 17:40
…hub.com:Iterable/react-native-sdk into expo/MOB-11175-make-rn-sdk-compatible-with-expo

* 'expo/MOB-11175-make-rn-sdk-compatible-with-expo' of github.com:Iterable/react-native-sdk:
  Concurrent Ruby version
@Ayyanchira Ayyanchira self-requested a review April 10, 2025 00:43
Copy link
Copy Markdown
Member

@Ayyanchira Ayyanchira left a comment

Choose a reason for hiding this comment

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

Looks good. Only caveat is Xcode 16.2.

@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit bf51fd5 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Bug Risk 1
Style 2

The test coverage on the diff in this pull request is 71.1% (50% is the threshold).

This pull request will bring the total coverage in the repository to 38.4% (0.5% change).

View more on Code Climate.

Comment thread example/Gemfile
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem concurrent-ruby should appear before xcodeproj. [rubocop:Bundler/OrderedGems]

Comment thread example/Gemfile
# Ruby 3.4.0 has removed some libraries from the standard library.
gem 'bigdecimal'
gem 'logger'
gem 'benchmark'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem benchmark should appear before logger. [rubocop:Bundler/OrderedGems]

IterableInAppManager,
IterableInAppMessage,
} from '../../inApp';
// TODO: Organize these so that there are no circular dependencies
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

// TODO: Organize these so that there are no circular dependencies [ripgrep:TODO]

@lposen lposen merged commit 63ec450 into master Apr 10, 2025
10 of 11 checks passed
@lposen lposen deleted the expo/MOB-11175-make-rn-sdk-compatible-with-expo branch April 10, 2025 00:48
IterableInAppCloseSource,
IterableInAppDeleteSource,
IterableInAppLocation,
IterableInAppManager,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Possibly related to Iterable.inAppManager no longer being defined?

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.

4 participants