From cef1770d2f2f166be08957d43f2ddec23ce483de Mon Sep 17 00:00:00 2001 From: James Magahern Date: Mon, 27 Jul 2026 19:38:00 -0700 Subject: [PATCH] Read archived binary plist with plutil --- fastlane/Fastfile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c8ec043..cb2e20e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,3 +1,18 @@ +require "open3" + +def read_plist_value(path, key) + value, _error, status = Open3.capture3( + "/usr/bin/plutil", + "-extract", + key, + "raw", + path + ) + UI.user_error!("Unable to read #{key} from the archived app") unless status.success? + + value.strip +end + default_platform(:ios) platform :ios do @@ -44,10 +59,10 @@ platform :ios do "XION.app", "Info.plist" ) - archived_access_token = get_info_plist_value( - path: archived_plist, - key: "HomeAssistantAccessToken" - ).to_s + archived_access_token = read_plist_value( + archived_plist, + "HomeAssistantAccessToken" + ) unless archived_access_token == home_assistant_access_token UI.user_error!("The archived app does not contain the configured Home Assistant access token") end