Skip to content

Commit ee6c344

Browse files
authored
chore(ios): fix swift debugging in example by implementing main in swift (#3310)
1 parent 104eda2 commit ee6c344

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1313
51C0260825301F99008C5283 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 51C0260725301F99008C5283 /* LaunchScreen.storyboard */; };
1414
6ABB4B94377E61C4A5D7C20B /* libPods-RNMapboxGLExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B3043593E8F1F7D43624CAB9 /* libPods-RNMapboxGLExample.a */; };
15+
D8E751FC2B4D755200FEFCF7 /* DebugWorkaround.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8E751FB2B4D755200FEFCF7 /* DebugWorkaround.swift */; };
1516
/* End PBXBuildFile section */
1617

1718
/* Begin PBXFileReference section */
@@ -41,6 +42,7 @@
4142
CB1F3BED505C4EDE92AC1770 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; };
4243
CC44ECBD0B2A438C84D89432 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = "<group>"; };
4344
D21EDDEE520265816231288F /* Pods-RNMapboxGLExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNMapboxGLExample.debug.xcconfig"; path = "Target Support Files/Pods-RNMapboxGLExample/Pods-RNMapboxGLExample.debug.xcconfig"; sourceTree = "<group>"; };
45+
D8E751FB2B4D755200FEFCF7 /* DebugWorkaround.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DebugWorkaround.swift; path = RNMapboxGLExample/DebugWorkaround.swift; sourceTree = "<group>"; };
4446
E164F01DAD324AE386612513 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; };
4547
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4648
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
@@ -87,6 +89,7 @@
8789
13B07FB51A68108700A75B9A /* Images.xcassets */,
8890
13B07FB61A68108700A75B9A /* Info.plist */,
8991
13B07FB71A68108700A75B9A /* main.m */,
92+
D8E751FB2B4D755200FEFCF7 /* DebugWorkaround.swift */,
9093
);
9194
name = RNMapboxGLExample;
9295
sourceTree = "<group>";
@@ -380,6 +383,7 @@
380383
files = (
381384
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
382385
13B07FC11A68108700A75B9A /* main.m in Sources */,
386+
D8E751FC2B4D755200FEFCF7 /* DebugWorkaround.swift in Sources */,
383387
);
384388
runOnlyForDeploymentPostprocessing = 0;
385389
};
@@ -392,6 +396,7 @@
392396
buildSettings = {
393397
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
394398
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
399+
CLANG_ENABLE_MODULES = YES;
395400
CURRENT_PROJECT_VERSION = 1;
396401
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
397402
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -452,6 +457,8 @@
452457
);
453458
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
454459
PRODUCT_NAME = RNMapboxGLExample;
460+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
461+
SWIFT_VERSION = 5.0;
455462
VERSIONING_SYSTEM = "apple-generic";
456463
};
457464
name = Debug;
@@ -462,6 +469,7 @@
462469
buildSettings = {
463470
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
464471
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
472+
CLANG_ENABLE_MODULES = YES;
465473
CURRENT_PROJECT_VERSION = 1;
466474
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
467475
INFOPLIST_FILE = RNMapboxGLExample/Info.plist;
@@ -511,6 +519,7 @@
511519
);
512520
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
513521
PRODUCT_NAME = RNMapboxGLExample;
522+
SWIFT_VERSION = 5.0;
514523
VERSIONING_SYSTEM = "apple-generic";
515524
};
516525
name = Release;
@@ -520,7 +529,7 @@
520529
buildSettings = {
521530
ALWAYS_SEARCH_USER_PATHS = NO;
522531
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
523-
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
532+
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
524533
CLANG_CXX_LIBRARY = "libc++";
525534
CLANG_ENABLE_MODULES = YES;
526535
CLANG_ENABLE_OBJC_ARC = YES;
@@ -584,7 +593,7 @@
584593
buildSettings = {
585594
ALWAYS_SEARCH_USER_PATHS = NO;
586595
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
587-
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
596+
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
588597
CLANG_CXX_LIBRARY = "libc++";
589598
CLANG_ENABLE_MODULES = YES;
590599
CLANG_ENABLE_OBJC_ARC = YES;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// see https://github.com/rnmapbox/maps/pull/3310
2+
3+
import Foundation

0 commit comments

Comments
 (0)