Skip to content

Ios12commoncrypto #114

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
26 changes: 26 additions & 0 deletions Build-Phases/common-crypto.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
COMMON_CRYPTO_DIR="${SDKROOT}/usr/include/CommonCrypto"
if [ -f "${COMMON_CRYPTO_DIR}/module.modulemap" ]
then
echo "CommonCrypto already exists, skipping"
else
# This if-statement means we'll only run the main script if the
# CommonCrypto.framework directory doesn't exist because otherwise
# the rest of the script causes a full recompile for anything
# where CommonCrypto is a dependency
# Do a "Clean Build Folder" to remove this directory and trigger
# the rest of the script to run
FRAMEWORK_DIR="${BUILT_PRODUCTS_DIR}/CommonCrypto.framework"

if [ -d "${FRAMEWORK_DIR}" ]; then
echo "${FRAMEWORK_DIR} already exists, so skipping the rest of the script."
exit 0
fi

mkdir -p "${FRAMEWORK_DIR}/Modules"
echo "module CommonCrypto [system] {
header \"${SDKROOT}/usr/include/CommonCrypto/CommonCrypto.h\"
export *
}" >> "${FRAMEWORK_DIR}/Modules/module.modulemap"

ln -sf "${SDKROOT}/usr/include/CommonCrypto" "${FRAMEWORK_DIR}/Headers"
fi
4 changes: 0 additions & 4 deletions CommonCrypto/module.modulemap

This file was deleted.

1 change: 0 additions & 1 deletion CommonCrypto/shim.h

This file was deleted.

67 changes: 67 additions & 0 deletions JWT.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
CD9B62351C7753EC005D4844 /* JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CD9B62471C7753FB005D4844 /* JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CE8198B6E30BA6B8F8125FA7 /* Pods_JWTTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JWTTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0882E042111B6460012248F /* Build-Phases */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "Build-Phases"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -176,6 +177,7 @@
279D63921AD07FFF0024E2BC = {
isa = PBXGroup;
children = (
D0882E042111B6460012248F /* Build-Phases */,
520A711B1C469F440005C709 /* Package.swift */,
520A71121C469F010005C709 /* Sources */,
279D639E1AD07FFF0024E2BC /* Sources */,
Expand Down Expand Up @@ -300,6 +302,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 279D63B21AD07FFF0024E2BC /* Build configuration list for PBXNativeTarget "JWT-OSX" */;
buildPhases = (
D0882DFF2111B2CE0012248F /* Run Script: CommonCrypto */,
279D63971AD07FFF0024E2BC /* Sources */,
279D63981AD07FFF0024E2BC /* Frameworks */,
279D63991AD07FFF0024E2BC /* Headers */,
Expand Down Expand Up @@ -336,6 +339,7 @@
isa = PBXNativeTarget;
buildConfigurationList = CD9B62201C7753D8005D4844 /* Build configuration list for PBXNativeTarget "JWT-iOS" */;
buildPhases = (
D0882E012111B5C70012248F /* Run Script: CommonCrypto */,
CD9B62161C7753D8005D4844 /* Sources */,
CD9B621B1C7753D8005D4844 /* Frameworks */,
CD9B621D1C7753D8005D4844 /* Headers */,
Expand All @@ -354,6 +358,7 @@
isa = PBXNativeTarget;
buildConfigurationList = CD9B62321C7753EC005D4844 /* Build configuration list for PBXNativeTarget "JWT-tvOS" */;
buildPhases = (
D0882E022111B5DC0012248F /* Run Script: CommonCrypto */,
CD9B62281C7753EC005D4844 /* Sources */,
CD9B622D1C7753EC005D4844 /* Frameworks */,
CD9B622F1C7753EC005D4844 /* Headers */,
Expand All @@ -372,6 +377,7 @@
isa = PBXNativeTarget;
buildConfigurationList = CD9B62441C7753FB005D4844 /* Build configuration list for PBXNativeTarget "JWT-watchOS" */;
buildPhases = (
D0882E032111B5EE0012248F /* Run Script: CommonCrypto */,
CD9B623A1C7753FB005D4844 /* Sources */,
CD9B623F1C7753FB005D4844 /* Frameworks */,
CD9B62411C7753FB005D4844 /* Headers */,
Expand Down Expand Up @@ -464,6 +470,65 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
D0882DFF2111B2CE0012248F /* Run Script: CommonCrypto */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script: CommonCrypto";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "$SRCROOT/Build-Phases/common-crypto.sh";
};
D0882E012111B5C70012248F /* Run Script: CommonCrypto */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script: CommonCrypto";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "$SRCROOT/Build-Phases/common-crypto.sh";
};
D0882E022111B5DC0012248F /* Run Script: CommonCrypto */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script: CommonCrypto";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "$SRCROOT/Build-Phases/common-crypto.sh";
};
D0882E032111B5EE0012248F /* Run Script: CommonCrypto */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script: CommonCrypto";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "$SRCROOT/Build-Phases/common-crypto.sh";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
279D63971AD07FFF0024E2BC /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -756,6 +821,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "$(inherited) ${BUILT_PRODUCTS_DIR}/CommonCryptoModuleMap";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -775,6 +841,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocode.$(PRODUCT_NAME:rfc1034identifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "$(inherited) ${BUILT_PRODUCTS_DIR}/CommonCryptoModuleMap";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>