Skip to content

Commit e6925cd

Browse files
committed
Integrate widgets into openhab-ios
So far without cotent. Builds and installs. Dirty overwrite of Current Project Version and Marketing Version - will require rework to synchronise it with app Signed-off-by: Tim Bert <[email protected]>
1 parent 581e7d8 commit e6925cd

File tree

5 files changed

+44
-21
lines changed

5 files changed

+44
-21
lines changed

OpenHABWidget/OpenHABWidget.entitlements

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
<dict>
55
<key>com.apple.security.app-sandbox</key>
66
<true/>
7+
<key>com.apple.security.network.client</key>
8+
<true/>
79
</dict>
810
</plist>

OpenHABWidget/OpenHABWidget.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ struct OpenHABWidget: Widget {
6161
OpenHABWidgetEntryView(entry: entry)
6262
.containerBackground(.fill.tertiary, for: .widget)
6363
}
64+
.supportedFamilies([.systemSmall])
6465
}
6566
}
6667

openHAB.xcodeproj/project.pbxproj

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
DA2E0AA423DC96E9009B0A99 /* EncircledIconWithAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA2E0AA323DC96E9009B0A99 /* EncircledIconWithAction.swift */; };
9292
DA2E0B0E23DCC153009B0A99 /* MapView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA2E0B0D23DCC152009B0A99 /* MapView.swift */; };
9393
DA2E0B1023DCC439009B0A99 /* MapViewRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA2E0B0F23DCC439009B0A99 /* MapViewRow.swift */; };
94+
DA4743C92B07682C00A2BD10 /* Intents.intentdefinition in Resources */ = {isa = PBXBuildFile; fileRef = 935D340A257B7DC00020A404 /* Intents.intentdefinition */; };
9495
DA4D4DB5233F9ACB00B37E37 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = DA4D4DB4233F9ACB00B37E37 /* README.md */; };
9596
DA65871F236F83CE007E2E7F /* UserDefaultsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA65871E236F83CD007E2E7F /* UserDefaultsExtension.swift */; };
9697
DA6587222370C9D8007E2E7F /* PreferencesHostingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA6587212370C9D8007E2E7F /* PreferencesHostingController.swift */; };
@@ -224,24 +225,14 @@
224225
};
225226
4D6470DE2561F935007B03FC /* Embed Foundation Extensions */ = {
226227
isa = PBXCopyFilesBuildPhase;
227-
buildActionMask = 8;
228+
buildActionMask = 12;
228229
dstPath = "";
229230
dstSubfolderSpec = 13;
230231
files = (
231232
DA65AF1E2B064F970060EF7C /* OpenHABWidgetExtension.appex in Embed Foundation Extensions */,
232233
4D6470DA2561F935007B03FC /* openHABIntents.appex in Embed Foundation Extensions */,
233234
);
234235
name = "Embed Foundation Extensions";
235-
runOnlyForDeploymentPostprocessing = 1;
236-
};
237-
93F38C4C23803499001B1451 /* Embed Frameworks */ = {
238-
isa = PBXCopyFilesBuildPhase;
239-
buildActionMask = 2147483647;
240-
dstPath = "";
241-
dstSubfolderSpec = 10;
242-
files = (
243-
);
244-
name = "Embed Frameworks";
245236
runOnlyForDeploymentPostprocessing = 0;
246237
};
247238
93F38C61238034AE001B1451 /* Embed Frameworks */ = {
@@ -1130,7 +1121,6 @@
11301121
DFB2622418830A3600D3244D /* Frameworks */,
11311122
DFB2622518830A3600D3244D /* Resources */,
11321123
1224F7B7228A8AE600750965 /* Embed Watch Content */,
1133-
93F38C4C23803499001B1451 /* Embed Frameworks */,
11341124
4D6470DE2561F935007B03FC /* Embed Foundation Extensions */,
11351125
93F8063627AE76AF0035A6B0 /* Crashlytics Run Script */,
11361126
);
@@ -1300,6 +1290,7 @@
13001290
isa = PBXResourcesBuildPhase;
13011291
buildActionMask = 2147483647;
13021292
files = (
1293+
DA4743C92B07682C00A2BD10 /* Intents.intentdefinition in Resources */,
13031294
DA65AF192B064F970060EF7C /* Assets.xcassets in Resources */,
13041295
);
13051296
runOnlyForDeploymentPostprocessing = 0;
@@ -1963,7 +1954,7 @@
19631954
CODE_SIGN_IDENTITY = "Apple Development";
19641955
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
19651956
CODE_SIGN_STYLE = Automatic;
1966-
CURRENT_PROJECT_VERSION = "";
1957+
CURRENT_PROJECT_VERSION = 1580410538;
19671958
DEBUG_INFORMATION_FORMAT = dwarf;
19681959
DEVELOPMENT_TEAM = PBAPXHRAM9;
19691960
ENABLE_HARDENED_RUNTIME = YES;
@@ -1989,7 +1980,7 @@
19891980
);
19901981
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
19911982
MACOSX_DEPLOYMENT_TARGET = 14.0;
1992-
MARKETING_VERSION = 1.0;
1983+
MARKETING_VERSION = 2.4.60;
19931984
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
19941985
MTL_FAST_MATH = YES;
19951986
PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openhab.OpenHABWidget;
@@ -2020,7 +2011,7 @@
20202011
CODE_SIGN_ENTITLEMENTS = OpenHABWidget/OpenHABWidget.entitlements;
20212012
CODE_SIGN_IDENTITY = "Apple Development";
20222013
CODE_SIGN_STYLE = Automatic;
2023-
CURRENT_PROJECT_VERSION = "";
2014+
CURRENT_PROJECT_VERSION = 1580410538;
20242015
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
20252016
DEVELOPMENT_TEAM = PBAPXHRAM9;
20262017
ENABLE_HARDENED_RUNTIME = YES;
@@ -2045,7 +2036,7 @@
20452036
);
20462037
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
20472038
MACOSX_DEPLOYMENT_TARGET = 14.0;
2048-
MARKETING_VERSION = 1.0;
2039+
MARKETING_VERSION = 2.4.60;
20492040
MTL_ENABLE_DEBUG_INFO = NO;
20502041
MTL_FAST_MATH = YES;
20512042
PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openhab.OpenHABWidget;
@@ -2094,6 +2085,7 @@
20942085
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
20952086
COPY_PHASE_STRIP = NO;
20962087
DEVELOPMENT_TEAM = PBAPXHRAM9;
2088+
ENABLE_PREVIEWS = YES;
20972089
ENABLE_STRICT_OBJC_MSGSEND = YES;
20982090
ENABLE_TESTABILITY = YES;
20992091
ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -2157,6 +2149,7 @@
21572149
COPY_PHASE_STRIP = NO;
21582150
DEVELOPMENT_TEAM = PBAPXHRAM9;
21592151
ENABLE_NS_ASSERTIONS = NO;
2152+
ENABLE_PREVIEWS = YES;
21602153
ENABLE_STRICT_OBJC_MSGSEND = YES;
21612154
ENABLE_USER_SCRIPT_SANDBOXING = NO;
21622155
EXCLUDED_ARCHS = i386;

