Skip to content

Commit

Permalink
[MB-1282] Update iOS UA sdk to 6.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hcrowell committed Jul 6, 2015
1 parent 62dfcc1 commit 91946f3
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 14 deletions.
2 changes: 1 addition & 1 deletion plugin.xml
Expand Up @@ -289,7 +289,7 @@


<!-- UI Resource files -->
<source-file src="src/ios/Airship/libUAirship-6.1.0.a" framework="true"/>
<source-file src="src/ios/Airship/libUAirship-6.1.1.a" framework="true"/>

<!-- system frameworks -->
<framework src="libsqlite3.dylib" />
Expand Down
6 changes: 0 additions & 6 deletions src/ios/Airship/Common/UAUtils.h
Expand Up @@ -33,12 +33,6 @@
*/
@interface UAUtils : NSObject

///---------------------------------------------------------------------------------------
/// @name Digest/Hash Utils
///---------------------------------------------------------------------------------------

+ (NSString *)md5:(NSString *)sourceString;

///---------------------------------------------------------------------------------------
/// @name Device ID Utils
///---------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -46,7 +46,6 @@ - (void)displayLocalizedNotificationAlert:(NSDictionary *)alertDict {

// The alert is a a dictionary with more details, let's just get the message without localization
// This should be customized to fit your message details or usage scenario
//message = [[alertDict valueForKey:@"alert"] valueForKey:@"body"];

UA_LDEBUG(@"Received an alert in the foreground with a body.");

Expand Down
Expand Up @@ -30,7 +30,7 @@

// These IBOutlets needs to be strong because they have to be re-created and
// added back to the view for iOS 6.
@property (nonatomic, strong) IBOutlet UITableView *tableView;
@property (nonatomic, weak) IBOutlet UITableView *tableView;
@property (nonatomic, strong) IBOutlet UITableViewCell *aliasCell;
@property (nonatomic, strong) IBOutlet UITableViewCell *textCell;
@property (nonatomic, strong) IBOutlet UILabel *textLabel;
Expand Down
Expand Up @@ -53,13 +53,25 @@ - (void)viewDidLoad {
self.title = @"Device Alias";

UITextField *strongAliasField = self.aliasField;
strongAliasField.text = [UAirship push].alias;
strongAliasField.clearsOnBeginEditing = YES;

// Don't clear the text field pre-emptively
strongAliasField.clearsOnBeginEditing = NO;
strongAliasField.accessibilityLabel = @"Edit Alias";
self.textLabel.text = @"Assign an alias to a device or a group of devices to simplify "
@"the process of sending notifications.";
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.aliasField.text = [UAirship push].alias;
}

- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
// This will occur before the text field finishes on its own when popping the view controller
[self.view.window endEditing:animated];
}

#pragma mark -
#pragma mark UITableViewDelegate

Expand Down
Expand Up @@ -52,13 +52,26 @@ - (void)viewDidLoad {
self.title = @"Device Named User";

UITextField *strongNamedUserField = self.namedUserField;
strongNamedUserField.text = [UAirship push].namedUser.identifier;
strongNamedUserField.clearsOnBeginEditing = YES;

// Don't clear the text field pre-emptively
strongNamedUserField.clearsOnBeginEditing = NO;
strongNamedUserField.accessibilityLabel = @"Edit NamedUser";
self.textLabel.text = @"Assign a named user ID to a device or a group of devices to simplify "
@"the process of sending notifications.";
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.namedUserField.text = [UAirship push].namedUser.identifier;
}

- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];

// This will occur before the text field finishes on its own when popping the view controller
[self.view.window endEditing:animated];
}

#pragma mark -
#pragma mark UITableViewDelegate

Expand Down Expand Up @@ -118,7 +131,6 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField {
}

- (void)textFieldDidEndEditing:(UITextField *)textField {

NSString *newNamedUser = self.namedUserField.text;

// Trim leading whitespace
Expand Down
Binary file not shown.

0 comments on commit 91946f3

Please sign in to comment.