Skip to content

Commit

Permalink
Create PLCrashReporter xcframework to embed in HockeySDK (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrerod authored May 2, 2024
1 parent 6752f71 commit f414165
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 12 deletions.
58 changes: 46 additions & 12 deletions CrashReporter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3823,17 +3823,24 @@
"$(ARCHS_STANDARD)",
arm64e,
);
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_IDENTITY = "Apple Development";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = TN6R4Q475K;
GENERATE_MASTER_OBJECT_FILE = YES;
INFOPLIST_FILE = Resources/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = Resources/CrashReporter.modulemap;
OTHER_CFLAGS = "-fembed-bitcode-marker";
"OTHER_CFLAGS[sdk=macosx*]" = "";
PRELINK_LIBS = "$(CONFIGURATION_BUILD_DIR)/lib$(PRODUCT_NAME).a";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -3847,18 +3854,25 @@
arm64e,
);
BITCODE_GENERATION_MODE = bitcode;
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_IDENTITY = "Apple Development";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = TN6R4Q475K;
GENERATE_MASTER_OBJECT_FILE = YES;
INFOPLIST_FILE = Resources/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = Resources/CrashReporter.modulemap;
OTHER_CFLAGS = "-fembed-bitcode-marker";
"OTHER_CFLAGS[sdk=iphoneos*]" = "-fembed-bitcode";
"OTHER_CFLAGS[sdk=macosx*]" = "";
PRELINK_LIBS = "$(CONFIGURATION_BUILD_DIR)/lib$(PRODUCT_NAME).a";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down Expand Up @@ -4053,38 +4067,58 @@
1DEB91AE08733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = TN6R4Q475K;
DYLIB_INSTALL_NAME_BASE = "@rpath";
EFFECTIVE_PLATFORM_NAME = "-macosx";
EXPORTED_SYMBOLS_FILE = Resources/CrashReporter.exp;
GENERATE_MASTER_OBJECT_FILE = YES;
INFOPLIST_FILE = Resources/Info.plist;
INSTALL_PATH = "@rpath";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = mh_dylib;
MODULEMAP_FILE = Resources/CrashReporter.modulemap;
OTHER_LDFLAGS = "-ObjC";
PRELINK_LIBS = "$(CONFIGURATION_BUILD_DIR)/lib$(PRODUCT_NAME).a";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SKIP_INSTALL = NO;
};
name = Debug;
};
1DEB91AF08733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = TN6R4Q475K;
DYLIB_INSTALL_NAME_BASE = "@rpath";
EFFECTIVE_PLATFORM_NAME = "-macosx";
EXPORTED_SYMBOLS_FILE = Resources/CrashReporter.exp;
GENERATE_MASTER_OBJECT_FILE = YES;
INFOPLIST_FILE = Resources/Info.plist;
INSTALL_PATH = "@rpath";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = mh_dylib;
MODULEMAP_FILE = Resources/CrashReporter.modulemap;
OTHER_LDFLAGS = "-ObjC";
PRELINK_LIBS = "$(CONFIGURATION_BUILD_DIR)/lib$(PRODUCT_NAME).a";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SKIP_INSTALL = NO;
};
name = Release;
};
Expand Down Expand Up @@ -4142,14 +4176,14 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/Dependencies/protobuf-c\"";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_LIBTOOLFLAGS = "-no_warning_for_no_symbols";
PRODUCT_BUNDLE_IDENTIFIER = "com.microsoft.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = CrashReporter;
PROTOBUF_C_UNPACK_ERROR = PLCF_DEBUG;
TVOS_DEPLOYMENT_TARGET = 11.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
WARNING_CFLAGS = "-Wall";
};
name = Debug;
Expand Down Expand Up @@ -4207,13 +4241,13 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/Dependencies/protobuf-c\"";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
OTHER_LIBTOOLFLAGS = "-no_warning_for_no_symbols";
PRODUCT_BUNDLE_IDENTIFIER = "com.microsoft.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = CrashReporter;
PROTOBUF_C_UNPACK_ERROR = PLCF_DEBUG;
TVOS_DEPLOYMENT_TARGET = 11.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
VALIDATE_PRODUCT = YES;
WARNING_CFLAGS = "-Wall";
};
Expand Down
7 changes: 7 additions & 0 deletions makeXCFramework.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rm -rf archives/*
rm -rf xcframeworks/*
xcodebuild archive -project CrashReporter.xcodeproj -scheme "CrashReporter iOS Framework" -destination "generic/platform=iOS" -archivePath "archives/CrashReporter-iOS"
xcodebuild archive -project CrashReporter.xcodeproj -scheme "CrashReporter iOS Framework" -destination "generic/platform=iOS Simulator" -archivePath "archives/CrashReporter-iOS_Simulator"
xcodebuild archive -project CrashReporter.xcodeproj -scheme "CrashReporter iOS Framework" -destination "generic/platform=macOS,variant=Mac Catalyst" -archivePath "archives/CrashReporter-Mac_Catalyst"
xcodebuild archive -project CrashReporter.xcodeproj -scheme "CrashReporter macOS Framework" -destination "generic/platform=macOS" -archivePath "archives/CrashReporter-macOS"
xcodebuild -create-xcframework -archive archives/CrashReporter-iOS.xcarchive -framework CrashReporter.framework -archive archives/CrashReporter-iOS_Simulator.xcarchive -framework CrashReporter.framework -archive archives/CrashReporter-Mac_Catalyst.xcarchive -framework CrashReporter.framework -archive archives/CrashReporter-macOS.xcarchive -framework CrashReporter.framework -output xcframeworks/CrashReporter.xcframework

0 comments on commit f414165

Please sign in to comment.