Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CocoaPods 1.16.2 #13989

Merged
merged 6 commits into from
Oct 31, 2024
Merged

CocoaPods 1.16.2 #13989

merged 6 commits into from
Oct 31, 2024

Conversation

paulb777
Copy link
Member

@paulb777 paulb777 commented Oct 29, 2024

This PR worked through integration testing of CocoaPods 1.16.*, finding issues with 1.16.0 and 1.16.1 before settling on 1.16.2

@paulb777
Copy link
Member Author

Looks like pod lib lint testing is blocked on CocoaPods/CocoaPods#12664 (comment).

There's a potential workaround at CocoaPods/CocoaPods#12664 (comment)

@paulb777 paulb777 marked this pull request as draft October 29, 2024 16:02
@paulb777 paulb777 changed the title CocoaPods 1.16.0 CocoaPods 1.16.1 Oct 29, 2024
@paulb777
Copy link
Member Author

Removing GENERATE_INFOPLIST_FILE = YES; fixes the problem running tvOS test_specs in pod lib lint

@paulb777
Copy link
Member Author

Settings diff:

diff -r gen/FirebaseCoreInternal/Pods/Pods.xcodeproj/project.pbxproj /Users/paulbeusterien/gh-storage/firebase-ios-sdk/gen/FirebaseCoreInternal/Pods/Pods.xcodeproj/project.pbxproj
155c155
< 		46EB2E000003D0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
---
> 		46EB2E000003D0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS18.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
712,713c712,713
< 				LastSwiftUpdateCheck = 1500;
< 				LastUpgradeCheck = 1500;
---
> 				LastSwiftUpdateCheck = 1600;
> 				LastUpgradeCheck = 1600;
732a733
> 			preferredProjectObjectVersion = 77;
1031a1033
> 				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
1035,1036c1037
< 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
< 				CLANG_CXX_LIBRARY = "libc++";
---
> 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
1066c1067,1068
< 				GCC_C_LANGUAGE_STANDARD = gnu11;
---
> 				ENABLE_USER_SCRIPT_SANDBOXING = YES;
> 				GCC_C_LANGUAGE_STANDARD = gnu17;
1080a1083
> 				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
1097a1101
> 				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
1101,1102c1105
< 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
< 				CLANG_CXX_LIBRARY = "libc++";
---
> 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
1132c1135,1136
< 				GCC_C_LANGUAGE_STANDARD = gnu11;
---
> 				ENABLE_USER_SCRIPT_SANDBOXING = YES;
> 				GCC_C_LANGUAGE_STANDARD = gnu17;
1143a1148
> 				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
1149d1153
< 				SWIFT_OPTIMIZATION_LEVEL = "-O";
1159a1164
> 				BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
1167a1173,1174
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
1168a1176
> 				GENERATE_INFOPLIST_FILE = NO;
1175a1184
> 				MARKETING_VERSION = 1.0;
1176a1186,1187
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
1181a1193,1194
> 				SWIFT_EMIT_LOC_STRINGS = YES;
> 				SWIFT_INSTALL_OBJC_HEADER = YES;
1194a1208
> 				BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
1202a1217,1218
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
1203a1220
> 				GENERATE_INFOPLIST_FILE = NO;
1210a1228
> 				MARKETING_VERSION = 1.0;
1211a1230,1231
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
1216a1237,1238
> 				SWIFT_EMIT_LOC_STRINGS = YES;
> 				SWIFT_INSTALL_OBJC_HEADER = YES;
1269a1292,1293
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
1270a1295
> 				GENERATE_INFOPLIST_FILE = NO;
1274a1300
> 				SWIFT_INSTALL_OBJC_HEADER = YES;
1292a1319,1320
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
1293a1322
> 				GENERATE_INFOPLIST_FILE = NO;
1297a1327
> 				SWIFT_INSTALL_OBJC_HEADER = YES;
1314a1345,1346
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
1315a1348
> 				GENERATE_INFOPLIST_FILE = NO;
1319a1353
> 				SWIFT_INSTALL_OBJC_HEADER = YES;
1337a1372,1373
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
1338a1375
> 				GENERATE_INFOPLIST_FILE = NO;
1342a1380
> 				SWIFT_INSTALL_OBJC_HEADER = YES;
1354a1393
> 				GENERATE_INFOPLIST_FILE = YES;
1355a1395,1397
> 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
> 				INFOPLIST_KEY_UIMainStoryboardFile = Main;
> 				INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
1359a1402
> 				MARKETING_VERSION = 1.0;
1362a1406
> 				SWIFT_EMIT_LOC_STRINGS = YES;
1374a1419
> 				GENERATE_INFOPLIST_FILE = YES;
1375a1421,1423
> 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
> 				INFOPLIST_KEY_UIMainStoryboardFile = Main;
> 				INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
1379a1428
> 				MARKETING_VERSION = 1.0;
1382a1432
> 				SWIFT_EMIT_LOC_STRINGS = YES;
1399a1450,1452
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
> 				GENERATE_INFOPLIST_FILE = NO;
1406a1460
> 				MARKETING_VERSION = 1.0;
1407a1462,1463
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
1412a1469,1470
> 				SWIFT_EMIT_LOC_STRINGS = YES;
> 				SWIFT_INSTALL_OBJC_HEADER = YES;
1433a1492,1494
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
> 				GENERATE_INFOPLIST_FILE = NO;
1440a1502
> 				MARKETING_VERSION = 1.0;
1441a1504,1505
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
1446a1511,1512
> 				SWIFT_EMIT_LOC_STRINGS = YES;
> 				SWIFT_INSTALL_OBJC_HEADER = YES;
1493a1560
> 				BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
1501a1569,1571
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
> 				GENERATE_INFOPLIST_FILE = YES;
1509a1580
> 				MARKETING_VERSION = 1.0;
1510a1582,1583
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
1517a1591,1592
> 				SWIFT_EMIT_LOC_STRINGS = YES;
> 				SWIFT_INSTALL_OBJC_HEADER = NO;
1530a1606
> 				BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
1538a1615,1617
> 				ENABLE_MODULE_VERIFIER = NO;
> 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
> 				GENERATE_INFOPLIST_FILE = YES;
1546a1626
> 				MARKETING_VERSION = 1.0;
1547a1628,1629
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
> 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
1554a1637,1638
> 				SWIFT_EMIT_LOC_STRINGS = YES;
> 				SWIFT_INSTALL_OBJC_HEADER = NO;

@paulb777
Copy link
Member Author

Firestore issue:

Screenshot 2024-10-29 at 2 37 23 PM

@paulb777
Copy link
Member Author

paulb777 commented Oct 29, 2024

The Firestore build issue is by changing CLANG_CXX_LANGUAGE_STANDARD to gnu++14 for the abseil build target. Some of our podspecs do that with xcconfig options, but not the abseil dependency.

See https://github.com/CocoaPods/Specs/blob/master/Specs/c/8/7/gRPC-C++/1.67.0/gRPC-C++.podspec.json#L32 and https://github.com/CocoaPods/Specs/blob/master/Specs/3/8/6/abseil/1.20240722.0/abseil.podspec.json#L22

@phaiminh
Copy link

The Firestore build issue is by changing CLANG_CXX_LANGUAGE_STANDARD to gnu++14 for the abseil build target. Some of our podspecs do that with xcconfig options, but not the abseil dependency.

See https://github.com/CocoaPods/Specs/blob/master/Specs/c/8/7/gRPC-C++/1.67.0/gRPC-C++.podspec.json#L32 and https://github.com/CocoaPods/Specs/blob/master/Specs/3/8/6/abseil/1.20240722.0/abseil.podspec.json#L22

Many thanks @paulb777

@KevinSinSH
Copy link

@paulb777 @phaiminh Hi both, I encountered the undefined symbol problem as well. I see you have posted 2 links, but I am confused in how to fix that in my project. Could you please help a bit?

@KevinSinSH
Copy link

@paulb777 @phaiminh Hi both, I encountered the undefined symbol problem as well. I see you have posted 2 links, but I am confused in how to fix that in my project. Could you please help a bit?

I am able to workaround with the following
firebase/flutterfire#13563 (comment)

@mikehardy
Copy link
Contributor

mikehardy commented Oct 30, 2024

Add this to your Podfile if you want a workaround, note you may already have a post_install section, so you would just use the inner part(s):

[note: this was edited to be gnu++14 not c++14]

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'abseil'
      Pod::UI.puts "Workaround: Configuring abseil to use gnu++14 language standard for cocoapods 1.16+ compatibility".yellow
      Pod::UI.puts "            Remove workaround when upstream issue fixed https://github.com/firebase/firebase-ios-sdk/issues/13996".yellow
      target.build_configurations.each do |config|
        config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'gnu++14'
      end
    end

You will need to run pod install again after adding this, so that it executes and updates the build setting

@sgamzeo
Copy link

sgamzeo commented Oct 31, 2024

The Firestore build issue is by changing CLANG_CXX_LANGUAGE_STANDARD to gnu++14 for the abseil build target. Some of our podspecs do that with xcconfig options, but not the abseil dependency.

See https://github.com/CocoaPods/Specs/blob/master/Specs/c/8/7/gRPC-C++/1.67.0/gRPC-C++.podspec.json#L32 and https://github.com/CocoaPods/Specs/blob/master/Specs/3/8/6/abseil/1.20240722.0/abseil.podspec.json#L22

This succesfully solved the issue. Thank you so much

@phaiminh
Copy link

Add this to your Podfile if you want a workaround, note you may already have a post_install section, so you would just use the inner part(s):

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'abseil'
      Pod::UI.puts "Workaround: Configuring abseil to use c++14 language standard for cocoapods 1.16+ compatibility".yellow
      Pod::UI.puts "            Remove workaround when upstream issue fixed https://github.com/firebase/firebase-ios-sdk/issues/13996".yellow
      target.build_configurations.each do |config|
        config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++14'
      end
    end

You will need to run pod install again after adding this, so that it executes and updates the build setting

@KevinSinSH This works for me. Please try this one

@dorklein
Copy link

Add this to your Podfile if you want a workaround, note you may already have a post_install section, so you would just use the inner part(s):

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'abseil'
      Pod::UI.puts "Workaround: Configuring abseil to use c++14 language standard for cocoapods 1.16+ compatibility".yellow
      Pod::UI.puts "            Remove workaround when upstream issue fixed https://github.com/firebase/firebase-ios-sdk/issues/13996".yellow
      target.build_configurations.each do |config|
        config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++14'
      end
    end

You will need to run pod install again after adding this, so that it executes and updates the build setting

@KevinSinSH This works for me. Please try this one

This doesn't work for me in a flutter project

@paulb777 paulb777 changed the title CocoaPods 1.16.1 CocoaPods 1.16.2 Oct 31, 2024
@paulb777 paulb777 marked this pull request as ready for review October 31, 2024 20:20
Copy link
Contributor

@andrewheard andrewheard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The SPM CI failures look unrelated (probably a flake).

@paulb777 paulb777 merged commit 32c8083 into main Oct 31, 2024
463 of 464 checks passed
@paulb777 paulb777 deleted the pb-cocoapods-116 branch October 31, 2024 21:06
@KevinSinSH
Copy link

KevinSinSH commented Nov 1, 2024

Add this to your Podfile if you want a workaround, note you may already have a post_install section, so you would just use the inner part(s):

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'abseil'
      Pod::UI.puts "Workaround: Configuring abseil to use c++14 language standard for cocoapods 1.16+ compatibility".yellow
      Pod::UI.puts "            Remove workaround when upstream issue fixed https://github.com/firebase/firebase-ios-sdk/issues/13996".yellow
      target.build_configurations.each do |config|
        config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++14'
      end
    end

You will need to run pod install again after adding this, so that it executes and updates the build setting

@KevinSinSH This works for me. Please try this one

Yes, thanks. I used the one commented here and solved, i guess it is basically the same. But I am unsure when this issue is fixed and can remove the workaround post install script.
#13989 (comment)

@paulb777
Copy link
Member Author

paulb777 commented Nov 1, 2024

After updating to CocoaPods 1.16.2, the issue is fixed. The post_install and any other workarounds can be removed

@firebase firebase locked as resolved and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants