Skip to content

Commit b756026

Browse files
committed
Storage: make FirebaseStorage build for Android
Remove some linkage on Android as the libraries are not present. It is unclear if this is underlinking, but for now, this allows us to make progress. Explicitly cast the error value as it is a `DWORD` on Windows and `CInt` on Unix.
1 parent d721637 commit b756026

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,11 @@ target_link_libraries(FirebaseStorage PUBLIC
228228
firebase_storage
229229
FirebaseCore)
230230
target_link_libraries(FirebaseStorage PRIVATE
231-
crypto
232-
firebase_rest_lib
233231
flatbuffers
234-
ssl
232+
$<$<PLATFORM_ID:Windows>:crypto>
233+
$<$<PLATFORM_ID:Windows>:firebase_rest_lib>
235234
$<$<PLATFORM_ID:Windows>:libcurl>
235+
$<$<PLATFORM_ID:Windows>:ssl>
236236
$<$<PLATFORM_ID:Windows>:zlibstatic>)
237237

238238
if(SWIFT_FIREBASE_BUILD_EXAMPLES)

Sources/FirebaseStorage/StorageErrorCode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension StorageErrorCode: RawRepresentable {
3030

3131
extension StorageErrorCode {
3232
init(_ error: firebase.storage.Error, errorMessage: String?) {
33-
self.init((code: error.rawValue, message: errorMessage ?? "\(error.rawValue)"))
33+
self.init((code: numericCast(error.rawValue), message: errorMessage ?? "\(error.rawValue)"))
3434
}
3535

3636
init?(_ error: firebase.storage.Error?, errorMessage: UnsafePointer<CChar>?) {

0 commit comments

Comments
 (0)