Skip to content

Commit 5796476

Browse files
Merge pull request #170 from TakayukiHoshi1984/modify_ios11_update_deprecated_api
DeprecationWarningが出ている箇所の修正
2 parents 7e73bb5 + bde4e1d commit 5796476

210 files changed

Lines changed: 6291 additions & 7837 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dConnectDevicePlugin/DCMDevicePluginSDK/DCMDevicePluginSDK.xcodeproj/xcshareddata/xcschemes/DCMDevicePluginSDK.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0910"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

dConnectDevicePlugin/DCMDevicePluginSDK/DCMDevicePluginSDK.xcodeproj/xcshareddata/xcschemes/DCMDevicePluginSDK_framework.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0910"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

dConnectDevicePlugin/dConnectDeviceAWSIoT/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ SPEC CHECKSUMS:
1212

1313
PODFILE CHECKSUM: e57f03e93e2bb0fafc6335552293afc70c7f47dc
1414

15-
COCOAPODS: 1.2.0
15+
COCOAPODS: 1.3.1

dConnectDevicePlugin/dConnectDeviceAWSIoT/dConnectDeviceAWSIoT.xcodeproj/project.pbxproj

Lines changed: 110 additions & 90 deletions
Large diffs are not rendered by default.

dConnectDevicePlugin/dConnectDeviceAWSIoT/dConnectDeviceAWSIoT/Classes/DPAWSIoTUtils.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ + (NSString *)packageName {
443443
}
444444

445445
// アラート表示
446-
+ (void)showAlert:(UIViewController*)vc title:(NSString*)title message:(NSString*)message handler:(void (^)())handler {
446+
+ (void)showAlert:(UIViewController*)vc title:(NSString*)title message:(NSString*)message handler:(void (^)(void))handler {
447447
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title
448448
message:message
449449
preferredStyle:UIAlertControllerStyleAlert];

dConnectDevicePlugin/dConnectDeviceAWSIoT/dConnectDeviceAWSIoT/Classes/P2P/Core/DPAWSIoTRelayClient.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ - (int) execute:(NSString *)address port:(int)port
100100
NSLog(@"DPAWSIoTRelayClient: connect: %s", UDT::getlasterror().getErrorMessage());
101101
return 0;
102102
}
103-
104103
freeaddrinfo(peer);
105104

106105
_socket = [[DPAWSIoTSocketTask alloc] initWithSocket:socket];

dConnectDevicePlugin/dConnectDeviceAWSIoT/dConnectDeviceAWSIoT/Classes/P2P/Core/DPAWSIoTSocketTask.mm

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
//
99

1010
#import "DPAWSIoTSocketTask.h"
11-
1211
#define BUFFER_SIZE 512
1312

