diff --git a/CHANGELOG.md b/CHANGELOG.md index 2282332819..e8c4863d69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` [Dimitris Koutsogiorgas](https://github.com/dnkoutso) [#10950](https://github.com/CocoaPods/CocoaPods/pull/10950) +* Fix setting `LD_RUNTIME_SEARCH_PATHS` for aggregate targets that include dynamic xcframeworks. + [Dimitris Koutsogiorgas](https://github.com/dnkoutso) + [#11158](https://github.com/CocoaPods/CocoaPods/pull/11158) + ##### Bug Fixes * None. diff --git a/lib/cocoapods/sandbox/file_accessor.rb b/lib/cocoapods/sandbox/file_accessor.rb index 74e06b42ba..10d1bc4b73 100644 --- a/lib/cocoapods/sandbox/file_accessor.rb +++ b/lib/cocoapods/sandbox/file_accessor.rb @@ -179,7 +179,7 @@ def vendored_dynamic_frameworks end end - # @return [Array] The paths of the dynamic xcframework bundles + # @return [Array] The paths of the static xcframework bundles # that come shipped with the Pod. # def vendored_static_xcframeworks @@ -188,6 +188,15 @@ def vendored_static_xcframeworks end end + # @return [Array] The paths of the dynamic xcframework bundles + # that come shipped with the Pod. + # + def vendored_dynamic_xcframeworks + vendored_xcframeworks.select do |path| + Xcode::XCFramework.new(spec.name, path).build_type == BuildType.dynamic_framework + end + end + # @return [Array] The paths of the static (fake) framework # bundles that come shipped with the Pod. # diff --git a/lib/cocoapods/target/build_settings.rb b/lib/cocoapods/target/build_settings.rb index cf046fbce2..88519eb563 100644 --- a/lib/cocoapods/target/build_settings.rb +++ b/lib/cocoapods/target/build_settings.rb @@ -1288,7 +1288,7 @@ def other_swift_flags_without_swift? define_build_settings_method :any_vendored_dynamic_artifacts?, :memoized => true do pod_targets.any? do |pt| pt.file_accessors.any? do |fa| - !fa.vendored_dynamic_artifacts.empty? + !fa.vendored_dynamic_artifacts.empty? || !fa.vendored_dynamic_xcframeworks.empty? end end end diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/Info.plist b/spec/fixtures/coconut-lib/CoconutLib.xcframework/Info.plist new file mode 100644 index 0000000000..41c34915e6 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/Info.plist @@ -0,0 +1,106 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + tvos-x86_64-simulator + LibraryPath + CoconutLib.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + tvos + SupportedPlatformVariant + simulator + + + LibraryIdentifier + tvos-arm64 + LibraryPath + CoconutLib.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + tvos + + + LibraryIdentifier + macos-x86_64 + LibraryPath + CoconutLib.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + macos + + + LibraryIdentifier + ios-armv7_arm64 + LibraryPath + CoconutLib.framework + SupportedArchitectures + + armv7 + arm64 + + SupportedPlatform + ios + + + LibraryIdentifier + watchos-i386-simulator + LibraryPath + CoconutLib.framework + SupportedArchitectures + + i386 + + SupportedPlatform + watchos + SupportedPlatformVariant + simulator + + + LibraryIdentifier + watchos-armv7k_arm64_32 + LibraryPath + CoconutLib.framework + SupportedArchitectures + + armv7k + arm64_32 + + SupportedPlatform + watchos + + + LibraryIdentifier + ios-i386_x86_64-simulator + LibraryPath + CoconutLib.framework + SupportedArchitectures + + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/CoconutLib b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/CoconutLib new file mode 100755 index 0000000000..9ff87bf7b0 Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/CoconutLib differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Headers/Coconut.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Headers/Coconut.h new file mode 100644 index 0000000000..4e98be6d36 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Headers/Coconut.h @@ -0,0 +1,6 @@ + +#import + +/** Coconuts are cool */ +@interface CoconutObj : NSObject +@end diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Headers/CoconutLib.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Headers/CoconutLib.h new file mode 100644 index 0000000000..aa6a6afefc --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Headers/CoconutLib.h @@ -0,0 +1,19 @@ +// +// CoconutLib.h +// CoconutLib +// +// Created by Eric Amorde on 10/20/19. +// Copyright © 2019 CocoaPods. All rights reserved. +// + +#import + +//! Project version number for CoconutLib. +FOUNDATION_EXPORT double CoconutLibVersionNumber; + +//! Project version string for CoconutLib. +FOUNDATION_EXPORT const unsigned char CoconutLibVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Info.plist b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Info.plist new file mode 100644 index 0000000000..f8e26ea774 Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Info.plist differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Modules/module.modulemap b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Modules/module.modulemap new file mode 100644 index 0000000000..935662f517 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-armv7_arm64/CoconutLib.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module CoconutLib { + umbrella header "CoconutLib.h" + + export * + module * { export * } +} diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/CoconutLib b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/CoconutLib new file mode 100755 index 0000000000..e8d92a2eed Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/CoconutLib differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Headers/Coconut.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Headers/Coconut.h new file mode 100644 index 0000000000..4e98be6d36 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Headers/Coconut.h @@ -0,0 +1,6 @@ + +#import + +/** Coconuts are cool */ +@interface CoconutObj : NSObject +@end diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Headers/CoconutLib.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Headers/CoconutLib.h new file mode 100644 index 0000000000..aa6a6afefc --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Headers/CoconutLib.h @@ -0,0 +1,19 @@ +// +// CoconutLib.h +// CoconutLib +// +// Created by Eric Amorde on 10/20/19. +// Copyright © 2019 CocoaPods. All rights reserved. +// + +#import + +//! Project version number for CoconutLib. +FOUNDATION_EXPORT double CoconutLibVersionNumber; + +//! Project version string for CoconutLib. +FOUNDATION_EXPORT const unsigned char CoconutLibVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Info.plist b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Info.plist new file mode 100644 index 0000000000..db46baf3d7 Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Info.plist differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Modules/module.modulemap b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Modules/module.modulemap new file mode 100644 index 0000000000..935662f517 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module CoconutLib { + umbrella header "CoconutLib.h" + + export * + module * { export * } +} diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/_CodeSignature/CodeResources b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000000..41ea408c1d --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/ios-i386_x86_64-simulator/CoconutLib.framework/_CodeSignature/CodeResources @@ -0,0 +1,147 @@ + + + + + files + + Headers/Coconut.h + + Ik11Bk3/ssS7b9IAbABo7fXHDXc= + + Headers/CoconutLib.h + + 0GEcr1CRa4n6sQrt4PgsVtiwLLE= + + Info.plist + + c5aFO22e3IHeNuvxzSP+4Vp6J4o= + + Modules/module.modulemap + + XBUmhbp5sPDDR0vApgYJ0zALOWI= + + + files2 + + Headers/Coconut.h + + hash + + Ik11Bk3/ssS7b9IAbABo7fXHDXc= + + hash2 + + Y0JMEPdjeR1ijdoNxhnkdG+dC3aGaoV/tktWLk58Tv4= + + + Headers/CoconutLib.h + + hash + + 0GEcr1CRa4n6sQrt4PgsVtiwLLE= + + hash2 + + i0yhQAstAqNBZIj9gqe5XY1GWc6nOWk8ENgA8uHl2DE= + + + Modules/module.modulemap + + hash + + XBUmhbp5sPDDR0vApgYJ0zALOWI= + + hash2 + + mhxBFlNwG/ASIqNY6yYtxs7CuysII4NrdaoGkHwJLCA= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/CoconutLib b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/CoconutLib new file mode 120000 index 0000000000..0d8e9f19f6 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/CoconutLib @@ -0,0 +1 @@ +Versions/Current/CoconutLib \ No newline at end of file diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Headers b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Headers new file mode 120000 index 0000000000..a177d2a6b9 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Resources b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Resources new file mode 120000 index 0000000000..953ee36f3b --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/CoconutLib b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/CoconutLib new file mode 100755 index 0000000000..697f35bee2 Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/CoconutLib differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/Headers/Coconut.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/Headers/Coconut.h new file mode 100644 index 0000000000..4e98be6d36 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/Headers/Coconut.h @@ -0,0 +1,6 @@ + +#import + +/** Coconuts are cool */ +@interface CoconutObj : NSObject +@end diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/Headers/CoconutLib_macOS.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/Headers/CoconutLib_macOS.h new file mode 100644 index 0000000000..6172537a9a --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/Headers/CoconutLib_macOS.h @@ -0,0 +1,19 @@ +// +// CoconutLib_macOS.h +// CoconutLib-macOS +// +// Created by Eric Amorde on 10/20/19. +// Copyright © 2019 CocoaPods. All rights reserved. +// + +#import + +//! Project version number for CoconutLib_macOS. +FOUNDATION_EXPORT double CoconutLib_macOSVersionNumber; + +//! Project version string for CoconutLib_macOS. +FOUNDATION_EXPORT const unsigned char CoconutLib_macOSVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/Resources/Info.plist b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000000..5d28880c58 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 19A602 + CFBundleDevelopmentRegion + en + CFBundleExecutable + CoconutLib + CFBundleIdentifier + org.cocoapods.CoconutLib + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + CoconutLib + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 11A1027 + DTPlatformVersion + GM + DTSDKBuild + 19A547 + DTSDKName + macosx10.15 + DTXcode + 1110 + DTXcodeBuild + 11A1027 + LSMinimumSystemVersion + 10.15 + NSHumanReadableCopyright + Copyright © 2019 CocoaPods. All rights reserved. + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/_CodeSignature/CodeResources b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 0000000000..31087d3302 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,142 @@ + + + + + files + + Resources/Info.plist + + JblfkGI+5GcoQC90rCKdn04lQCY= + + + files2 + + Headers/Coconut.h + + hash2 + + Y0JMEPdjeR1ijdoNxhnkdG+dC3aGaoV/tktWLk58Tv4= + + + Headers/CoconutLib_macOS.h + + hash2 + + 4oDk2AXU1LYVJFiEq3nK+OFNwYJ/dW/pZQBXLonHUmY= + + + Resources/Info.plist + + hash2 + + F6uXja+WIGBcrJmxFougVbNNDH40H/tBSx2sYHGHP8Y= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/Current b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/Current new file mode 120000 index 0000000000..8c7e5a667f --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/macos-x86_64/CoconutLib.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/CoconutLib b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/CoconutLib new file mode 100755 index 0000000000..6381cb224d Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/CoconutLib differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Headers/Coconut.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Headers/Coconut.h new file mode 100644 index 0000000000..4e98be6d36 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Headers/Coconut.h @@ -0,0 +1,6 @@ + +#import + +/** Coconuts are cool */ +@interface CoconutObj : NSObject +@end diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Headers/CoconutLib.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Headers/CoconutLib.h new file mode 100644 index 0000000000..aa6a6afefc --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Headers/CoconutLib.h @@ -0,0 +1,19 @@ +// +// CoconutLib.h +// CoconutLib +// +// Created by Eric Amorde on 10/20/19. +// Copyright © 2019 CocoaPods. All rights reserved. +// + +#import + +//! Project version number for CoconutLib. +FOUNDATION_EXPORT double CoconutLibVersionNumber; + +//! Project version string for CoconutLib. +FOUNDATION_EXPORT const unsigned char CoconutLibVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Info.plist b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Info.plist new file mode 100644 index 0000000000..72716d9de3 Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Info.plist differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Modules/module.modulemap b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Modules/module.modulemap new file mode 100644 index 0000000000..935662f517 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-arm64/CoconutLib.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module CoconutLib { + umbrella header "CoconutLib.h" + + export * + module * { export * } +} diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/CoconutLib b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/CoconutLib new file mode 100755 index 0000000000..827479965a Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/CoconutLib differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Headers/Coconut.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Headers/Coconut.h new file mode 100644 index 0000000000..4e98be6d36 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Headers/Coconut.h @@ -0,0 +1,6 @@ + +#import + +/** Coconuts are cool */ +@interface CoconutObj : NSObject +@end diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Headers/CoconutLib.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Headers/CoconutLib.h new file mode 100644 index 0000000000..aa6a6afefc --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Headers/CoconutLib.h @@ -0,0 +1,19 @@ +// +// CoconutLib.h +// CoconutLib +// +// Created by Eric Amorde on 10/20/19. +// Copyright © 2019 CocoaPods. All rights reserved. +// + +#import + +//! Project version number for CoconutLib. +FOUNDATION_EXPORT double CoconutLibVersionNumber; + +//! Project version string for CoconutLib. +FOUNDATION_EXPORT const unsigned char CoconutLibVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Info.plist b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Info.plist new file mode 100644 index 0000000000..37c7b4c344 Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Info.plist differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Modules/module.modulemap b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Modules/module.modulemap new file mode 100644 index 0000000000..935662f517 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module CoconutLib { + umbrella header "CoconutLib.h" + + export * + module * { export * } +} diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/_CodeSignature/CodeResources b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000000..4efd0b0fa9 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/tvos-x86_64-simulator/CoconutLib.framework/_CodeSignature/CodeResources @@ -0,0 +1,135 @@ + + + + + files + + Headers/Coconut.h + + Ik11Bk3/ssS7b9IAbABo7fXHDXc= + + Headers/CoconutLib.h + + 0GEcr1CRa4n6sQrt4PgsVtiwLLE= + + Info.plist + + 1GCNyKF8UizATYtIAIZpzjqUzOE= + + Modules/module.modulemap + + XBUmhbp5sPDDR0vApgYJ0zALOWI= + + + files2 + + Headers/Coconut.h + + hash2 + + Y0JMEPdjeR1ijdoNxhnkdG+dC3aGaoV/tktWLk58Tv4= + + + Headers/CoconutLib.h + + hash2 + + i0yhQAstAqNBZIj9gqe5XY1GWc6nOWk8ENgA8uHl2DE= + + + Modules/module.modulemap + + hash2 + + mhxBFlNwG/ASIqNY6yYtxs7CuysII4NrdaoGkHwJLCA= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/CoconutLib b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/CoconutLib new file mode 100755 index 0000000000..f2cf115f74 Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/CoconutLib differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Headers/Coconut.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Headers/Coconut.h new file mode 100644 index 0000000000..4e98be6d36 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Headers/Coconut.h @@ -0,0 +1,6 @@ + +#import + +/** Coconuts are cool */ +@interface CoconutObj : NSObject +@end diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Headers/CoconutLib.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Headers/CoconutLib.h new file mode 100644 index 0000000000..aa6a6afefc --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Headers/CoconutLib.h @@ -0,0 +1,19 @@ +// +// CoconutLib.h +// CoconutLib +// +// Created by Eric Amorde on 10/20/19. +// Copyright © 2019 CocoaPods. All rights reserved. +// + +#import + +//! Project version number for CoconutLib. +FOUNDATION_EXPORT double CoconutLibVersionNumber; + +//! Project version string for CoconutLib. +FOUNDATION_EXPORT const unsigned char CoconutLibVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Info.plist b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Info.plist new file mode 100644 index 0000000000..ab9dd3a878 Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Info.plist differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Modules/module.modulemap b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Modules/module.modulemap new file mode 100644 index 0000000000..935662f517 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-armv7k_arm64_32/CoconutLib.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module CoconutLib { + umbrella header "CoconutLib.h" + + export * + module * { export * } +} diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/CoconutLib b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/CoconutLib new file mode 100755 index 0000000000..9b1190cc83 Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/CoconutLib differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Headers/Coconut.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Headers/Coconut.h new file mode 100644 index 0000000000..4e98be6d36 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Headers/Coconut.h @@ -0,0 +1,6 @@ + +#import + +/** Coconuts are cool */ +@interface CoconutObj : NSObject +@end diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Headers/CoconutLib.h b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Headers/CoconutLib.h new file mode 100644 index 0000000000..aa6a6afefc --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Headers/CoconutLib.h @@ -0,0 +1,19 @@ +// +// CoconutLib.h +// CoconutLib +// +// Created by Eric Amorde on 10/20/19. +// Copyright © 2019 CocoaPods. All rights reserved. +// + +#import + +//! Project version number for CoconutLib. +FOUNDATION_EXPORT double CoconutLibVersionNumber; + +//! Project version string for CoconutLib. +FOUNDATION_EXPORT const unsigned char CoconutLibVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Info.plist b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Info.plist new file mode 100644 index 0000000000..39305c0beb Binary files /dev/null and b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Info.plist differ diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Modules/module.modulemap b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Modules/module.modulemap new file mode 100644 index 0000000000..935662f517 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module CoconutLib { + umbrella header "CoconutLib.h" + + export * + module * { export * } +} diff --git a/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/_CodeSignature/CodeResources b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000000..e7e694e198 --- /dev/null +++ b/spec/fixtures/coconut-lib/CoconutLib.xcframework/watchos-i386-simulator/CoconutLib.framework/_CodeSignature/CodeResources @@ -0,0 +1,135 @@ + + + + + files + + Headers/Coconut.h + + Ik11Bk3/ssS7b9IAbABo7fXHDXc= + + Headers/CoconutLib.h + + 0GEcr1CRa4n6sQrt4PgsVtiwLLE= + + Info.plist + + 1iBV+4QrCAe7qFqRKwA1ttpVeIw= + + Modules/module.modulemap + + XBUmhbp5sPDDR0vApgYJ0zALOWI= + + + files2 + + Headers/Coconut.h + + hash2 + + Y0JMEPdjeR1ijdoNxhnkdG+dC3aGaoV/tktWLk58Tv4= + + + Headers/CoconutLib.h + + hash2 + + i0yhQAstAqNBZIj9gqe5XY1GWc6nOWk8ENgA8uHl2DE= + + + Modules/module.modulemap + + hash2 + + mhxBFlNwG/ASIqNY6yYtxs7CuysII4NrdaoGkHwJLCA= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/spec/fixtures/xcframeworks/xcframework-spec.podspec b/spec/fixtures/xcframeworks/xcframework-spec.podspec new file mode 100644 index 0000000000..883a19686e --- /dev/null +++ b/spec/fixtures/xcframeworks/xcframework-spec.podspec @@ -0,0 +1,12 @@ +Pod::Spec.new do |s| + s.name = 'xcframework-spec' + s.version = '1.0' + s.author = { 'xcframework-spec' => 'xcframework-spec@xcframework-spec.com' } + s.summary = 'Use this podspec for tests to point to different xcframeworks for testing' + s.description = 'Use this podspec for tests to point to different xcframeworks for testing' + s.homepage = 'http://xcframework-spec.com' + s.source = { :git => 'http://xcframework-spec-corp.local/xcframework-spec-lib.git', :tag => 'v1.0' } + s.license = 'MIT' + + s.platform = :ios, '8.0' +end diff --git a/spec/unit/target/build_settings/aggregate_target_settings_spec.rb b/spec/unit/target/build_settings/aggregate_target_settings_spec.rb index d0f3467de7..b8ceb45a90 100644 --- a/spec/unit/target/build_settings/aggregate_target_settings_spec.rb +++ b/spec/unit/target/build_settings/aggregate_target_settings_spec.rb @@ -342,6 +342,24 @@ def specs end end + describe 'with a vendored dynamic xcframework pod' do + before do + coconut_pod_target = @pod_targets.first + coconut_pod_target.stubs(:build_type).returns(BuildType.static_library) + end + + def specs + spec = fixture_spec('xcframeworks/xcframework-spec.podspec') + spec.vendored_frameworks = 'DynamicFramework/CoconutLib.xcframework' + [spec] + end + + it 'includes default runpath search path list when linking vendored dynamic xcframework' do + @target.stubs(:build_type => BuildType.dynamic_framework) + @generator.generate.to_hash['LD_RUNPATH_SEARCH_PATHS'].should == "$(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'" + end + end + describe 'with a scoped pod target' do def specs [