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
|
anchor: "use_expo_modules!", |
|
offset: 0, |
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.
The generated
Podfilenests 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 theexcludedPackagesfunctionality, as excluded packages are still included in the App Clip build.Root Cause
react-native-app-clip/plugin/src/withPodfile.ts
Lines 79 to 80 in 84107d1
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:
Expected Behavior
The App Clip target should be a sibling of the main app target:
Possible Fix
Update the
mergeContentsparameters inwithPodfile.ts: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.