diff --git a/Podfile.lock b/Podfile.lock index ea2fc39fa..17c623287 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -76,4 +76,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 3ac6b72b8e32e6b50d5524e6bbdc3864ec850fb0 -COCOAPODS: 1.10.0 +COCOAPODS: 1.10.1 diff --git a/PrebidMobile.xcodeproj/project.pbxproj b/PrebidMobile.xcodeproj/project.pbxproj index 34feb3ae9..4676baace 100644 --- a/PrebidMobile.xcodeproj/project.pbxproj +++ b/PrebidMobile.xcodeproj/project.pbxproj @@ -1012,6 +1012,7 @@ FA29A3F0232255DF00F13F61 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + BITCODE_GENERATION_MODE = marker; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; @@ -1036,6 +1037,7 @@ FA29A3F1232255DF00F13F61 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + BITCODE_GENERATION_MODE = marker; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; @@ -1060,6 +1062,7 @@ FAAA00C32322733E009DC7D6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + BITCODE_GENERATION_MODE = marker; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; @@ -1067,6 +1070,10 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -1084,6 +1091,7 @@ FAAA00C42322733E009DC7D6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + BITCODE_GENERATION_MODE = marker; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; @@ -1091,6 +1099,10 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/scripts/buildPrebidMobile.sh b/scripts/buildPrebidMobile.sh index d161a8cd7..82c5d5bf7 100755 --- a/scripts/buildPrebidMobile.sh +++ b/scripts/buildPrebidMobile.sh @@ -30,6 +30,8 @@ XCODE_BUILD_SIMULATOR_FILE_ABSOLUTE="$PWD/$XCODE_BUILD_DIR/Build/Products/Releas OUTPUT_DIR="$GENERATED_DIR_NAME/output" OUTPUT_DIR_ABSOLUTE="$PWD/$OUTPUT_DIR" +BITCODE_FLAG="marker" + # If remnants from a previous build exist, delete them. if [ -d "$GENERATED_DIR_NAME" ]; then rm -rf "$GENERATED_DIR_NAME" @@ -38,6 +40,12 @@ fi mkdir -p "$LOG_DIR" touch "$LOG_FILE_FRAMEWORK" +echo -n "Embed bitcode (y/n)?" +read bitcodeAnswer +if [ "$bitcodeAnswer" != "${bitcodeAnswer#[Yy]}" ] ;then + BITCODE_FLAG="bitcode" +fi + echo $PWD gem install cocoapods --user-install pod install --repo-update @@ -60,10 +68,10 @@ do # Build the framework for device and for simulator (using # all needed architectures). echo -e "\n${GREEN} - Building ${frameworkNames[$n]} for device${NC}" - xcodebuild -workspace PrebidMobile.xcworkspace -scheme "${schemes[$n]}" -configuration Release -arch arm64 only_active_arch=no defines_module=yes -sdk "iphoneos" -derivedDataPath $XCODE_BUILD_DIR > "$LOG_FILE_FRAMEWORK" 2>&1 || { echo -e "${RED}Error in build check log "$LOG_FILE_FRAMEWORK_ABSOLUTE"${NC}"; exit 1;} + xcodebuild -workspace PrebidMobile.xcworkspace -scheme "${schemes[$n]}" -configuration Release -arch arm64 only_active_arch=no defines_module=yes -sdk "iphoneos" -derivedDataPath $XCODE_BUILD_DIR BITCODE_GENERATION_MODE="$BITCODE_FLAG" > "$LOG_FILE_FRAMEWORK" 2>&1 || { echo -e "${RED}Error in build check log "$LOG_FILE_FRAMEWORK_ABSOLUTE"${NC}"; exit 1;} echo -e "${GREEN} - Building ${frameworkNames[$n]} for simulator${NC}" - xcodebuild -workspace PrebidMobile.xcworkspace -scheme "${schemes[$n]}" -configuration Release -arch x86_64 only_active_arch=no defines_module=yes -sdk "iphonesimulator" -derivedDataPath $XCODE_BUILD_DIR > "$LOG_FILE_FRAMEWORK" 2>&1 || { echo -e "${RED}Error in build check log "$LOG_FILE_FRAMEWORK_ABSOLUTE"${NC}"; exit 1;} + xcodebuild -workspace PrebidMobile.xcworkspace -scheme "${schemes[$n]}" -configuration Release -arch x86_64 only_active_arch=no defines_module=yes -sdk "iphonesimulator" -derivedDataPath $XCODE_BUILD_DIR BITCODE_GENERATION_MODE="$BITCODE_FLAG" > "$LOG_FILE_FRAMEWORK" 2>&1 || { echo -e "${RED}Error in build check log "$LOG_FILE_FRAMEWORK_ABSOLUTE"${NC}"; exit 1;} # Copy the device version of framework. cp -r "$XCODE_BUILD_IPHONE_FILE_ABSOLUTE" "$OUTPUT_FILE_FRAMEWORK_ABSOLUTE"