Skip to content

Commit

Permalink
XCode bitcode issue (#300)
Browse files Browse the repository at this point in the history
* added BITCODE_GENERATION_MODE in build settings & updated build phase script

* added framework & updated build phase script
  • Loading branch information
msohailhussain authored and thomaszurkan-optimizely committed Sep 21, 2018
1 parent 6604759 commit 550de99
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 1 deletion.
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;
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.

0 comments on commit 550de99

Please sign in to comment.