aws / aws/amazon-ivs-react-native-player
1.6.0 iOS build error: AmazonIvs-Swift.h not found when using use_frameworks! :linkage => :static
- Dominant language
- TypeScript
- Stars
- 313
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
## Bug Report
### Version
`amazon-ivs-react-native-player` **1.6.0**
### Description
After upgrading from 1.5.0 to 1.6.0, iOS build fails with:
```
../../node_modules/amazon-ivs-react-native-player/ios/AmazonIvs.mm:7:9:
fatal error: 'AmazonIvs-Swift.h' file not found
#import
```
### Root Cause
The new arch migration in 1.6.0 (PR #195) introduced `AmazonIvsView.swift`, which requires importing the generated Swift header in `AmazonIvs.mm`.
The current code in `ios/AmazonIvs.mm`:
```objc
#if __has_include()
#import
#else
#import
#endif
```
Both branches fail:
1. `__has_include()` — always evaluates to `false` because CocoaPods module names cannot contain hyphens; the actual module name is `AmazonIvs`, not `AmazonIvs-Swift`
2. The `#else` fallback `` — also fails to resolve when `use_frameworks! :linkage => :static` is set in the Podfile
The correct import should be:
```objc
#import
```
### Reproduction Conditions
This issue occurs when the project uses:
```ruby
use_frameworks! :linkage => :static
```
This is a common configuration for React Native projects using Firebase or other pods that require static frameworks. In Expo-managed projects, this is set via `"ios.useFrameworks": "static"` in `Podfile.properties.json`.
### Proposed Fix
Change `ios/AmazonIvs.mm` lines 4–8 from:
```objc
#if __has_include()
#import
#else
#import
#endif
```
To:
```objc
#import
```
### Environment
- `amazon-ivs-react-native-player`: 1.6.0
- React Native: New Architecture enabled
- iOS deployment target: set by `min_ios_version_supported`
- Podfile: `use_frameworks! :linkage => :static`
Contributor guide
Assessment
This issue has not been assessed yet.