Skip to content

Commit 84c360e

Browse files
author
jt
committed
On Linux, Bundle.main.bundleIdentifier is nil. Create custom bundle identifier instead.
1 parent 80802c5 commit 84c360e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/ParseSwift/Storage/ParseFileManager.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,19 @@ internal struct ParseFileManager {
8383
}
8484

8585
init?() {
86+
#if os(Linux)
87+
guard let applicationId = ParseConfiguration.applicationId else {
88+
return nil
89+
}
90+
applicationIdentifier = "com.github.parse-community.parse-swift.\(applicationId)"
91+
#else
8692
if let identifier = Bundle.main.bundleIdentifier {
8793
applicationIdentifier = identifier
8894
} else {
8995
return nil
9096
}
97+
#endif
98+
9199
applicationGroupIdentifer = nil
92100
}
93101

0 commit comments

Comments
 (0)