From e564ca0c1b86560749b86374ea3c81050503e71d Mon Sep 17 00:00:00 2001 From: Sergey Minakov Date: Mon, 22 Jun 2020 16:24:16 +0300 Subject: [PATCH] Export: Fix iOS enabling push notifications capability --- misc/dist/ios_xcode/godot_ios/godot_ios.entitlements | 3 +-- platform/iphone/export/export.cpp | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/dist/ios_xcode/godot_ios/godot_ios.entitlements b/misc/dist/ios_xcode/godot_ios/godot_ios.entitlements index 903def2af53..c9b58a85cf9 100644 --- a/misc/dist/ios_xcode/godot_ios/godot_ios.entitlements +++ b/misc/dist/ios_xcode/godot_ios/godot_ios.entitlements @@ -2,7 +2,6 @@ - aps-environment - development +$entitlements_push_notifications diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 3e04279a599..e1ea19f136a 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -343,6 +343,9 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref &p_ } else if (lines[i].find("$push_notifications") != -1) { bool is_on = p_preset->get("capabilities/push_notifications"); strnew += lines[i].replace("$push_notifications", is_on ? "1" : "0") + "\n"; + } else if (lines[i].find("$entitlements_push_notifications") != -1) { + bool is_on = p_preset->get("capabilities/push_notifications"); + strnew += lines[i].replace("$entitlements_push_notifications", is_on ? "aps-environmentdevelopment" : "") + "\n"; } else if (lines[i].find("$required_device_capabilities") != -1) { String capabilities; @@ -932,6 +935,7 @@ Error EditorExportPlatformIOS::export_project(const Ref &p_p files_to_parse.insert("godot_ios/dummy.cpp"); files_to_parse.insert("godot_ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata"); files_to_parse.insert("godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme"); + files_to_parse.insert("godot_ios/godot_ios.entitlements"); IOSConfigData config_data = { pkg_name,