Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit d4b51dd

Browse files
authored
Fixed the build so it works in development and release modes. (#8)
1 parent a8db103 commit d4b51dd

13 files changed

Lines changed: 33 additions & 32 deletions

File tree

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ xcuserdata/
3232
## Obj-C/Swift specific
3333
*.hmap
3434
*.ipa
35-
*.dSYM.zip
36-
*.dSYM
3735

3836
# CocoaPods
3937
#

Products/XcodeGitHub.app.dSYM.zip

997 KB
Binary file not shown.

Products/XcodeGitHub.app.zip

199 Bytes
Binary file not shown.

Products/XcodeGitHub.framework.zip

8 Bytes
Binary file not shown.

Products/xcode-github

48 Bytes
Binary file not shown.

Products/xcode-github.dSYM.zip

943 KB
Binary file not shown.

XcodeGitHub.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@
285285
SDKROOT = macosx;
286286
SKIP_INSTALL = YES;
287287
STRIP_INSTALLED_PRODUCT = NO;
288+
SYMROOT = Build;
288289
};
289290
name = Debug;
290291
};
@@ -343,14 +344,14 @@
343344
SDKROOT = macosx;
344345
SKIP_INSTALL = YES;
345346
STRIP_INSTALLED_PRODUCT = NO;
347+
SYMROOT = Build;
346348
};
347349
name = Release;
348350
};
349351
4DDAA4E0216ABF40002F3F8E /* Debug */ = {
350352
isa = XCBuildConfiguration;
351353
buildSettings = {
352354
CREATE_INFOPLIST_SECTION_IN_BINARY = YES;
353-
EXECUTABLE_PREFIX = lib;
354355
PRODUCT_NAME = "$(TARGET_NAME)";
355356
};
356357
name = Debug;
@@ -359,7 +360,6 @@
359360
isa = XCBuildConfiguration;
360361
buildSettings = {
361362
CREATE_INFOPLIST_SECTION_IN_BINARY = YES;
362-
EXECUTABLE_PREFIX = lib;
363363
PRODUCT_NAME = "$(TARGET_NAME)";
364364
};
365365
name = Release;

XcodeGitHub.xcodeproj/xcshareddata/xcschemes/XcodeGitHub.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
1111
<ActionContent
1212
title = "Run Script"
13-
scriptText = "#!/bin/bash&#10;&quot;${SOURCE_ROOT}&quot;/&quot;${PRODUCT_NAME}&quot;/make-static-lib.sh&#10;"
13+
scriptText = "#!/bin/bash&#10;mkdir &quot;${SOURCE_ROOT}&quot;/Build&#10;log_file=&quot;${SOURCE_ROOT}&quot;/Build/make-static-lib.log&#10;exec &gt; &quot;$log_file&quot; 2&gt;&amp;1&#10;&quot;${SOURCE_ROOT}&quot;/&quot;${PRODUCT_NAME}&quot;/make-static-lib.sh&#10;"
1414
shellToInvoke = "/bin/bash">
1515
<EnvironmentBuildable>
1616
<BuildableReference

XcodeGitHub/make-static-lib.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ set -euo pipefail
77
# Created by Edward Smith on 10/7/18.
88
# Copyright © 2018 Branch. All rights reserved.
99

10+
echo "Building: ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework"
11+
12+
cd "${PROJECT_DIR}"
1013
/bin/rm -Rf "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework"
1114

1215
# Headers:
@@ -42,10 +45,10 @@ set -euo pipefail
4245
"Versions/Current/${PRODUCT_NAME}" \
4346
"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/${PRODUCT_NAME}"
4447

45-
## Copy to Products directory:
46-
#/usr/bin/ditto \
47-
# "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework" \
48-
# "${SOURCE_ROOT}/Products/${PRODUCT_NAME}.framework"
48+
# Copy to Products directory:
49+
/usr/bin/ditto \
50+
"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework" \
51+
"${SOURCE_ROOT}/Build/${PRODUCT_NAME}.framework"
4952

50-
echo "Result:"
51-
echo "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework"
53+
echo " Result: ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework"
54+
echo " Ditto: ${SOURCE_ROOT}/Build/${PRODUCT_NAME}.framework"

build-release

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function build_project() {
5454
-configuration Release \
5555
-quiet clean build \
5656
CONFIGURATION_BUILD_DIR="$build_products_directory"
57+
# Show the codesigning:
5758
codesign -dv --verbose=4 "$build_products_directory"/"$executable"
5859
echo ""
5960
}

0 commit comments

Comments
 (0)