Skip to content

Commit 804497d

Browse files
committed
show dev mode option instead of trying to enable
1 parent cf96224 commit 804497d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

devicemanagement/device_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def show_apply_error(e: Exception, update_label=lambda x: None, files_list: list
8383
return ApplyAlertMessage(QCoreApplication.tr("You must run the application as an administer to use BookRestore tweaks."), detailed_txt="Try running the program with sudo.")
8484
elif isinstance(e, InvalidServiceError):
8585
return ApplyAlertMessage(QCoreApplication.tr("You must enable developer mode on your device. You can do it in the Settings app."),
86-
detailed_txt=QCoreApplication.tr("BookRestore tweaks require developer mode to apply. You can enable this at the bottom of the Settings app on your iPhone or iPad."))
86+
detailed_txt=QCoreApplication.tr("BookRestore tweaks with the AFC method require developer mode to apply.\n\nYou can enable this at the bottom of Settings > Privacy & Security > Developer Mode on your iPhone or iPad."))
8787
elif isinstance(e, NuggetException):
8888
return ApplyAlertMessage(str(e), detailed_txt=e.detailed_text)
8989
else:

restore/bookrestore.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,9 @@ def perform_bookrestore(files: list[FileToRestore], lockdown_client: LockdownCli
399399
if not lockdown_client.developer_mode_status:
400400
# enable developer mode
401401
progress_callback("Enabling Developer Mode...")
402-
AmfiService(lockdown=lockdown_client).enable_developer_mode()
403-
raise NuggetException("Developer Mode Enabled. Please refresh the device list after reboot and apply again.")
402+
AmfiService(lockdown=lockdown_client).reveal_developer_mode_option_in_ui()
403+
raise NuggetException("You must enable developer mode on your device. You can do it in the Settings app.\n\nClick \"Show Details\" for more information.",
404+
detailed_text="BookRestore tweaks with the AFC method require developer mode to apply.\n\nYou can enable this at the bottom of Settings > Privacy & Security > Developer Mode on your iPhone or iPad.")
404405
if os.name == 'nt':
405406
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
406407
asyncio.run(create_connection_context(files, lockdown_client, current_device_books_uuid_callback, progress_callback, transfer_mode))

0 commit comments

Comments
 (0)