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

XCode bitcode issue #300

Merged
merged 4 commits into from
Sep 21, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "FRAMEWORK_NAME=\"OptimizelySDKiOS\"\nSCHEME_NAME=\"OptimizelySDKUniversal\"\nTARGET_NAME=\"OptimizelySDKiOSUniversal\"\nDEVICE_NAME=\"iphoneos\"\nDEVICE_SIMULATOR_NAME=\"iphonesimulator\"\nPLATFORM=\"iOS\"\nCONFIGURATION=\"Release\"\nBUILD_DIR=\"${PROJECT_DIR}/build/\"\nUNIVERSAL_DIR=\"${PROJECT_DIR}/generated-frameworks/\"\nUNIVERSAL_OUTPUT=\"${UNIVERSAL_DIR}/${CONFIGURATION}-${PLATFORM}-universal-SDK\"\n\nrm -rf \"${BUILD_OUTPUT}\"\nrm -rf \"${UNIVERSAL_OUTPUT}\"\nmkdir -p \"${UNIVERSAL_OUTPUT}\"\n\nxcodebuild -target \"${TARGET_NAME}\" -configuration ${CONFIGURATION} only_active_arch=no defines_module=yes -arch i386 -arch x86_64 -sdk \"${DEVICE_SIMULATOR_NAME}\" OTHER_CFLAGS=\"-fembed-bitcode\" BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" clean build\n\nxcodebuild -target \"${TARGET_NAME}\" -configuration ${CONFIGURATION} only_active_arch=no defines_module=yes -arch armv7 -arch armv7s -arch arm64 -sdk \"${DEVICE_NAME}\" OTHER_CFLAGS=\"-fembed-bitcode\" BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" clean build\n\n# Copy the device framework from the build directory to the universal output directory\ncp -R \"${BUILD_DIR}/${CONFIGURATION}-${DEVICE_NAME}/${FRAMEWORK_NAME}.framework\" \"${UNIVERSAL_OUTPUT}/\"\n\nlipo \"${BUILD_DIR}/${CONFIGURATION}-${DEVICE_NAME}/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}\" \"${BUILD_DIR}/${CONFIGURATION}-${DEVICE_SIMULATOR_NAME}/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}\" -create -output \"${UNIVERSAL_OUTPUT}/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}\"\n\ncd \"${UNIVERSAL_OUTPUT}\"\nzip -r \"${FRAMEWORK_NAME}.framework.zip\" \"${FRAMEWORK_NAME}.framework\"\n\nrm -rf \"${BUILD_OUTPUT}\"\n\n\nopen ${UNIVERSAL_OUTPUT}";
shellScript = "FRAMEWORK_NAME=\"OptimizelySDKiOS\"\nSCHEME_NAME=\"OptimizelySDKUniversal\"\nTARGET_NAME=\"OptimizelySDKiOSUniversal\"\nDEVICE_NAME=\"iphoneos\"\nDEVICE_SIMULATOR_NAME=\"iphonesimulator\"\nPLATFORM=\"iOS\"\nCONFIGURATION=\"Release\"\nBUILD_DIR=\"${PROJECT_DIR}/build/\"\nUNIVERSAL_DIR=\"${PROJECT_DIR}/generated-frameworks/\"\nUNIVERSAL_OUTPUT=\"${UNIVERSAL_DIR}/${CONFIGURATION}-${PLATFORM}-universal-SDK\"\n\nrm -rf \"${BUILD_OUTPUT}\"\nrm -rf \"${UNIVERSAL_OUTPUT}\"\nmkdir -p \"${UNIVERSAL_OUTPUT}\"\n\nxcodebuild -target \"${TARGET_NAME}\" -configuration ${CONFIGURATION} only_active_arch=no defines_module=yes -arch armv7 -arch armv7s -arch arm64 -sdk \"${DEVICE_NAME}\" OTHER_CFLAGS=\"-fembed-bitcode\" BITCODE_GENERATION_MODE=bitcode BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" clean build\n\n# Copy the device framework from the build directory to the universal output directory\ncp -R \"${BUILD_DIR}/${CONFIGURATION}-${DEVICE_NAME}/${FRAMEWORK_NAME}.framework\" \"${UNIVERSAL_OUTPUT}/\"\n\nxcodebuild -target \"${TARGET_NAME}\" -configuration ${CONFIGURATION} only_active_arch=no defines_module=yes -arch i386 -arch x86_64 -sdk \"${DEVICE_SIMULATOR_NAME}\" OTHER_CFLAGS=\"-fembed-bitcode\" BITCODE_GENERATION_MODE=bitcode BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" clean build\n\nlipo \"${UNIVERSAL_OUTPUT}/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}\" \"${BUILD_DIR}/${CONFIGURATION}-${DEVICE_SIMULATOR_NAME}/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}\" -create -output \"${UNIVERSAL_OUTPUT}/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}\"\n\ncd \"${UNIVERSAL_OUTPUT}\"\nzip -r \"${FRAMEWORK_NAME}.framework.zip\" \"${FRAMEWORK_NAME}.framework\"\n\nrm -rf \"${BUILD_OUTPUT}\"\n\n\nopen ${UNIVERSAL_OUTPUT}\n";
};
EAC5F8C11E82EE8E00C087B8 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -1892,6 +1892,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BITCODE_GENERATION_MODE = marker;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be embed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for debug build which should use "fembed-bitcode-marker" flag while compiling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does, it automatically add embed because it isn't in the project file at all?

Copy link
Contributor

@AbdurRafay AbdurRafay Sep 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. If you set BITCODE_GENERATION_MODE=marker, the files will be compiled using the flag -fembed-bitcode-marker

CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
Expand Down Expand Up @@ -1967,6 +1968,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BITCODE_GENERATION_MODE = bitcode;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,12 @@ __attribute((deprecated("Use OPTLYManager initWithBuilder method instead.")));
**/
- (void)removeAllUserExperimentRecords;

/**
* Clean up and remove experiments that are not in the valid experiment list passed in.
* This is called when initialized from a remote datafile to ensure that the UserProfileService
* does not grow indefinitely.
* @param validExperimentIds An array of valid experiment ids. If default user profile contains
* experiments not in this list, they are removed from user profile service.
**/
- (void)removeInvalidExperimentsForAllUsers:(NSArray<NSString *> *)validExperimentIds;
@end
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,12 @@ __attribute((deprecated("Use OPTLYManager initWithBuilder method instead.")));
**/
- (void)removeAllUserExperimentRecords;

/**
* Clean up and remove experiments that are not in the valid experiment list passed in.
* This is called when initialized from a remote datafile to ensure that the UserProfileService
* does not grow indefinitely.
* @param validExperimentIds An array of valid experiment ids. If default user profile contains
* experiments not in this list, they are removed from user profile service.
**/
- (void)removeInvalidExperimentsForAllUsers:(NSArray<NSString *> *)validExperimentIds;
@end
Binary file not shown.
Binary file not shown.