今天第一天上班
在安裝環境SDK時
發現Xcode 突然找不到 Other Linker Flags
上網查才知道7.2以後Build Settings 默認是沒有
那今天我們就來使用code來新增Other Linker Flags
到你的專案*.xcodeproj
右鍵顯示套件,打開project.pbxproj
收尋buildSettings
加入如下内容:
OTHER_LDFLAGS = (
"-ObjC",
);
加進去以前
046C7718218AC8DE0013C81B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 28Q4D37JZZ;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/ShortVideo/Resources/TuSDK",
"$(PROJECT_DIR)/Resources/TuSDK",
);
INFOPLIST_FILE = ShortVideo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.upyun.UPYUNShortVideo;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
};
046C7719218AC8DE0013C81B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 28Q4D37JZZ;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/ShortVideo/Resources/TuSDK",
"$(PROJECT_DIR)/Resources/TuSDK",
);
INFOPLIST_FILE = ShortVideo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.upyun.UPYUNShortVideo;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
};
加入以後
046C7718218AC8DE0013C81B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 28Q4D37JZZ;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/ShortVideo/Resources/TuSDK",
"$(PROJECT_DIR)/Resources/TuSDK",
);
INFOPLIST_FILE = ShortVideo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = com.upyun.UPYUNShortVideo;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
};
046C7719218AC8DE0013C81B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 28Q4D37JZZ;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/ShortVideo/Resources/TuSDK",
"$(PROJECT_DIR)/Resources/TuSDK",
);
INFOPLIST_FILE = ShortVideo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = com.upyun.UPYUNShortVideo;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
};
老實說我後面發現
選ALL就可以搜尋到
真的是太久沒設定
沒關係就當學了一課