Skip to content

Commit

Permalink
Merge pull request #22 from shankari/fix_relative_url_issue
Browse files Browse the repository at this point in the history
Return the connection string instead of the connection URL
  • Loading branch information
shankari authored May 29, 2022
2 parents 25506ec + 27346b5 commit df2e225
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
id="cordova-plugin-em-settings"
version="1.2.2">
version="1.2.3">

<name>ConnectionSettings</name>
<description>Simple package that stores all the connection settings that need to be configured</description>
Expand Down
2 changes: 1 addition & 1 deletion src/ios/BEMConnectionSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
-(NSDictionary*)getSettings;
-(NSDictionary*)getDefaultConfig;
-(void)setSettings:(NSDictionary*)newConfig;
-(NSURL*) getConnectUrl;
-(NSString*) getConnectString;
-(NSString*) authMethod;
-(NSString*) authValueForKey:(NSString*) key;
@end
4 changes: 2 additions & 2 deletions src/ios/BEMConnectionSettings.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ - (NSDictionary*)getDefaultConfig
// from the plugin initialize methods before the javascript has the opportunity to set the config
// Note that we cannot throw from the constructor instead because then we cannot create the shared instance
// and even the javascript cannot set the config
- (NSURL*)getConnectUrl
- (NSString*)getConnectString
{
if (connSettingDict == NULL) {
NSException* notFoundEx = [[NSException alloc] initWithName:@"SettingsNotFound"
Expand All @@ -94,7 +94,7 @@ - (NSURL*)getConnectUrl
@throw notFoundEx;
}

return [NSURL URLWithString:[connSettingDict objectForKey: @"connectUrl"]];
return [connSettingDict objectForKey: @"connectUrl"];
}

- (NSDictionary*) nativeAuth
Expand Down

0 comments on commit df2e225

Please sign in to comment.