Skip to content

Commit 70957c8

Browse files
committed
FIX - Code Breaking Change: Refactor C enum SFGeometryType to Objective-C enum to properly expose the symbols to Swift (in Release mode). It appears these symbols get discarded in Release builds and cause issues with optimizations
* Code Breaking Change: Refactor C enum SFEventType to Objective-C enum to properly expose the symbols to Swift (in Release mode). * Code Breaking Change: Refactor C enum SFFiniteFilterType to Objective-C enum * Any Swift code downstream will need to use the new symbols like: .POINT instead of SF_POINT. * BUILD - Updated Xcode 16 project recommendations
1 parent 18108dd commit 70957c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+170
-138
lines changed

sf-ios.xcodeproj/project.pbxproj

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -559,7 +559,8 @@
559559
042FC6421B963FE500549A4B /* Project object */ = {
560560
isa = PBXProject;
561561
attributes = {
562-
LastUpgradeCheck = 1230;
562+
BuildIndependentTargetsInParallel = YES;
563+
LastUpgradeCheck = 1620;
563564
ORGANIZATIONNAME = NGA;
564565
TargetAttributes = {
565566
042FC64A1B963FE500549A4B = {
@@ -738,6 +739,7 @@
738739
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
739740
ENABLE_STRICT_OBJC_MSGSEND = YES;
740741
ENABLE_TESTABILITY = YES;
742+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
741743
GCC_C_LANGUAGE_STANDARD = gnu99;
742744
GCC_DYNAMIC_NO_PIC = NO;
743745
GCC_NO_COMMON_BLOCKS = YES;
@@ -799,6 +801,7 @@
799801
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
800802
ENABLE_NS_ASSERTIONS = NO;
801803
ENABLE_STRICT_OBJC_MSGSEND = YES;
804+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
802805
GCC_C_LANGUAGE_STANDARD = gnu99;
803806
GCC_NO_COMMON_BLOCKS = YES;
804807
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -811,6 +814,7 @@
811814
MTL_ENABLE_DEBUG_INFO = NO;
812815
PRODUCT_NAME = "";
813816
SDKROOT = iphoneos;
817+
SWIFT_COMPILATION_MODE = wholemodule;
814818
TARGETED_DEVICE_FAMILY = "1,2";
815819
VALIDATE_PRODUCT = YES;
816820
VERSIONING_SYSTEM = "apple-generic";
@@ -827,9 +831,15 @@
827831
DYLIB_COMPATIBILITY_VERSION = 1;
828832
DYLIB_CURRENT_VERSION = 1;
829833
DYLIB_INSTALL_NAME_BASE = "@rpath";
834+
ENABLE_MODULE_VERIFIER = YES;
830835
INFOPLIST_FILE = "sf-ios/Info.plist";
831836
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
832-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
837+
LD_RUNPATH_SEARCH_PATHS = (
838+
"$(inherited)",
839+
"@executable_path/Frameworks",
840+
"@loader_path/Frameworks",
841+
);
842+
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
833843
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.sf;
834844
PRODUCT_NAME = sf_ios;
835845
SKIP_INSTALL = YES;
@@ -847,9 +857,15 @@
847857
DYLIB_COMPATIBILITY_VERSION = 1;
848858
DYLIB_CURRENT_VERSION = 1;
849859
DYLIB_INSTALL_NAME_BASE = "@rpath";
860+
ENABLE_MODULE_VERIFIER = YES;
850861
INFOPLIST_FILE = "sf-ios/Info.plist";
851862
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
852-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
863+
LD_RUNPATH_SEARCH_PATHS = (
864+
"$(inherited)",
865+
"@executable_path/Frameworks",
866+
"@loader_path/Frameworks",
867+
);
868+
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
853869
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.sf;
854870
PRODUCT_NAME = sf_ios;
855871
SKIP_INSTALL = YES;
@@ -861,7 +877,6 @@
861877
isa = XCBuildConfiguration;
862878
baseConfigurationReference = 6179C77188B4A0E8D4DEDBEB /* Pods-sf-iosTests.debug.xcconfig */;
863879
buildSettings = {
864-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
865880
FRAMEWORK_SEARCH_PATHS = (
866881
"$(SDKROOT)/Developer/Library/Frameworks",
867882
"$(inherited)",
@@ -871,7 +886,11 @@
871886
"$(inherited)",
872887
);
873888
INFOPLIST_FILE = "sf-iosTests/Info.plist";
874-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
889+
LD_RUNPATH_SEARCH_PATHS = (
890+
"$(inherited)",
891+
"@executable_path/Frameworks",
892+
"@loader_path/Frameworks",
893+
);
875894
PRODUCT_BUNDLE_IDENTIFIER = "mil.nga.sf.$(PRODUCT_NAME:rfc1034identifier)";
876895
PRODUCT_NAME = sf_iosTests;
877896
};
@@ -881,13 +900,16 @@
881900
isa = XCBuildConfiguration;
882901
baseConfigurationReference = B17E59AE80997CC09DD740D6 /* Pods-sf-iosTests.release.xcconfig */;
883902
buildSettings = {
884-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
885903
FRAMEWORK_SEARCH_PATHS = (
886904
"$(SDKROOT)/Developer/Library/Frameworks",
887905
"$(inherited)",
888906
);
889907
INFOPLIST_FILE = "sf-iosTests/Info.plist";
890-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
908+
LD_RUNPATH_SEARCH_PATHS = (
909+
"$(inherited)",
910+
"@executable_path/Frameworks",
911+
"@loader_path/Frameworks",
912+
);
891913
PRODUCT_BUNDLE_IDENTIFIER = "mil.nga.sf.$(PRODUCT_NAME:rfc1034identifier)";
892914
PRODUCT_NAME = sf_iosTests;
893915
};

sf-ios.xcodeproj/xcshareddata/xcschemes/sf-ios.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1500"
3+
LastUpgradeVersion = "1620"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

sf-ios/SFCurve.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @return new curve
2828
*/
29-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
29+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
3030

3131
/**
3232
* Get the start Point of this Curve

sf-ios/SFCurve.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
@implementation SFCurve
1212

13-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
13+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
1414
self = [super initWithType:geometryType andHasZ:hasZ andHasM:hasM];
1515
return self;
1616
}

sf-ios/SFCurvePolygon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
*
114114
* @return new curve polygon
115115
*/
116-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
116+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
117117

118118
/**
119119
* Initialize

sf-ios/SFCurvePolygon.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ -(instancetype) initWithRing: (SFCurve *) ring{
5656
return self;
5757
}
5858

59-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
59+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
6060
self = [super initWithType:geometryType andHasZ:hasZ andHasM:hasM];
6161
if(self != nil){
6262
self.rings = [NSMutableArray array];

sf-ios/SFGeometry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/**
2020
* Geometry type
2121
*/
22-
@property (nonatomic) enum SFGeometryType geometryType;
22+
@property (nonatomic) SFGeometryType geometryType;
2323

2424
/**
2525
* Has Z values
@@ -40,7 +40,7 @@
4040
*
4141
* @return new geometry
4242
*/
43-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
43+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
4444

4545
/**
4646
* Does the geometry have z coordinates

sf-ios/SFGeometry.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@implementation SFGeometry
1414

15-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
15+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
1616
self = [super init];
1717
if(self != nil){
1818
self.geometryType = geometryType;
@@ -87,7 +87,7 @@ - (void) encodeWithCoder:(NSCoder *)encoder {
8787
- (id) initWithCoder:(NSCoder *)decoder {
8888
self = [super init];
8989
if (self) {
90-
_geometryType = (enum SFGeometryType)[decoder decodeIntForKey:@"geometryType"];
90+
_geometryType = (SFGeometryType)[decoder decodeIntForKey:@"geometryType"];
9191
_hasZ = [decoder decodeBoolForKey:@"hasZ"];
9292
_hasM = [decoder decodeBoolForKey:@"hasM"];
9393
}

sf-ios/SFGeometryCollection.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
*
118118
* @return new geometry collection
119119
*/
120-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
120+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
121121

122122
/**
123123
* Initialize
@@ -171,7 +171,7 @@
171171
* MULTISURFACE,
172172
* GEOMETRYCOLLECTION
173173
*/
174-
-(enum SFGeometryType) collectionType;
174+
-(SFGeometryType) collectionType;
175175

176176
/**
177177
* Determine if this geometry collection is a MultiPoint instance or

sf-ios/SFGeometryCollection.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ -(instancetype) initWithGeometry: (SFGeometry *) geometry{
5757
return self;
5858
}
5959

60-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
60+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
6161
self = [super initWithType:geometryType andHasZ:hasZ andHasM:hasM];
6262
if(self != nil){
6363
self.geometries = [NSMutableArray array];
@@ -94,9 +94,9 @@ -(SFGeometry *) geometryAtIndex: (int) n{
9494
return [self.geometries objectAtIndex:n];
9595
}
9696

97-
-(enum SFGeometryType) collectionType{
97+
-(SFGeometryType) collectionType{
9898

99-
enum SFGeometryType geometryType = [self geometryType];
99+
SFGeometryType geometryType = [self geometryType];
100100

101101
switch (geometryType) {
102102
case SF_MULTIPOINT:
@@ -119,7 +119,7 @@ -(enum SFGeometryType) collectionType{
119119
}
120120
break;
121121
default:
122-
[NSException raise:@"Unexpected" format:@"Unexpected Geometry Collection Type: %u", geometryType];
122+
[NSException raise:@"Unexpected" format:@"Unexpected Geometry Collection Type: %ld", geometryType];
123123
}
124124

125125
return geometryType;

sf-ios/SFGeometryTypes.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* Geometry Type enumeration
1313
*/
14-
enum SFGeometryType{
14+
typedef NS_ENUM(NSInteger, SFGeometryType) {
1515
SF_GEOMETRY = 0,
1616
SF_POINT,
1717
SF_LINESTRING,
@@ -65,7 +65,7 @@ extern NSString * const SF_NONE_NAME;
6565
*
6666
* @return geometry type name
6767
*/
68-
+(NSString *) name: (enum SFGeometryType) geometryType;
68+
+(NSString *) name: (SFGeometryType) geometryType;
6969

7070
/**
7171
* Get the geometry type of the name
@@ -74,6 +74,6 @@ extern NSString * const SF_NONE_NAME;
7474
*
7575
* @return geometry type
7676
*/
77-
+(enum SFGeometryType) fromName: (NSString *) name;
77+
+(SFGeometryType) fromName: (NSString *) name;
7878

7979
@end

sf-ios/SFGeometryTypes.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
@implementation SFGeometryTypes
3232

33-
+(NSString *) name: (enum SFGeometryType) geometryType{
33+
+(NSString *) name: (SFGeometryType) geometryType{
3434
NSString *name = nil;
3535

3636
switch(geometryType){
@@ -96,8 +96,8 @@ +(NSString *) name: (enum SFGeometryType) geometryType{
9696
return name;
9797
}
9898

99-
+(enum SFGeometryType) fromName: (NSString *) name{
100-
enum SFGeometryType value = SF_NONE;
99+
+(SFGeometryType) fromName: (NSString *) name{
100+
SFGeometryType value = SF_NONE;
101101

102102
if(name != nil){
103103
name = [name uppercaseString];
@@ -125,7 +125,7 @@ +(enum SFGeometryType) fromName: (NSString *) name{
125125
];
126126
NSNumber *enumValue = [types objectForKey:name];
127127
if(enumValue != nil){
128-
value = (enum SFGeometryType)[enumValue intValue];
128+
value = (SFGeometryType)[enumValue intValue];
129129
}
130130
}
131131

sf-ios/SFLineString.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
*
9292
* @return new line string
9393
*/
94-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
94+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
9595

9696
/**
9797
* Initialize

sf-ios/SFLineString.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ -(instancetype) initWithPoints: (NSMutableArray<SFPoint *> *) points{
4545
return self;
4646
}
4747

48-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
48+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
4949
self = [super initWithType:geometryType andHasZ:hasZ andHasM:hasM];
5050
if(self != nil){
5151
self.points = [NSMutableArray array];

sf-ios/SFMultiCurve.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @return new multi curve
2626
*/
27-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
27+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
2828

2929
/**
3030
* Get the curves

sf-ios/SFMultiCurve.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
@implementation SFMultiCurve
1212

13-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
13+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
1414
self = [super initWithType:geometryType andHasZ:hasZ andHasM:hasM];
1515
return self;
1616
}

sf-ios/SFMultiSurface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @return new multi surface
2626
*/
27-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
27+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
2828

2929
/**
3030
* Get the surfaces

sf-ios/SFMultiSurface.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
@implementation SFMultiSurface
1212

13-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
13+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
1414
self = [super initWithType:geometryType andHasZ:hasZ andHasM:hasM];
1515
return self;
1616
}

sf-ios/SFPolygon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
*
109109
* @return new polygon
110110
*/
111-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
111+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
112112

113113
/**
114114
* Initialize

sf-ios/SFPolygon.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ -(instancetype) initWithRing: (SFLineString *) ring{
5757
return self;
5858
}
5959

60-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
60+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
6161
self = [super initWithType:geometryType andHasZ:hasZ andHasM:hasM];
6262
return self;
6363
}

sf-ios/SFPolyhedralSurface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
*
113113
* @return new polyhedral surface
114114
*/
115-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
115+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
116116

117117
/**
118118
* Initialize

sf-ios/SFPolyhedralSurface.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ -(instancetype) initWithPolygon: (SFPolygon *) polygon{
5656
return self;
5757
}
5858

59-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
59+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM{
6060
self = [super initWithType:geometryType andHasZ:hasZ andHasM:hasM];
6161
if(self != nil){
6262
self.polygons = [NSMutableArray array];

sf-ios/SFSurface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
*
2424
* @return new surface
2525
*/
26-
-(instancetype) initWithType: (enum SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
26+
-(instancetype) initWithType: (SFGeometryType) geometryType andHasZ: (BOOL) hasZ andHasM: (BOOL) hasM;
2727

2828
@end

0 commit comments

Comments
 (0)