Skip to content

Commit b81b93d

Browse files
committed
Add WPAppBrand
1 parent 849b99d commit b81b93d

File tree

11 files changed

+49
-30
lines changed

11 files changed

+49
-30
lines changed

Modules/Sources/BuildSettingsKit/BuildSettings+Live.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import Foundation
44
struct BuildSettingsLiveContainer: BuildSettingsContainer {
55
static let shared = BuildSettingsLiveContainer()
66

7-
// TODO: (kean) add actual value
87
var brand: AppBrand {
9-
.jetpack
8+
AppBrand(rawValue: infoPlistValue(forKey: "WPAppBrand"))!
109
}
1110

1211
var appGroupName: String {

WordPress/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>wordpress</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>

WordPress/Jetpack/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>jetpack</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>

WordPress/JetpackDraftActionExtension/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>jetpack</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>

WordPress/JetpackIntents/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>jetpack</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>

WordPress/JetpackNotificationServiceExtension/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>jetpack</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>

WordPress/JetpackShareExtension/Info.plist

+15-13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>jetpack</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>
@@ -42,34 +44,34 @@
4244
(SUBQUERY(
4345
$extensionItem.attachments,
4446
$attachment,
45-
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
46-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.png"
47-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg"
48-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg-2000"
49-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.tiff"
50-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.compuserve.gif"
51-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.bmp"
47+
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.image&quot;
48+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.png&quot;
49+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.jpeg&quot;
50+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.jpeg-2000&quot;
51+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.tiff&quot;
52+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;com.compuserve.gif&quot;
53+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;com.microsoft.bmp&quot;
5254
).@count &gt;= 1
5355
OR
5456
SUBQUERY(
5557
$extensionItem.attachments,
5658
$attachment,
57-
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text"
58-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text"
59+
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.plain-text&quot;
60+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.text&quot;
5961
).@count == 1
6062
OR
6163
SUBQUERY(
6264
$extensionItem.attachments,
6365
$attachment,
64-
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
65-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url"
66+
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.url&quot;
67+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.file-url&quot;
6668
).@count == 1)
6769
AND
6870
SUBQUERY(
6971
$extensionItem.attachments,
7072
$attachment,
71-
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.find-login-action"
72-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.save-login-action"
73+
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;org.appextension.find-login-action&quot;
74+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;org.appextension.save-login-action&quot;
7375
).@count == 0
7476
).@count &gt;= 1
7577
</string>

WordPress/JetpackStatsWidgets/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>jetpack</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>

WordPress/WordPressDraftActionExtension/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>wordpress</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>

WordPress/WordPressNotificationServiceExtension/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>wordpress</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>

WordPress/WordPressShareExtension/Info.plist

+17-15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>WPAppBrand</key>
6+
<string>wordpress</string>
57
<key>WPAppGroupName</key>
68
<string>${WP_APP_GROUP_NAME}</string>
79
<key>WPAppKeychainAccessGroup</key>
@@ -35,43 +37,43 @@
3537
<key>NSExtensionAttributes</key>
3638
<dict>
3739
<key>NSExtensionActivationRule</key>
38-
<string>
40+
<string>
3941
SUBQUERY(
4042
extensionItems,
4143
$extensionItem,
4244
(SUBQUERY(
4345
$extensionItem.attachments,
4446
$attachment,
45-
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
46-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.png"
47-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg"
48-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg-2000"
49-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.tiff"
50-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.compuserve.gif"
51-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.bmp"
47+
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.image&quot;
48+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.png&quot;
49+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.jpeg&quot;
50+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.jpeg-2000&quot;
51+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.tiff&quot;
52+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;com.compuserve.gif&quot;
53+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;com.microsoft.bmp&quot;
5254
).@count &gt;= 1
5355
OR
5456
SUBQUERY(
5557
$extensionItem.attachments,
5658
$attachment,
57-
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text"
58-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text"
59+
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.plain-text&quot;
60+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.text&quot;
5961
).@count == 1
6062
OR
6163
SUBQUERY(
6264
$extensionItem.attachments,
6365
$attachment,
64-
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
65-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url"
66+
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.url&quot;
67+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.file-url&quot;
6668
).@count == 1)
6769
AND
6870
SUBQUERY(
6971
$extensionItem.attachments,
7072
$attachment,
71-
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.find-login-action"
72-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.appextension.save-login-action"
73+
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;org.appextension.find-login-action&quot;
74+
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;org.appextension.save-login-action&quot;
7375
).@count == 0
74-
).@count >= 1
76+
).@count &gt;= 1
7577
</string>
7678
<key>NSExtensionJavaScriptPreprocessingFile</key>
7779
<string>WordPressShare</string>

0 commit comments

Comments
 (0)