openHAB/Resources/Base.lproj/Intents.intentdefinition

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<key>INIntentDefinitionNamespace</key>
1010
<string>aK4nIm</string>
1111
<key>INIntentDefinitionSystemVersion</key>
12-
<string>21C52</string>
12+
<string>22G313</string>
1313
<key>INIntentDefinitionToolsBuildVersion</key>
14-
<string>13C100</string>
14+
<string>15A507</string>
1515
<key>INIntentDefinitionToolsVersion</key>
16-
<string>13.2.1</string>
16+
<string>15.0.1</string>
1717
<key>INIntents</key>
1818
<array>
1919
<dict>
@@ -27,7 +27,7 @@
2727
<string>Retrieve the current state of an item</string>
2828
<key>INIntentDescriptionID</key>
2929
<string>GD4RTw</string>
30-
<key>INIntentIneligibleForSuggestions</key>
30+
<key>INIntentEligibleForWidgets</key>
3131
<true/>
3232
<key>INIntentKeyParameter</key>
3333
<string>item</string>
@@ -49,6 +49,22 @@
4949
</dict>
5050
<key>INIntentName</key>
5151
<string>GetItemState</string>
52+
<key>INIntentParameterCombinations</key>
53+
<dict>
54+
<key>item</key>
55+
<dict>
56+
<key>INIntentParameterCombinationIsLinked</key>
57+
<true/>
58+
<key>INIntentParameterCombinationIsPrimary</key>
59+
<true/>
60+
<key>INIntentParameterCombinationSupportsBackgroundExecution</key>
61+
<true/>
62+
<key>INIntentParameterCombinationTitle</key>
63+
<string>Get ${item} State</string>
64+
<key>INIntentParameterCombinationTitleID</key>
65+
<string>joyqa0</string>
66+
</dict>
67+
</dict>
5268
<key>INIntentParameters</key>
5369
<array>
5470
<dict>
@@ -175,6 +191,8 @@
175191
<string>Set the state of a switch on or off</string>
176192
<key>INIntentDescriptionID</key>
177193
<string>oOjAU0</string>
194+
<key>INIntentEligibleForWidgets</key>
195+
<true/>
178196
<key>INIntentKeyParameter</key>
179197
<string>item</string>
180198
<key>INIntentLastParameterTag</key>
@@ -389,6 +407,8 @@
389407
<string>Set the integer value of a dimmer or roller shutter</string>
390408
<key>INIntentDescriptionID</key>
391409
<string>pg4Bec</string>
410+
<key>INIntentEligibleForWidgets</key>
411+
<true/>
392412
<key>INIntentKeyParameter</key>
393413
<string>item</string>
394414
<key>INIntentLastParameterTag</key>
@@ -605,6 +625,8 @@
605625
<string>Set the decimal value of a number control item</string>
606626
<key>INIntentDescriptionID</key>
607627
<string>pptfkD</string>
628+
<key>INIntentEligibleForWidgets</key>
629+
<true/>
608630
<key>INIntentKeyParameter</key>
609631
<string>item</string>
610632
<key>INIntentLastParameterTag</key>
@@ -813,6 +835,8 @@
813835
<string>Set the string of a string control item</string>
814836
<key>INIntentDescriptionID</key>
815837
<string>5B4e9l</string>
838+
<key>INIntentEligibleForWidgets</key>
839+
<true/>
816840
<key>INIntentKeyParameter</key>
817841
<string>item</string>
818842
<key>INIntentLastParameterTag</key>
@@ -1027,6 +1051,8 @@
10271051
<string>Set the color of a color control item</string>
10281052
<key>INIntentDescriptionID</key>
10291053
<string>DxO2wk</string>
1054+
<key>INIntentEligibleForWidgets</key>
1055+
<true/>
10301056
<key>INIntentKeyParameter</key>
10311057
<string>item</string>
10321058
<key>INIntentLastParameterTag</key>
@@ -1243,6 +1269,8 @@
12431269
<string>Set the state of a contact open or closed</string>
12441270
<key>INIntentDescriptionID</key>
12451271
<string>eFb7vM</string>
1272+
<key>INIntentEligibleForWidgets</key>
1273+
<true/>
12461274
<key>INIntentKeyParameter</key>
12471275
<string>item</string>
12481276
<key>INIntentLastParameterTag</key>

openHABIntents/IntentHandler.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// SPDX-License-Identifier: EPL-2.0
1111

1212
import Intents
13-
import OpenHABCore
1413

1514
class IntentHandler: INExtension {
1615
override func handler(for intent: INIntent) -> Any {

0 commit comments

Comments
 (0)