Skip to content

Commit

Permalink
fix: improve code signing for Pods
Browse files Browse the repository at this point in the history
  • Loading branch information
robsonos committed Dec 18, 2023
1 parent cb25dda commit 6a0b6c4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions example/ios/App/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,25 @@ end

post_install do |installer|
assertDeploymentTarget(installer)

# Get main project development team id
dev_team = ""
project = installer.aggregate_targets.first.user_project
project.targets.each do |target|
target.build_configurations.each do |config|
if dev_team.empty? && !config.build_settings['DEVELOPMENT_TEAM'].nil?
dev_team = config.build_settings['DEVELOPMENT_TEAM']
end
end
end

# Apply development team to all pod targets
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['DEVELOPMENT_TEAM'] = dev_team
config.build_settings['CODE_SIGN_STYLE'] = 'Automatic'
config.build_settings['CODE_SIGN_IDENTITY'] = 'iPhone Developer'
config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = ''
end
end
end

0 comments on commit 6a0b6c4

Please sign in to comment.