SolvedCocoaPods Playgrounds regression between CocoaPods 1.4.0 and CocoaPods 1.5.0

🌈

Report

We've shipped a playground with a framework embedded using CocoaPods. It worked very well and then we started getting reports from users not being able to execute it. When digging deeper it seems there's some regression between 1.5 and 1.4. I'm aware of the fact CocoaPods never had a mission statement of fully supporting Playgrounds, but this worked in the previous version so thought it would be good to report.

There are some reports of this in #5334 (at the end) but since its a very old issue I thought it would be good to focus on the specific regression.

What did you do?

When pod install with CocoaPods 1.4.0, the Playground work as expected.
When pod install with CocoaPods 1.5.0, the Playground doesn't work and outputs module errors.

What did you expect to happen?

Work as expected.

What happened instead?

Outputs lookup errors similar to:

Playground execution failed:

error: Couldn't lookup symbols:
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA7_
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfC
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA2_
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA4_
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA6_
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA8_
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA_
  __T010RealmSwift0A0CA2C13ConfigurationV13configuration_tKcfC
  __T010RealmSwift0A0CMa
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA1_
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA3_
  __T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA5_

CocoaPods Environment

Not relevant

Project that demonstrates the issue

Here are the resulting projects on both CocoaPods 1.4.0 and CocoaPods 1.5.0.

1.4.0:
https://www.dropbox.com/s/7tr0tdrwf9c21my/regression-1.4.0.zip?dl=0

1.5.0:
https://www.dropbox.com/s/9dgt62wl9h5v4df/regression-1.5.0.zip?dl=0

I've tried using xcodeproj project-diff as suggested but couldn't get it to work. I also wanted to potentially create an integration tests in the other repo but couldn't find any instructions and wasn't sure if it's just "throwing it in before/after folders"

18 Answers

βœ”οΈAccepted Answer

@dnkoutso The workaround suggested above (@litmanenPL) does resolve the issue

# Workaround for Cocoapods issue #7606
post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
    end
end

More Issues: