`excludedPackages` not working due to nested `Podfile` target
The generated Podfile nests the App Clip target inside the main app target, which causes the App Clip target to inherit all pods from the parent target. This completely breaks the excludedPackages functionality, as excluded packages are still included in the App Clip build.
Root Cause
https://github.com/bndkt/react-native-app-clip/blob/84107d1272c16a887ebcf763e62b6ddb4e6623c9/plugin/src/withPodfile.ts#L79-L80
This inserts the App Clip target code right after the main target's use_expo_modules! call, making it a nested target instead of a sibling target.
Current Behavior
Generated Podfile structure:
target 'MainApp' do
use_expo_modules!
target 'AppClip' do # Nested - inherits all parent pods
exclude = ["firebase", "stripe", ...]
use_expo_modules!(exclude: exclude) # This has no effect
# ... rest of config
end
# main app config continues...
end
Expected Behavior
The App Clip target should be a sibling of the main app target:
target 'AppClip' do # Sibling - independent pods
exclude = ["firebase", "stripe", ...]
use_expo_modules!(exclude: exclude) # This will work
# ... config
end
target 'MainApp' do
use_expo_modules!
# ... config
end
Possible Fix
Update the mergeContents parameters in withPodfile.ts:
anchor: "prepare_react_native_project!",
offset: 1,
This would place the App Clip target right before the main app target declaration, making them sibling targets.
This may related with #79 or other issues - I didn't checked.