Skip to content

Commit

Permalink
fix: Compilation errors Undefined symbol and `SystemConfiguration n…
Browse files Browse the repository at this point in the history
…ot found` on watchOS (#1748)
  • Loading branch information
dplewis authored Oct 5, 2023
1 parent 9fda428 commit e7df36b
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 224 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- test:parseui:all
- test:parse_live_query:all
- build:starters
fail-fast: false
fail-fast: true
runs-on: macos-12
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -76,17 +76,20 @@ jobs:
run: |
ARTIFACT_NAME=${{ env.ARTIFACT_NAME }}
TEST_RESULTS=$(find ~/Library/Developer/Xcode/DerivedData -name "*.xcresult")
BUILD_RESULTS=$(find ~/Library/Developer/Xcode/DerivedData -name "*.xcactivitylog")
echo ARTIFACT_NAME=${ARTIFACT_NAME//:/-} >> $GITHUB_ENV # replace colon with dashes
echo TEST_RESULTS=${TEST_RESULTS} >> $GITHUB_ENV
echo "Artifact Name: $ARTIFACT_NAME"
echo "Test Result Location: $TEST_RESULTS"
echo "Build Result Location: $BUILD_RESULTS"
- name: Upload Artifact Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: |
~/Library/Developer/Xcode/DerivedData/Parse-*/Logs/Test
~/Library/Developer/Xcode/DerivedData/**/Logs/Build
- name: Upload Coverage
uses: codecov/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#import "PFInstallationController.h"

#if !TARGET_OS_WATCH

#import "BFTask+Private.h"
#import "PFAssert.h"
#import "PFCurrentInstallationController.h"
Expand Down Expand Up @@ -105,3 +107,5 @@ - (PFCurrentInstallationController *)currentInstallationController {
}

@end

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#import "PFCurrentInstallationController.h"

#if !TARGET_OS_WATCH

#import "BFTask+Private.h"
#import "PFAsyncTaskQueue.h"
#import "PFInstallationIdentifierStore.h"
Expand Down Expand Up @@ -280,3 +282,5 @@ - (void)setCurrentInstallationMatchesDisk:(BOOL)currentInstallationMatchesDisk {
}

@end

#endif
3 changes: 3 additions & 0 deletions Parse/Parse/Internal/PFReachability.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#import "PFReachability.h"

#if !TARGET_OS_WATCH
#import <SystemConfiguration/SystemConfiguration.h>

#import "PFAssert.h"
Expand Down Expand Up @@ -209,3 +210,5 @@ - (void)_startMonitoringReachabilityWithURL:(NSURL *)url {
}

@end

#endif
5 changes: 5 additions & 0 deletions Parse/Parse/Internal/Push/Utilites/PFPushUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
#import "PFAlertView.h"
#endif

#if !TARGET_OS_WATCH
#import "PFInstallationPrivate.h"
#endif

#import "PFKeychainStore.h"
#import "PFLogging.h"
#import "PFMacros.h"
Expand Down Expand Up @@ -49,11 +52,13 @@ + (NSString *)getDeviceTokenFromKeychain {
return store[@"ParsePush"];
}

#if !TARGET_OS_WATCH
+ (void)clearDeviceToken {
// Used in test case setup.
[[PFInstallation currentInstallation] _clearDeviceToken];
[[[PFKeychainStore alloc] initWithService:@"ParsePush"] removeObjectForKey:@"ParsePush"];
}
#endif

#if TARGET_OS_IOS

Expand Down
1 change: 1 addition & 0 deletions ParseStarterProject/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.framework
Package.resolved

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
3901ECD82ACF3C7C0076D426 /* ParseObjC in Frameworks */ = {isa = PBXBuildFile; productRef = 3901ECD72ACF3C7C0076D426 /* ParseObjC */; };
391740322AC65AD500588AF7 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 391740312AC65A2000588AF7 /* libsqlite3.tbd */; };
391740352AC65D0000588AF7 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 391740332AC65C6700588AF7 /* libsqlite3.tbd */; };
391740372AC65DCB00588AF7 /* ParseObjC in Frameworks */ = {isa = PBXBuildFile; productRef = 391740362AC65DCB00588AF7 /* ParseObjC */; };
Expand Down Expand Up @@ -104,6 +105,7 @@
files = (
391740322AC65AD500588AF7 /* libsqlite3.tbd in Frameworks */,
7C606000292BD3DC00E4B6D2 /* SystemConfiguration.framework in Frameworks */,
3901ECD82ACF3C7C0076D426 /* ParseObjC in Frameworks */,
7C605FFE292BD3D700E4B6D2 /* AudioToolbox.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -266,6 +268,9 @@
068C15651BC8F15300820E44 /* PBXTargetDependency */,
);
name = "ParseStarter-Swift";
packageProductDependencies = (
3901ECD72ACF3C7C0076D426 /* ParseObjC */,
);
productName = ParseStarterProject;
productReference = 81BA81451A49DA1800E65899 /* ParseStarter-Swift.app */;
productType = "com.apple.product-type.application";
Expand Down Expand Up @@ -415,7 +420,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
WATCHOS_DEPLOYMENT_TARGET = 4.0;
};
name = Debug;
};
Expand All @@ -438,7 +443,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
WATCHOS_DEPLOYMENT_TARGET = 4.0;
};
name = Release;
};
Expand All @@ -458,7 +463,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
WATCHOS_DEPLOYMENT_TARGET = 4.0;
};
name = Debug;
};
Expand All @@ -478,7 +483,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
WATCHOS_DEPLOYMENT_TARGET = 4.0;
};
name = Release;
};
Expand Down Expand Up @@ -664,6 +669,10 @@
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
3901ECD72ACF3C7C0076D426 /* ParseObjC */ = {
isa = XCSwiftPackageProductDependency;
productName = ParseObjC;
};
391740362AC65DCB00588AF7 /* ParseObjC */ = {
isa = XCSwiftPackageProductDependency;
productName = ParseObjC;
Expand Down

This file was deleted.

Loading

0 comments on commit e7df36b

Please sign in to comment.