-
Notifications
You must be signed in to change notification settings - Fork 36
New-arch/MOB-11545-update-build-configurations-for-both-ios-and-andro #645
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
Draft
lposen
wants to merge
14
commits into
master
Choose a base branch
from
new-arch/MOB-11545-update-build-configurations-for-both-ios-and-andro
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9859dc4
feat: add support for new architecture and Fabric in Android and iOS …
lposen bc0f5a1
feat: enable new architecture and Fabric support in Android and iOS SDKs
lposen e6ad069
feat: update react-native-gesture-handler to 2.25.0 and adjust packag…
lposen 7f986aa
feat: implement architecture switching and enhance build configuratio…
lposen 196e0f6
feat: add support for Iterable URL handling and custom action handlin…
lposen 2a0c7b1
feat: change RNIterableAPISpec to extend RCTEventEmitter for improved…
lposen 5ab696c
feat: implement RCTTurboModule support in RNIterableAPISpec for enhan…
lposen 9a61dbb
feat: add RNIterableInboxView component with customizable properties …
lposen 363f490
feat: add RNIterableInboxView and RNIterableInboxViewCompat
lposen a893525
test: add unit tests for RNIterableInboxView functionality
lposen c0d130e
feat: add TurboModule support for RNIterableAPI with new module provi…
lposen 58b60ec
feat: update to use TurboModule architecture and configure build sett…
lposen 12097a9
feat: implement IterableSDK with methods for user management and even…
lposen 1e67f85
feat: add ArchitectureDetector for detecting architecture features an…
lposen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ Pod::Spec.new do |s| | |
|
||
s.source_files = "ios/**/*.{h,m,mm,swift}" | ||
|
||
s.dependency "Iterable-iOS-SDK", "6.5.4" | ||
|
||
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. | ||
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. | ||
if respond_to?(:install_modules_dependencies, true) | ||
|
@@ -36,9 +38,8 @@ Pod::Spec.new do |s| | |
s.dependency "RCTRequired" | ||
s.dependency "RCTTypeSafety" | ||
s.dependency "ReactCommon/turbomodule/core" | ||
s.dependency "React-RCTFabric" # This is for Fabric support | ||
end | ||
end | ||
|
||
s.dependency "Iterable-iOS-SDK", "6.5.4" | ||
|
||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,69 @@ Iterable's React Native SDK relies on: | |
|
||
## Architecture Support | ||
|
||
**Important**: Iterable's React Native SDK currently does not support [React Native's New Architecture](https://reactnative.dev/architecture/landing-page) (Fabric, TurboModules, and Codegen). The SDK is designed to work with the **legacy architecture only**. If you're using the New Architecture in your React Native application, you may encounter compatibility issues. | ||
Iterable's React Native SDK supports both the legacy architecture and React Native's New Architecture (Fabric, TurboModules, and Codegen). The SDK is designed to work seamlessly with both architectures, providing flexibility for your React Native application. | ||
|
||
### New Architecture Support | ||
|
||
Starting from version 2.0.0-beta.1, the SDK supports React Native's New Architecture. To use the SDK with the New Architecture: | ||
|
||
1. Enable the New Architecture in your project: | ||
```bash | ||
yarn switch-arch new | ||
``` | ||
|
||
2. Clean and rebuild your project: | ||
```bash | ||
yarn clean | ||
yarn build:new-arch | ||
``` | ||
|
||
3. For Android, ensure your `android/gradle.properties` has: | ||
```properties | ||
newArchEnabled=true | ||
``` | ||
|
||
4. For iOS, the New Architecture will be automatically enabled when building with the new architecture flag. | ||
|
||
### Legacy Architecture Support | ||
|
||
To use the SDK with the legacy architecture: | ||
|
||
1. Ensure you're using the legacy architecture: | ||
```bash | ||
yarn switch-arch old | ||
``` | ||
|
||
2. Clean and rebuild your project: | ||
```bash | ||
yarn clean | ||
yarn build:old-arch | ||
``` | ||
|
||
3. For Android, ensure your `android/gradle.properties` has: | ||
```properties | ||
newArchEnabled=false | ||
``` | ||
|
||
### Building for Both Architectures | ||
|
||
If you need to support both architectures in your project: | ||
|
||
1. Build for both architectures: | ||
```bash | ||
yarn build:all | ||
``` | ||
|
||
This will create builds for both the old and new architecture, allowing you to test and deploy your app with either architecture. | ||
|
||
### CI/CD Integration | ||
|
||
The SDK includes CI/CD configurations that test both architectures. The CI pipeline will: | ||
- Build the library with both old and new architecture | ||
- Build Android example app with both architectures | ||
- Build iOS example app with both architectures | ||
|
||
This ensures that your SDK works correctly with both architectures in your CI/CD pipeline. | ||
|
||
## Installation | ||
|
||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 18 days ago
To fix the issue, we need to add a
permissions
block to the workflow file. This block should specify the minimal permissions required for the workflow to function correctly. Based on the provided workflow, it appears that the jobs primarily involve checking out code, running setup scripts, linting, type-checking, testing, and building packages. These tasks typically require onlycontents: read
permissions. Therefore, we will add apermissions
block at the root level of the workflow to apply to all jobs.