1413
char const HEADER[4] = {
@@ -57,30 +56,26 @@ - (void) sendData:(const char *)data offset:(int)offset length:(int)length
5756
NSLog(@"DPAWSIoTSocketTask send error .");
5857
return;
5958
}
60-
6159
if (length == 0) {
6260
return;
6361
}
64-
6562
[self intToByte:length to:_sendBuffer];
66-
6763
if (UDT::ERROR == UDT::send(_socket, HEADER, 4, 0)) {
6864
NSLog(@"DPAWSIoTSocketTask send error .");
6965
return;
7066
}
71-
7267
if (UDT::ERROR == UDT::send(_socket, _sendBuffer, 4, 0)) {
7368
NSLog(@"DPAWSIoTSocketTask send error .");
7469
return;
7570
}
76-
7771
int _offset = offset;
7872
int _length;
7973
while (_offset < offset + length) {
8074
_length = offset + length - _offset;
8175
if (_length > BUFFER_SIZE) {
8276
_length = BUFFER_SIZE;
8377
}
78+
8479
if (UDT::ERROR == UDT::send(_socket, data + _offset, _length, 0)) {
8580
NSLog(@"DPAWSIoTSocketTask send error .");
8681
return;
@@ -96,26 +91,22 @@ - (void) execute
9691
if ([_delegate respondsToSelector:@selector(didConnectedAddress:port:)]) {
9792
[_delegate didConnectedAddress:_address port:_port];
9893
}
99-
10094
while (!_closeFlag) {
10195
if (![self readHeader]) {
10296
NSLog(@"DPAWSIoTSocketTask header error.");
10397
}
104-
10598
int size = [self readSize];
10699
if (size == -1) {
107100
NSLog(@"DPAWSIoTSocketTask size error.");
108101
break;
109102
}
110-
111103
while (size > 0 && !_closeFlag) {
112104
int rs = UDT::recv(_socket, data, BUFFER_SIZE, 0);
113105
if (_closeFlag || UDT::ERROR == rs) {
114106
NSLog(@"DPAWSIoTSocketTask UDT error...");
115107
break;
116108
}
117109
size -= rs;
118-
119110
if ([_delegate respondsToSelector:@selector(didReceivedData:length:)]) {
120111
[_delegate didReceivedData:(const char *)data length:(int)rs];
121112
}

dConnectDevicePlugin/dConnectDeviceAWSIoT/dConnectDeviceAWSIoT/Classes/P2P/Core/DPAWSIoTStunClient.mm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ - (instancetype) init
4141
- (void) bindingRequest:(StunBindingRequestCallback)callback
4242
{
4343
_callback = callback;
44-
4544
if (_stunAddress) {
4645
[self doBindingRequest:_stunAddress];
4746
} else {
@@ -149,7 +148,7 @@ - (void) parse:(NSData *)data
149148
_cancelBlock = nil;
150149

151150
if (_callback) {
152-
_callback(ip, [port integerValue]);
151+
_callback(ip, (int)[port integerValue]);
153152
}
154153
}
155154

@@ -174,8 +173,8 @@ - (void) didConnect
174173
[request appendBytes:changeRequest length:sizeof(changeRequest)];
175174
[request appendBytes:attributeSize length:sizeof(attributeSize)];
176175
[request appendBytes:attributeBody length:sizeof(attributeBody)];
177-
178-
[_server sendData:(const char *)[request bytes] length:[request length] to:_stunAddress port:_stunPort];
176+
177+
[_server sendData:(const char *)[request bytes] length:(int)[request length] to:_stunAddress port:_stunPort];
179178
}
180179

181180
- (void) didNotConnect

dConnectDevicePlugin/dConnectDeviceAWSIoT/dConnectDeviceAWSIoT/Classes/P2P/DPAWSIoTServerRunnable.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ - (void) r:(NSData *)data
4747
if (headerSize > 0) {
4848
NSData *d = [self convHeader:_headerData];
4949
[self.connection sendData:d.bytes length:(int)d.length];
50-
[self.connection sendData:data.bytes offset:headerSize length:data.length - headerSize];
50+
[self.connection sendData:data.bytes offset:headerSize length:(int) (data.length - headerSize)];
5151
_headerEndFlag = YES;
5252
}
5353
} else {

dConnectDevicePlugin/dConnectDeviceAllJoyn/dConnectDeviceAllJoyn.xcodeproj/project.pbxproj

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
25F136481B67112600ADD8CB /* DPAllJoynColorUtility.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DPAllJoynColorUtility.mm; sourceTree = "<group>"; };
169169
AB6F63171D8699A80027A2A2 /* dconnect_icon_off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dconnect_icon_off.png; sourceTree = "<group>"; };
170170
AB6F63181D8699A80027A2A2 /* dconnect_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dconnect_icon.png; sourceTree = "<group>"; };
171+
AB9F67801FBACF98003A8EA0 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
171172
ABC861A51BDA2B4A00E86FA9 /* libAllJoynFramework_iOS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libAllJoynFramework_iOS.a; path = deps/AllJoyn/darwin/arm/iphoneos/release/dist/about/lib/libAllJoynFramework_iOS.a; sourceTree = "<group>"; };
172173
D6C860301D3A1D2000232EEF /* DPAllJoynService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DPAllJoynService.h; sourceTree = "<group>"; };
173174
D6C860311D3A1D2000232EEF /* DPAllJoynService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DPAllJoynService.m; sourceTree = "<group>"; };
@@ -372,6 +373,7 @@
372373
25851BF81B57CF3D00CB732E /* Download_on_the_App_Store_Badge_US-UK_135x40@2x.png */,
373374
25851BF91B57CF3D00CB732E /* Download_on_the_App_Store_JP_135x40@2x.png */,
374375
25851BF01B57C47900CB732E /* LIFX_Logo@2.jpg */,
376+
AB9F67801FBACF98003A8EA0 /* module.modulemap */,
375377
);
376378
path = Resources;
377379
sourceTree = "<group>";
@@ -517,7 +519,7 @@
517519
25A06BF31B562C07005B6F8A /* Project object */ = {
518520
isa = PBXProject;
519521
attributes = {
520-
LastUpgradeCheck = 0900;
522+
LastUpgradeCheck = 0910;
521523
ORGANIZATIONNAME = "NTT DOCOMO, INC.";
522524
TargetAttributes = {
523525
25A06BFB1B562C07005B6F8A = {
@@ -759,12 +761,13 @@
759761
"$(PROJECT_DIR)/deps/AllJoyn/darwin/arm/$(PLATFORM_NAME)/$(CONFIGURATION)/dist/about/lib",
760762
"$(PROJECT_DIR)/deps/AllJoyn/darwin/$(CURRENT_ARCH)/$(PLATFORM_NAME)/$(CONFIGURATION)/dist/cpp/lib",
761763
);
764+
MODULEMAP_FILE = dConnectDeviceAllJoyn/Resources/module.modulemap;
762765
MTL_ENABLE_DEBUG_INFO = YES;
763766
ONLY_ACTIVE_ARCH = YES;
764767
SDKROOT = iphoneos;
765768
TARGETED_DEVICE_FAMILY = "1,2";
766769
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/dConnectDeviceAllJoyn/Headers";
767-
VALID_ARCHS = "arm64 i386 armv7s armv7";
770+
VALID_ARCHS = "arm64 armv7s armv7 i386";
768771
VERSIONING_SYSTEM = "";
769772
VERSION_INFO_PREFIX = "";
770773
};
@@ -830,12 +833,13 @@
830833
"$(PROJECT_DIR)/deps/AllJoyn/darwin/arm/$(PLATFORM_NAME)/$(CONFIGURATION)/dist/about/lib",
831834
"$(PROJECT_DIR)/deps/AllJoyn/darwin/$(CURRENT_ARCH)/$(PLATFORM_NAME)/$(CONFIGURATION)/dist/cpp/lib",
832835
);
836+
MODULEMAP_FILE = dConnectDeviceAllJoyn/Resources/module.modulemap;
833837
MTL_ENABLE_DEBUG_INFO = NO;
834838
SDKROOT = iphoneos;
835839
TARGETED_DEVICE_FAMILY = "1,2";
836840
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/dConnectDeviceAllJoyn/Headers";
837841
VALIDATE_PRODUCT = YES;
838-
VALID_ARCHS = "arm64 i386 armv7s armv7";
842+
VALID_ARCHS = "arm64 armv7s armv7 i386";
839843
VERSIONING_SYSTEM = "";
840844
VERSION_INFO_PREFIX = "";
841845
};
@@ -872,7 +876,7 @@
872876
PRODUCT_NAME = "$(TARGET_NAME)";
873877
SKIP_INSTALL = YES;
874878
STRIP_STYLE = "non-global";
875-
VALID_ARCHS = "arm64 i386 armv7s armv7";
879+
VALID_ARCHS = "arm64 armv7s armv7 i386";
876880
};
877881
name = Debug;
878882
};
@@ -908,7 +912,7 @@
908912
PRODUCT_NAME = "$(TARGET_NAME)";
909913
SKIP_INSTALL = YES;
910914
STRIP_STYLE = "non-global";
911-
VALID_ARCHS = "arm64 i386 armv7s armv7";
915+
VALID_ARCHS = "arm64 armv7s armv7 i386";
912916
};
913917
name = Release;
914918
};

0 commit comments

Comments
 (0)