Skip to content

excludedPackages not working due to nested Podfile target #81

@changhwan0813

Description

@changhwan0813

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions