Skip to content

Commit a2e059a

Browse files
committed
[futurepress#84] iOS: Fixes builds for custom-named build configurations
1 parent de9b7ac commit a2e059a

File tree

4 files changed

+168
-4
lines changed

4 files changed

+168
-4
lines changed

dr-pogodin-react-native-static-server.podspec

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,17 @@ Pod::Spec.new do |s|
6060
:script => <<-CMD
6161
set -e
6262
63+
if [[ ${CONFIGURATION} == "Debug" ]]
64+
then
65+
LIGHTTPD_CONFIG="Debug"
66+
else
67+
LIGHTTPD_CONFIG="Release"
68+
fi
69+
6370
if [[ ${PLATFORM_FAMILY_NAME} == "iOS" ]]
6471
then
6572
EXTRA_CONFIG_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=${IPHONEOS_DEPLOYMENT_TARGET} -DCMAKE_SYSTEM_NAME=iOS -GXcode"
66-
BUILD_OUTPUT_FOLDER_LIGHTTPD="/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}"
73+
BUILD_OUTPUT_FOLDER_LIGHTTPD="/${LIGHTTPD_CONFIG}${EFFECTIVE_PLATFORM_NAME}"
6774
BUILD_OUTPUT_FOLDER_PCRE2="/Release${EFFECTIVE_PLATFORM_NAME}"
6875
else
6976
# This assumes Mac Catalyst build.
@@ -73,7 +80,7 @@ Pod::Spec.new do |s|
7380
cmake ${PODS_TARGET_SRCROOT} -B ${TARGET_TEMP_DIR} \
7481
-DBUILD_STATIC=1 -DBUILD_LIBRARY=1 ${EXTRA_CONFIG_ARGS} #{$extraCMakeArgs}
7582
76-
cmake --build ${TARGET_TEMP_DIR} --config ${CONFIGURATION} --target lighttpd
83+
cmake --build ${TARGET_TEMP_DIR} --config ${LIGHTTPD_CONFIG} --target lighttpd
7784
7885
cp ${TARGET_TEMP_DIR}/lighttpd1.4/build${BUILD_OUTPUT_FOLDER_LIGHTTPD}/*.a \
7986
${TARGET_TEMP_DIR}/pcre2${BUILD_OUTPUT_FOLDER_PCRE2}/*.a \

example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ SPEC CHECKSUMS:
12901290
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
12911291
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
12921292
dr-pogodin-react-native-fs: 23b3d33e8789593ebce8e86516ad541b6dfd1dcd
1293-
dr-pogodin-react-native-static-server: 73a25eaba967857f96000f1c1ca23a3efd09b659
1293+
dr-pogodin-react-native-static-server: 3dba3973415bd2d559b1b12c763b331220b1b129
12941294
FBLazyVector: 5fbbff1d7734827299274638deb8ba3024f6c597
12951295
Flipper: 6edb735e6c3e332975d1b17956bcc584eccf5818
12961296
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c

example/ios/ReactNativeStaticServerExample.xcodeproj/project.pbxproj

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
63A6073F29D24ECA001BB4FD /* ReactNativeStaticServerExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativeStaticServerExample-Bridging-Header.h"; sourceTree = "<group>"; };
5050
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeStaticServerExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
5151
89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests/Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.release.xcconfig"; sourceTree = "<group>"; };
52+
A5879A435A62E4A2150F144B /* Pods-ReactNativeStaticServerExample.custom.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeStaticServerExample.custom.xcconfig"; path = "Target Support Files/Pods-ReactNativeStaticServerExample/Pods-ReactNativeStaticServerExample.custom.xcconfig"; sourceTree = "<group>"; };
53+
E13E588515BBF961F1C9A26E /* Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.custom.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.custom.xcconfig"; path = "Target Support Files/Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests/Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.custom.xcconfig"; sourceTree = "<group>"; };
5254
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
5355
/* End PBXFileReference section */
5456

@@ -154,6 +156,8 @@
154156
5709B34CF0A7D63546082F79 /* Pods-ReactNativeStaticServerExample.release.xcconfig */,
155157
5B7EB9410499542E8C5724F5 /* Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.debug.xcconfig */,
156158
89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.release.xcconfig */,
159+
A5879A435A62E4A2150F144B /* Pods-ReactNativeStaticServerExample.custom.xcconfig */,
160+
E13E588515BBF961F1C9A26E /* Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.custom.xcconfig */,
157161
);
158162
path = Pods;
159163
sourceTree = "<group>";
@@ -585,6 +589,156 @@
585589
};
586590
name = Release;
587591
};
592+
63D0B8FA2B07B60E003B38D4 /* Custom */ = {
593+
isa = XCBuildConfiguration;
594+
buildSettings = {
595+
ALWAYS_SEARCH_USER_PATHS = NO;
596+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
597+
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
598+
CLANG_CXX_LIBRARY = "libc++";
599+
CLANG_ENABLE_MODULES = YES;
600+
CLANG_ENABLE_OBJC_ARC = YES;
601+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
602+
CLANG_WARN_BOOL_CONVERSION = YES;
603+
CLANG_WARN_COMMA = YES;
604+
CLANG_WARN_CONSTANT_CONVERSION = YES;
605+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
606+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
607+
CLANG_WARN_EMPTY_BODY = YES;
608+
CLANG_WARN_ENUM_CONVERSION = YES;
609+
CLANG_WARN_INFINITE_RECURSION = YES;
610+
CLANG_WARN_INT_CONVERSION = YES;
611+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
612+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
613+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
614+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
615+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
616+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
617+
CLANG_WARN_STRICT_PROTOTYPES = YES;
618+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
619+
CLANG_WARN_UNREACHABLE_CODE = YES;
620+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
621+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
622+
COPY_PHASE_STRIP = YES;
623+
ENABLE_NS_ASSERTIONS = NO;
624+
ENABLE_STRICT_OBJC_MSGSEND = YES;
625+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
626+
GCC_C_LANGUAGE_STANDARD = gnu99;
627+
GCC_NO_COMMON_BLOCKS = YES;
628+
GCC_PREPROCESSOR_DEFINITIONS = (
629+
"$(inherited)",
630+
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
631+
);
632+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
633+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
634+
GCC_WARN_UNDECLARED_SELECTOR = YES;
635+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
636+
GCC_WARN_UNUSED_FUNCTION = YES;
637+
GCC_WARN_UNUSED_VARIABLE = YES;
638+
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
639+
LD_RUNPATH_SEARCH_PATHS = (
640+
/usr/lib/swift,
641+
"$(inherited)",
642+
);
643+
LIBRARY_SEARCH_PATHS = (
644+
"\"$(SDKROOT)/usr/lib/swift\"",
645+
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
646+
"\"$(inherited)\"",
647+
);
648+
MTL_ENABLE_DEBUG_INFO = NO;
649+
OTHER_CFLAGS = (
650+
"$(inherited)",
651+
"-DRN_FABRIC_ENABLED",
652+
);
653+
OTHER_CPLUSPLUSFLAGS = (
654+
"$(OTHER_CFLAGS)",
655+
"-DFOLLY_NO_CONFIG",
656+
"-DFOLLY_MOBILE=1",
657+
"-DFOLLY_USE_LIBCPP=1",
658+
"-DRN_FABRIC_ENABLED",
659+
);
660+
OTHER_LDFLAGS = (
661+
"$(inherited)",
662+
"-Wl",
663+
"-ld_classic",
664+
);
665+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
666+
SDKROOT = iphoneos;
667+
VALIDATE_PRODUCT = YES;
668+
};
669+
name = Custom;
670+
};
671+
63D0B8FB2B07B60E003B38D4 /* Custom */ = {
672+
isa = XCBuildConfiguration;
673+
baseConfigurationReference = A5879A435A62E4A2150F144B /* Pods-ReactNativeStaticServerExample.custom.xcconfig */;
674+
buildSettings = {
675+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
676+
CLANG_ENABLE_MODULES = YES;
677+
CODE_SIGN_ENTITLEMENTS = ReactNativeStaticServerExample/ReactNativeStaticServerExample.entitlements;
678+
CURRENT_PROJECT_VERSION = 1;
679+
DEAD_CODE_STRIPPING = YES;
680+
DEVELOPMENT_TEAM = 7TTF2KGYQU;
681+
INFOPLIST_FILE = ReactNativeStaticServerExample/Info.plist;
682+
LD_RUNPATH_SEARCH_PATHS = (
683+
"$(inherited)",
684+
"@executable_path/Frameworks",
685+
);
686+
LIBRARY_SEARCH_PATHS = (
687+
"$(SDKROOT)/usr/lib/swift",
688+
"$(SDKROOT)/System/iOSSupport/usr/lib/swift",
689+
"$(inherited)",
690+
);
691+
MARKETING_VERSION = 1.0;
692+
OTHER_LDFLAGS = (
693+
"$(inherited)",
694+
"-ObjC",
695+
"-lc++",
696+
);
697+
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
698+
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
699+
PRODUCT_NAME = ReactNativeStaticServerExample;
700+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
701+
SUPPORTS_MACCATALYST = YES;
702+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
703+
SWIFT_OBJC_BRIDGING_HEADER = "ReactNativeStaticServerExample-Bridging-Header.h";
704+
SWIFT_VERSION = 5.0;
705+
TARGETED_DEVICE_FAMILY = "1,2";
706+
VERSIONING_SYSTEM = "apple-generic";
707+
};
708+
name = Custom;
709+
};
710+
63D0B8FC2B07B60E003B38D4 /* Custom */ = {
711+
isa = XCBuildConfiguration;
712+
baseConfigurationReference = E13E588515BBF961F1C9A26E /* Pods-ReactNativeStaticServerExample-ReactNativeStaticServerExampleTests.custom.xcconfig */;
713+
buildSettings = {
714+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
715+
BUNDLE_LOADER = "$(TEST_HOST)";
716+
COPY_PHASE_STRIP = NO;
717+
DEAD_CODE_STRIPPING = YES;
718+
INFOPLIST_FILE = ReactNativeStaticServerExampleTests/Info.plist;
719+
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
720+
LD_RUNPATH_SEARCH_PATHS = (
721+
"$(inherited)",
722+
"@executable_path/Frameworks",
723+
"@loader_path/Frameworks",
724+
);
725+
LIBRARY_SEARCH_PATHS = (
726+
"$(SDKROOT)/usr/lib/swift",
727+
"$(SDKROOT)/System/iOSSupport/usr/lib/swift",
728+
"$(inherited)",
729+
);
730+
OTHER_LDFLAGS = (
731+
"-ObjC",
732+
"-lc++",
733+
"$(inherited)",
734+
);
735+
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
736+
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
737+
PRODUCT_NAME = "$(TARGET_NAME)";
738+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeStaticServerExample.app/ReactNativeStaticServerExample";
739+
};
740+
name = Custom;
741+
};
588742
83CBBA201A601CBA00E9B192 /* Debug */ = {
589743
isa = XCBuildConfiguration;
590744
buildSettings = {
@@ -755,6 +909,7 @@
755909
buildConfigurations = (
756910
00E356F61AD99517003FC87E /* Debug */,
757911
00E356F71AD99517003FC87E /* Release */,
912+
63D0B8FC2B07B60E003B38D4 /* Custom */,
758913
);
759914
defaultConfigurationIsVisible = 0;
760915
defaultConfigurationName = Release;
@@ -764,6 +919,7 @@
764919
buildConfigurations = (
765920
13B07F941A680F5B00A75B9A /* Debug */,
766921
13B07F951A680F5B00A75B9A /* Release */,
922+
63D0B8FB2B07B60E003B38D4 /* Custom */,
767923
);
768924
defaultConfigurationIsVisible = 0;
769925
defaultConfigurationName = Release;
@@ -773,6 +929,7 @@
773929
buildConfigurations = (
774930
83CBBA201A601CBA00E9B192 /* Debug */,
775931
83CBBA211A601CBA00E9B192 /* Release */,
932+
63D0B8FA2B07B60E003B38D4 /* Custom */,
776933
);
777934
defaultConfigurationIsVisible = 0;
778935
defaultConfigurationName = Release;

example/ios/ReactNativeStaticServerExample.xcodeproj/xcshareddata/xcschemes/ReactNativeStaticServerExample.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</Testables>
4242
</TestAction>
4343
<LaunchAction
44-
buildConfiguration = "Release"
44+
buildConfiguration = "Custom"
4545
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4646
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4747
launchStyle = "0"

0 commit comments

Comments
 (0)