Skip to content

Commit f7fa2d6

Browse files
authored
Fix iOS platform build issue (#11)
* Add iOS build CI * Fix iOS build issue
1 parent f88a3c1 commit f7fa2d6

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.github/workflows/ios.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ jobs:
2424
xcode-version: ${{ matrix.xcode-version }}
2525
- name: Swift version
2626
run: swift --version
27-
- name: Build and run tests in debug mode with coverage
27+
- name: Build in debug mode on iOS
28+
run: |
29+
xcodebuild build \
30+
-scheme OpenGraph-Package \
31+
-configuration Debug \
32+
-destination "platform=iOS" \
33+
-enableCodeCoverage=YES \
34+
-derivedDataPath .build-debug \
35+
OTHER_SWIFT_FLAGS="-warnings-as-errors"
36+
- name: Build and run tests in debug mode with coverage on iOS Simulator
2837
run: |
2938
xcodebuild test \
3039
-scheme OpenGraph-Package \

Sources/_OpenGraph/Debug/og-debug-server.mm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,22 +197,22 @@
197197
id object = [NSJSONSerialization JSONObjectWithData:(__bridge NSData *)data options:0 error:NULL];
198198
if (object && [object isKindOfClass:NSDictionary.class]) {
199199
NSDictionary *dic = (NSDictionary *)object;
200-
id command = dic[@"command"];
201-
if ([command isEqualTo:@"graph/description"]) {
200+
NSString *command = dic[@"command"];
201+
if ([command isEqual:@"graph/description"]) {
202202
NSMutableDictionary *mutableDic = [NSMutableDictionary dictionaryWithDictionary:dic];
203203
mutableDic[(__bridge NSString *)OGDescriptionFormat] = @"graph/dict";
204204
CFTypeRef description = OG::Graph::description(nullptr, mutableDic);
205205
if (description) {
206206
NSData *descriptionData = [NSJSONSerialization dataWithJSONObject:(__bridge id)description options:0 error:NULL];
207207
return (__bridge CFDataRef)descriptionData;
208208
}
209-
} else if ([command isEqualTo:@"profiler/start"]) {
209+
} else if ([command isEqual:@"profiler/start"]) {
210210
// TODO
211-
} else if ([command isEqualTo:@"profiler/stop"]) {
211+
} else if ([command isEqual:@"profiler/stop"]) {
212212
// TODO
213-
} else if ([command isEqualTo:@"profiler/reset"]) {
213+
} else if ([command isEqual:@"profiler/reset"]) {
214214
// TODO
215-
} else if ([command isEqualTo:@"profiler/mark"]) {
215+
} else if ([command isEqual:@"profiler/mark"]) {
216216
// TODO
217217
}
218218
}

0 commit comments

Comments
 (0)