-
Notifications
You must be signed in to change notification settings - Fork 126
Feat: add UseEmulator to storage api #1795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
680fef2
e52e3ec
6026076
93db81c
de56bde
ad03abc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ | |
| #include "storage/src/ios/storage_reference_ios.h" | ||
|
|
||
| #import "FirebaseStorage-Swift.h" | ||
| #include <Foundation/Foundation.h> | ||
|
|
||
| namespace firebase { | ||
| namespace storage { | ||
|
|
@@ -97,6 +98,17 @@ | |
| impl().maxOperationRetryTime = max_transfer_retry_seconds; | ||
| } | ||
|
|
||
| void StorageInternal::UseEmulator(const char* host, int port) { | ||
|
|
||
| NSCAssert(host && host[0] != '\0', @"Emulator host cannot be null or empty."); | ||
|
|
||
| NSCAssert(port > 0, @"Emulator port must be a positive number."); | ||
|
Comment on lines
+103
to
+105
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| NSString *hostString = [NSString stringWithUTF8String:host]; | ||
|
|
||
| [impl() useEmulatorWithHost:hostString port:port]; | ||
| } | ||
|
|
||
| // Whether this object was successfully initialized by the constructor. | ||
| bool StorageInternal::initialized() const { return impl() != nil; } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.