[Libreoffice-commits] core.git: ios/iosremote
Siqi LIU
me at siqi.fr
Sat Jul 20 06:43:28 PDT 2013
ios/iosremote/iosremote.xcodeproj/project.pbxproj | 8 ++++---
ios/iosremote/iosremote/Communication/Client.h | 2 -
ios/iosremote/iosremote/serverList_vc.m | 23 ++++++++++------------
3 files changed, 17 insertions(+), 16 deletions(-)
New commits:
commit 5e723eb8477264d0ea6a2d0f467bce67e2423fde
Author: Siqi LIU <me at siqi.fr>
Date: Sat Jul 20 15:42:51 2013 +0200
differ the resolution of service address
Change-Id: I68e620939f27708cc483c584bf7aa389f6ec1199
diff --git a/ios/iosremote/iosremote.xcodeproj/project.pbxproj b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
index bba51b0..63d5412 100644
--- a/ios/iosremote/iosremote.xcodeproj/project.pbxproj
+++ b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
@@ -491,6 +491,7 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -506,6 +507,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
ONLY_ACTIVE_ARCH = YES;
+ PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
@@ -523,8 +525,8 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "iPhone Distribution";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Siqi Liu (SS3MXKAL2F)";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -533,7 +535,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PROVISIONING_PROFILE = "";
- "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "141469F2-2E5D-43DA-9152-98C3F3CFEF69";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
diff --git a/ios/iosremote/iosremote/Communication/Client.h b/ios/iosremote/iosremote/Communication/Client.h
index 50f1d40..12a3641 100644
--- a/ios/iosremote/iosremote/Communication/Client.h
+++ b/ios/iosremote/iosremote/Communication/Client.h
@@ -17,7 +17,7 @@
@property BOOL connected;
@property (nonatomic, strong) NSNumber* pin;
@property (nonatomic, strong) NSString* name;
- at property (nonatomic, weak) Server* server;
+ at property (nonatomic, strong) Server* server;
- (void) connect;
- (void) disconnect;
diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m
index 78f5d3b..5c158e8 100644
--- a/ios/iosremote/iosremote/serverList_vc.m
+++ b/ios/iosremote/iosremote/serverList_vc.m
@@ -46,15 +46,19 @@
int port = socketAddress->sin_port;
NSLog(@"Resolved at %@:%u", ipString, port);
- [self.comManager.autoDiscoveryServers replaceObjectAtIndex:[self.comManager.autoDiscoveryServers count]-1
- withObject:[[Server alloc] initWithProtocol:NETWORK atAddress:ipString ofName:sender.name]];
- [self.tableView reloadData];
+ [self.comManager connectToServer:[[Server alloc] initWithProtocol:NETWORK atAddress:ipString ofName:sender.name]];
}
}
-(void) netService:(NSNetService *)sender didNotResolve:(NSDictionary *)errorDict
{
NSLog(@"Failed to resolve");
+ UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Failed to reach the computer"
+ message:@"Please restart your application or wait the application to refresh. "
+ delegate:self
+ cancelButtonTitle:@"OK"
+ otherButtonTitles:nil];
+ [message show];
}
#pragma mark - bonjour service discovery
@@ -89,7 +93,6 @@
NSLog(@"Got service %p with hostname %@\n", aNetService,
[aNetService name]);
- [aNetService resolveWithTimeout:0.0];
[aNetService setDelegate:self];
@@ -97,6 +100,7 @@
{
UITableViewCell * cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
[(UIActivityIndicatorView *)[cell viewWithTag:5] stopAnimating];
+ [self.tableView reloadData];
}
}
@@ -236,11 +240,6 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
-
- if ([cell.detailTextLabel.text isEqualToString:@""]) {
- [tableView deselectRowAtIndexPath:indexPath animated:YES];
- return;
- }
if(self.comManager.state!=CONNECTING){
self.lastSpinningCellIndex = indexPath;
@@ -253,8 +252,8 @@
NSLog(@"Connecting to %@:%@", [[self.comManager.servers objectAtIndex:indexPath.row] serverName], [[self.comManager.servers objectAtIndex:indexPath.row] serverAddress]);
[self.comManager connectToServer:[self.comManager.servers objectAtIndex:indexPath.row]];
} else if (indexPath.section == 0){
- NSLog(@"Connecting to %@:%@", [[self.comManager.autoDiscoveryServers objectAtIndex:indexPath.row] serverName], [[self.comManager.autoDiscoveryServers objectAtIndex:indexPath.row] serverAddress]);
- [self.comManager connectToServer:[self.comManager.autoDiscoveryServers objectAtIndex:indexPath.row]];
+ NSLog(@"Connecting to %@", [[self.comManager.autoDiscoveryServers objectAtIndex:indexPath.row] name]);
+ [[self.comManager.autoDiscoveryServers objectAtIndex:indexPath.row] resolveWithTimeout:0.0];
}
[tableView deselectRowAtIndexPath:indexPath animated:YES];
@@ -357,7 +356,7 @@
[cell.detailTextLabel setText:[s serverAddress]];
} else if ([s isKindOfClass:[NSNetService class]]){
[cell.textLabel setText:[s name]];
- [cell.detailTextLabel setText:@"Resolving..."];
+ [cell.detailTextLabel setText:@""];
}
}
}
More information about the Libreoffice-commits
mailing list