diff --git a/src/ios/CDVCapture.bundle/microphone-667h@2x~iphone.png b/src/ios/CDVCapture.bundle/microphone-667h@2x~iphone.png new file mode 100644 index 00000000..0d93184c Binary files /dev/null and b/src/ios/CDVCapture.bundle/microphone-667h@2x~iphone.png differ diff --git a/src/ios/CDVCapture.bundle/microphone-736h@3x~iphone.png b/src/ios/CDVCapture.bundle/microphone-736h@3x~iphone.png new file mode 100644 index 00000000..ccf0b47a Binary files /dev/null and b/src/ios/CDVCapture.bundle/microphone-736h@3x~iphone.png differ diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m index 53e1b2b9..8ac0f641 100644 --- a/src/ios/CDVCapture.m +++ b/src/ios/CDVCapture.m @@ -20,6 +20,7 @@ Licensed to the Apache Software Foundation (ASF) under one #import "CDVCapture.h" #import "CDVFile.h" #import +#import #define kW3CMediaFormatHeight @"height" #define kW3CMediaFormatWidth @"width" @@ -620,6 +621,17 @@ - (void)loadView if (isIphone5) { microphoneResource = @"CDVCapture.bundle/microphone-568h"; } + // iPhone 6, iPhone 6s, iPhone 7: 375 × 667 + BOOL isIphone6 = ([[UIScreen mainScreen] bounds].size.width == 667 && [[UIScreen mainScreen] bounds].size.height == 375) || ([[UIScreen mainScreen] bounds].size.height == 667 && [[UIScreen mainScreen] bounds].size.width == 375); + if (isIphone6) { + microphoneResource = @"CDVCapture.bundle/microphone-667h"; + } + + // iPhone 6 Plus, iPhone 6s Plus, iPhone 7 Plus: 414 × 736 + BOOL isIphone6Plus = ([[UIScreen mainScreen] bounds].size.width == 736 && [[UIScreen mainScreen] bounds].size.height == 414) || ([[UIScreen mainScreen] bounds].size.height == 736 && [[UIScreen mainScreen] bounds].size.width == 414); + if (isIphone6Plus) { + microphoneResource = @"CDVCapture.bundle/microphone-736h"; + } NSBundle* cdvBundle = [NSBundle bundleForClass:[CDVCapture class]]; UIImage* microphone = [UIImage imageNamed:[self resolveImageResource:microphoneResource] inBundle:cdvBundle compatibleWithTraitCollection:nil];