You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 4, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,38 @@ WeLoop.invoke()
73
73
74
74
```
75
75
76
+
### Delegate methods
77
+
78
+
You can set up a delegate to listen for some events returned by the SDK with the following method: `WeLoop.set(delegate: self)`
79
+
80
+
You can then implement the following optional delegate methods:
81
+
82
+
````swift
83
+
extensionAppDelegate: WeLoopDelegate {
84
+
85
+
funcinitializationSuccessful() {
86
+
// From this point forward, we can safely invoke the Widget manually
87
+
}
88
+
89
+
funcinitializationFailed(witherror: Error) {
90
+
// Initialization Failed (no network for example). Based on the error you'll have to retry the initialization later.
91
+
print(error)
92
+
}
93
+
94
+
funcfailedToLaunch(witherror: Error) {
95
+
// The widget could not be launched. Most likely is that the initialization process failed, or the user is missing in autoAuthentication
96
+
print(error)
97
+
}
98
+
99
+
funcnotificationCountUpdated(newCount: Int) {
100
+
// Set the new count on your custom view
101
+
print(newCount)
102
+
}
103
+
}
104
+
````
105
+
106
+
107
+
76
108
### Updating your plist
77
109
78
110
Since WeLoop offers the possibility to upload photos from the user photo gallery and from the camera, you will have to add the following entries to your plist, if they are not already present:
0 commit comments