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

Rewrite XCFramework slice selection using plist metadata #11229

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`

##### Bug Fixes

* Rewrite XCFramework slice selection using plist metadata.
[Igor Makarov](https://github.com/igor-makarov)
[#11229](https://github.com/CocoaPods/CocoaPods/pull/11229)

* 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)
Expand Down
18 changes: 18 additions & 0 deletions examples/Excluded-Archs-Example/CoconutLib/CoconutLib.podspec
@@ -0,0 +1,18 @@
Pod::Spec.new do |s|
s.name = 'CoconutLib'
s.version = '1.0'
s.authors = 'Coconut Corp', { 'Monkey Boy' => 'monkey@coconut-corp.local' }
s.homepage = 'http://coconut-corp.local/coconut-lib.html'
s.summary = 'Coconuts For the Win.'
s.description = 'All the Coconuts'
s.source = { :git => 'http://coconut-corp.local/coconut-lib.git', :tag => 'v1.0' }
s.license = {
:type => 'MIT',
:text => 'Permission is hereby granted ...'
}

s.ios.deployment_target = '13.0'
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.vendored_frameworks = 'build/CoconutLib.xcframework'
end
@@ -0,0 +1,339 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
5BFCC8F6252E3C5F000564E9 /* CoconutLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BFCC8F4252E3C5F000564E9 /* CoconutLib.h */; settings = {ATTRIBUTES = (Public, ); }; };
5BFCC8FE252E3CA6000564E9 /* Coconut.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BFCC8FC252E3CA6000564E9 /* Coconut.h */; settings = {ATTRIBUTES = (Public, ); }; };
5BFCC8FF252E3CA6000564E9 /* Coconut.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BFCC8FD252E3CA6000564E9 /* Coconut.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
5BFCC8F1252E3C5F000564E9 /* CoconutLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CoconutLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5BFCC8F4252E3C5F000564E9 /* CoconutLib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoconutLib.h; sourceTree = "<group>"; };
5BFCC8F5252E3C5F000564E9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5BFCC8FC252E3CA6000564E9 /* Coconut.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Coconut.h; sourceTree = "<group>"; };
5BFCC8FD252E3CA6000564E9 /* Coconut.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Coconut.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
5BFCC8EE252E3C5F000564E9 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
5BFCC8E7252E3C5F000564E9 = {
isa = PBXGroup;
children = (
5BFCC8F3252E3C5F000564E9 /* CoconutLib */,
5BFCC8F2252E3C5F000564E9 /* Products */,
);
sourceTree = "<group>";
};
5BFCC8F2252E3C5F000564E9 /* Products */ = {
isa = PBXGroup;
children = (
5BFCC8F1252E3C5F000564E9 /* CoconutLib.framework */,
);
name = Products;
sourceTree = "<group>";
};
5BFCC8F3252E3C5F000564E9 /* CoconutLib */ = {
isa = PBXGroup;
children = (
5BFCC8F4252E3C5F000564E9 /* CoconutLib.h */,
5BFCC8F5252E3C5F000564E9 /* Info.plist */,
5BFCC8FC252E3CA6000564E9 /* Coconut.h */,
5BFCC8FD252E3CA6000564E9 /* Coconut.m */,
);
path = CoconutLib;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
5BFCC8EC252E3C5F000564E9 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
5BFCC8FE252E3CA6000564E9 /* Coconut.h in Headers */,
5BFCC8F6252E3C5F000564E9 /* CoconutLib.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
5BFCC8F0252E3C5F000564E9 /* CoconutLib */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5BFCC8F9252E3C5F000564E9 /* Build configuration list for PBXNativeTarget "CoconutLib" */;
buildPhases = (
5BFCC8EC252E3C5F000564E9 /* Headers */,
5BFCC8ED252E3C5F000564E9 /* Sources */,
5BFCC8EE252E3C5F000564E9 /* Frameworks */,
5BFCC8EF252E3C5F000564E9 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = CoconutLib;
productName = CoconutLib;
productReference = 5BFCC8F1252E3C5F000564E9 /* CoconutLib.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
5BFCC8E8252E3C5F000564E9 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1170;
TargetAttributes = {
5BFCC8F0252E3C5F000564E9 = {
CreatedOnToolsVersion = 11.7;
};
};
};
buildConfigurationList = 5BFCC8EB252E3C5F000564E9 /* Build configuration list for PBXProject "CoconutLib" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 5BFCC8E7252E3C5F000564E9;
productRefGroup = 5BFCC8F2252E3C5F000564E9 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
5BFCC8F0252E3C5F000564E9 /* CoconutLib */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
5BFCC8EF252E3C5F000564E9 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
5BFCC8ED252E3C5F000564E9 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5BFCC8FF252E3CA6000564E9 /* Coconut.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
5BFCC8F7252E3C5F000564E9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.7;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
5BFCC8F8252E3C5F000564E9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.7;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
5BFCC8FA252E3C5F000564E9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = CoconutLib/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.CoconutLib.CoconutLib;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
5BFCC8FB252E3C5F000564E9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = CoconutLib/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.CoconutLib.CoconutLib;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
5BFCC8EB252E3C5F000564E9 /* Build configuration list for PBXProject "CoconutLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BFCC8F7252E3C5F000564E9 /* Debug */,
5BFCC8F8252E3C5F000564E9 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5BFCC8F9252E3C5F000564E9 /* Build configuration list for PBXNativeTarget "CoconutLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BFCC8FA252E3C5F000564E9 /* Debug */,
5BFCC8FB252E3C5F000564E9 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 5BFCC8E8252E3C5F000564E9 /* Project object */;
}
11 changes: 11 additions & 0 deletions examples/Excluded-Archs-Example/CoconutLib/CoconutLib/Coconut.h
@@ -0,0 +1,11 @@
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface Coconut : NSObject

- (void)makeCoconuts;

@end

NS_ASSUME_NONNULL_END
@@ -0,0 +1,9 @@
#import "Coconut.h"

@implementation Coconut

- (void)makeCoconuts {
NSLog(@"Making coconuts!");
}

@end