Skip to content

[MOB-11848] EAS instructions and example #48

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 121 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,38 @@ This config plugin automatically configures your Expo app to work with
the native code is generated through `expo prebuild`.

<!-- @import "[TOC]" {cmd="toc" depthFrom=2 depthTo=3 orderedList=false} -->

<!-- code_chunk_output -->

- [🚀 Quick Start](#-quick-start)
- [🔧 Configuration](#-configuration)
- [Plugin Options](#plugin-options)
- [Disabling New Architecture](#disabling-new-architecture)
- [Adding push capabilities](#adding-push-capabilities)
- [Adding Deeplinks](#adding-deeplinks)
- [Configuring ProGuard](#configuring-proguardhttpsreactnativedevdocssigned-apk-androidenabling-proguard-to-reduce-the-size-of-the-apk-optional)
- [✅ Requirements and Limitations](#-requirements-and-limitations)
- [🎉 Features](#-features)
- [Push Notifications](#push-notifications)
- [Deep Links](#deep-links)
- [⁉️ Troubleshooting](#️-troubleshooting)
- [Native Module Not Found](#native-module-not-found)
- [Failed to delete [ios|android] code: ENOTEMPTY: directory not empty](#failed-to-delete-iosandroid-code-enotempty-directory-not-empty)
- [👏 Contributing](#-contributing)
- [📝 License](#-license)
- [💬 Support](#-support)
- [📚 Further Reading](#-further-reading)

- [@iterable/expo-plugin](#iterableexpo-plugin)
- [🚀 Quick Start](#-quick-start)
- [🔧 Configuration](#-configuration)
- [Plugin Options](#plugin-options)
- [Disabling New Architecture](#disabling-new-architecture)
- [Adding push capabilities](#adding-push-capabilities)
- [iOS](#ios)
- [Android](#android)
- [Adding Deeplinks](#adding-deeplinks)
- [iOS](#ios-1)
- [Android](#android-1)
- [Configuring ProGuard](#configuring-proguard)
- [Configuring for EAS Builds](#configuring-for-eas-builds)
- [iOS EAS Build Configuration](#ios-eas-build-configuration)
- [Finding Your EAS Project ID](#finding-your-eas-project-id)
- [Troubleshooting EAS Build Issues](#troubleshooting-eas-build-issues)
- [✅ Requirements and Limitations](#-requirements-and-limitations)
- [🎉 Features](#-features)
- [Push Notifications](#push-notifications)
- [iOS](#ios-2)
- [Android](#android-2)
- [Deep Links](#deep-links)
- [iOS](#ios-3)
- [Android](#android-3)
- [⁉️ Troubleshooting](#️-troubleshooting)
- [Native Module Not Found](#native-module-not-found)
- [Failed to delete \[ios|android\] code: ENOTEMPTY: directory not empty](#failed-to-delete-iosandroid-code-enotempty-directory-not-empty)
- [👏 Contributing](#-contributing)
- [📝 License](#-license)
- [💬 Support](#-support)
- [📚 Further Reading](#-further-reading)
<!-- /code_chunk_output -->

## 🚀 Quick Start
Expand Down Expand Up @@ -272,6 +282,96 @@ The overall code in your _app.json_ file should look something like this:

Learn more in the [Configure Proguard](https://support.iterable.com/hc/en-us/articles/360035019712-Iterable-s-Android-SDK#step-4-configure-proguard) section of Iterables Android SDK setup docs.

### Configuring for EAS Builds

When building your app with EAS Build, you may encounter signing errors related to the `IterableExpoRichPush` notification service extension target that this plugin creates. This target needs to be properly configured in your `app.json` file for EAS builds to succeed.

#### iOS EAS Build Configuration

To resolve signing issues with the `IterableExpoRichPush` target, you need to add the app extension configuration to your `app.json` file. Add the following to your `expo.extra.eas` configuration:

```json
{
"expo": {
"ios": {
"bundleIdentifier": "your.app.bundle.id"
},
"extra": {
"eas": {
"projectId": "YOUR_EAS_PROJECT_ID",
"build": {
"experimental": {
"ios": {
"appExtensions": [
{
"targetName": "IterableExpoRichPush",
"bundleIdentifier": "your.app.bundle.id.IterableExpoRichPush"
}
]
}
}
}
}
}
}
}
```

**Example Configuration:**
If your EAS project ID is `abc123` and your bundle identifier is `com.myapp`:

```json
{
"expo": {
"ios": {
"bundleIdentifier": "com.myapp"
},
"extra": {
"eas": {
"projectId": "abc123",
"build": {
"experimental": {
"ios": {
"appExtensions": [
{
"targetName": "IterableExpoRichPush",
"bundleIdentifier": "com.myapp.IterableExpoRichPush"
}
]
}
}
}
}
}
}
}
```

Comment on lines +291 to +349
Copy link
Member

Choose a reason for hiding this comment

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

Very clear instructions. Great!

#### Finding Your EAS Project ID

To find your EAS project ID, run:
```bash
eas project:info
```

#### Troubleshooting EAS Build Issues

If you encounter the error "Signing for 'IterableExpoRichPush' requires a development team" after adding the above configuration:

1. Ensure your EAS credentials are properly configured:
```bash
eas credentials
```

2. Verify that your Apple Developer account has the necessary capabilities for push notifications

3. Try clearing the build cache:
```bash
eas build --platform ios --profile development --clear-cache
```

4. If issues persist, ensure your bundle identifier follows the correct pattern: `your.main.bundle.id.IterableExpoRichPush`

## ✅ Requirements and Limitations

- From v2.0.2,`@iterable/react-native-sdk` supports React Native's New
Expand Down
22 changes: 20 additions & 2 deletions example/app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"expo": {
"name": "expo-plugin-example",
"slug": "expo-plugin-example",
"slug": "iterable-expo-plugin",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
Expand Down Expand Up @@ -73,6 +73,24 @@
"requestPermissionsForPushNotifications": true
}
]
]
],
"extra": {
"eas": {
"projectId": "5bf45a1e-280f-4e44-9d93-db8f09a4274d",
"build": {
"experimental": {
"ios": {
"appExtensions": [
{
"targetName": "IterableExpoRichPush",
"bundleIdentifier": "expo.modules.adapters.iterable.example.IterableExpoRichPush"
}
]
}
}
}
}
},
"owner": "iterable"
}
}
19 changes: 19 additions & 0 deletions example/eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"cli": {
"version": ">= 16.3.3",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
Loading