You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
subtitle:"Keep your device unlocked while we verify Developer Mode is enabled.",
459
+
icon:"gearshape",
460
+
tint:.orange
461
+
)
462
+
case.disabled:
463
+
return.init(
464
+
title:"Enable Developer Mode",
465
+
subtitle:"Turn on Developer Mode in Settings > Privacy & Security, then restart if iOS asks you to.",
466
+
icon:"gearshape.fill",
467
+
tint:.orange
468
+
)
469
+
case.error:
470
+
return.init(
471
+
title:"Can’t confirm Developer Mode",
472
+
subtitle:"Unlock your device and make sure it’s connected. We’ll try again automatically.",
473
+
icon:"questionmark.app.fill",
474
+
tint:.yellow
475
+
)
476
+
case.enabled:
477
+
break
478
+
}
442
479
if !ddiMounted {
443
480
return.init(
444
481
title:"Mount the Developer Disk Image",
@@ -474,13 +511,33 @@ struct HomeView: View {
474
511
privatevarprimaryActionTitle:String{
475
512
if isValidatingPairingFile {return"Validating…"}
476
513
if !pairingFileExists {return pairingFilePresentOnDisk ?"Re-import Pairing File":"Import Pairing File"}
514
+
switch developerModeStatus {
515
+
case.unknown,.checking:
516
+
return"Checking Developer Mode…"
517
+
case.disabled:
518
+
return"Enable Developer Mode"
519
+
case.error:
520
+
return"Retry Developer Mode Check"
521
+
case.enabled:
522
+
break
523
+
}
477
524
if !ddiMounted {return"Mount Developer Disk Image"}
478
525
return"Connect by App"
479
526
}
480
527
481
528
privatevarprimaryActionIcon:String{
482
529
if isValidatingPairingFile {return"hourglass"}
483
530
if !pairingFileExists {return pairingFilePresentOnDisk ?"arrow.clockwise":"doc.badge.plus"}
531
+
switch developerModeStatus {
532
+
case.unknown,.checking:
533
+
return"hourglass"
534
+
case.disabled:
535
+
return"exclamationmark.triangle"
536
+
case.error:
537
+
return"questionmark.app.fill"
538
+
case.enabled:
539
+
break
540
+
}
484
541
if !ddiMounted {return"externaldrive"}
485
542
return"cable.connector.horizontal"
486
543
}
@@ -523,8 +580,55 @@ struct HomeView: View {
523
580
)
524
581
}
525
582
583
+
letdeveloperModeItem:ChecklistItem={
584
+
if !pairingFileExists {
585
+
returnChecklistItem(
586
+
title:"Developer Mode",
587
+
subtitle:"Import your pairing file to check the Developer Mode status.",
588
+
status:.waiting,
589
+
actionTitle:nil,
590
+
action:nil
591
+
)
592
+
}
593
+
switch developerModeStatus {
594
+
case.unknown,.checking:
595
+
returnChecklistItem(
596
+
title:"Developer Mode",
597
+
subtitle:"Checking developer mode status…",
598
+
status:.waiting,
599
+
actionTitle:nil,
600
+
action:nil
601
+
)
602
+
case.enabled:
603
+
returnChecklistItem(
604
+
title:"Developer Mode",
605
+
subtitle:"Enabled.",
606
+
status:.ready,
607
+
actionTitle:nil,
608
+
action:nil
609
+
)
610
+
case.disabled:
611
+
returnChecklistItem(
612
+
title:"Developer Mode",
613
+
subtitle:"Turn on Developer Mode in Settings > Privacy & Security.",
614
+
status:.actionRequired,
615
+
actionTitle:nil,
616
+
action:nil
617
+
)
618
+
case.error:
619
+
returnChecklistItem(
620
+
title:"Developer Mode",
621
+
subtitle:"We couldn’t determine the status. Unlock your device and keep it connected.",
622
+
status:.attention,
623
+
actionTitle:nil,
624
+
action:nil
625
+
)
626
+
}
627
+
}()
628
+
526
629
return[
527
630
pairingItem,
631
+
developerModeItem,
528
632
ChecklistItem(
529
633
title:"Developer Disk Image",
530
634
subtitle: ddiMounted ?"Mounted successfully.":"",
@@ -911,6 +1015,32 @@ struct HomeView: View {
911
1015
privatefunc primaryActionTapped(){
912
1016
guard !isValidatingPairingFile else{return}
913
1017
if pairingFileExists {
1018
+
switch developerModeStatus {
1019
+
case.unknown,.checking:
1020
+
lastDeveloperModeCheck =nil
1021
+
refreshBackground()
1022
+
return
1023
+
case.disabled:
1024
+
lastDeveloperModeCheck =nil
1025
+
refreshBackground()
1026
+
showAlert(
1027
+
title:"Developer Mode Required".localized,
1028
+
message:"Turn on Developer Mode in Settings > Privacy & Security, then restart if prompted.".localized,
1029
+
showOk:true
1030
+
)
1031
+
return
1032
+
case.error:
1033
+
lastDeveloperModeCheck =nil
1034
+
refreshBackground()
1035
+
showAlert(
1036
+
title:"Unable to Verify Developer Mode".localized,
1037
+
message:"Unlock your device and make sure it’s connected to the network, then try again.".localized,
1038
+
showOk:true
1039
+
)
1040
+
return
1041
+
case.enabled:
1042
+
break
1043
+
}
914
1044
if !ddiMounted {
915
1045
showAlert(title:"Device Not Mounted".localized, message:"The Developer Disk Image has not been mounted yet. Check in settings for more information.".localized, showOk:true){ _ in}
0 commit comments