Skip to content

Commit

Permalink
feat: Add device names for iPhone 15 family, add check for dynamic is…
Browse files Browse the repository at this point in the history
…land (#1569)
  • Loading branch information
efstathiosntonas committed Sep 19, 2023
1 parent d73b01a commit 8e512ec
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/RNDeviceInfo/RNDeviceInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ - (NSDictionary *) getDeviceNamesByCode {
@"iPhone14,8": @"iPhone 14 Plus",
@"iPhone15,2": @"iPhone 14 Pro",
@"iPhone15,3": @"iPhone 14 Pro Max",
@"iPhone15,4": @"iPhone 15",
@"iPhone15,5": @"iPhone 15 Plus",
@"iPhone16,1": @"iPhone 15 Pro",
@"iPhone16,2": @"iPhone 15 Pro Max",
@"iPad4,1": @"iPad Air", // 5th Generation iPad (iPad Air) - Wifi
@"iPad4,2": @"iPad Air", // 5th Generation iPad (iPad Air) - Cellular
@"iPad4,3": @"iPad Air", // 5th Generation iPad (iPad Air)
Expand Down
16 changes: 16 additions & 0 deletions src/internal/devicesWithDynamicIsland.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
import { NotchDevice } from './privateTypes';

const devicesWithDynamicIsland: NotchDevice[] = [
{
brand: 'Apple',
model: 'iPhone 15',
},
{
brand: 'Apple',
model: 'iPhone 15 Plus',
},
{
brand: 'Apple',
model: 'iPhone 15 Pro',
},
{
brand: 'Apple',
model: 'iPhone 15 Pro Max',
},
{
brand: 'Apple',
model: 'iPhone 14 Pro',
Expand Down
16 changes: 16 additions & 0 deletions src/internal/devicesWithNotch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
import { NotchDevice } from './privateTypes';

const devicesWithNotch: NotchDevice[] = [
{
brand: 'Apple',
model: 'iPhone 15',
},
{
brand: 'Apple',
model: 'iPhone 15 Plus',
},
{
brand: 'Apple',
model: 'iPhone 15 Pro',
},
{
brand: 'Apple',
model: 'iPhone 15 Pro Max',
},
{
brand: 'Apple',
model: 'iPhone 14',
Expand Down

0 comments on commit 8e512ec

Please sign in to comment.