iOS Universal Static Framework 手动转 XCode Cocoa Framework

周良弼
2023-12-01

不需要重新创建Project,手动修改工程设置。


第一步:在Project文件中,修改type,去掉static

1. 搜索wrapper.framework.static,去掉static

2. 搜索productType,改成com.apple.product-type.framework


第二步:还需要修改工程设置:

CLANG_WARN_UNREACHABLE_CODE = YES;


CURRENT_PROJECT_VERSION = 1;


ENABLE_STRICT_OBJC_MSGSEND = YES;


VERSIONING_SYSTEM = "apple-generic";


DEFINES_MODULE = YES;


DYLIB_INSTALL_NAME_BASE = "@rpath";


INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";


LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";


CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;


第三步:copy framework in Build Phase

(删除三个Script)


第四步:需要设置Code Signing Identity

不需要选择具体证书,Automatic即可

 类似资料: