This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"aps": { | |
"alert": { | |
"body": "Stock Anduct rised above 3.00" | |
}, | |
"badge": "1", | |
"sound": "Default", | |
"category": "STOCK_PRICE_CATEGORY" | |
}, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NotificationController.m | |
// StockWatch Extension | |
// | |
#import <UserNotifications/UserNotifications.h> | |
#import "NotificationController.h" | |
@interface NotificationController () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NotificationController.h | |
// StockWatch Extension | |
// | |
#import <WatchKit/WatchKit.h> | |
#import <Foundation/Foundation.h> | |
@interface NotificationController : WKUserNotificationInterfaceController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// InterfaceController.m | |
// StockWatch Extension | |
// | |
#import "InterfaceController.h" | |
#import "Constants.h" | |
@interface InterfaceController () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// InterfaceController.h | |
// StockWatch Extension | |
// | |
#import <WatchKit/WatchKit.h> | |
#import <Foundation/Foundation.h> | |
#import <Lightstreamer_watchOS_Client/Lightstreamer_watchOS_Client.h> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script gets executed from Xcode to fixup the embedded frameworks and | |
# bundle the necessary architectures. | |
# Original source: | |
# https://github.com/jitsi/jitsi-meet/commits/master/ios/scripts/fixup-frameworks.sh | |
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Notification that a certain user is trying to access a certain device | |
public void notifyMpnDeviceAccess(String user, String sessionID, MpnDeviceInfo device) | |
throws CreditsException, NotificationException; | |
// Notification that a certain user is trying to activate an MPN subscription | |
public void notifyMpnSubscriptionActivation(String user, String sessionID, TableInfo table, MpnSubscriptionInfo mpnSubscription) | |
throws CreditsException, NotificationException; | |
// Notification that a certain user is trying to change the token of a certain device | |
public void notifyMpnDeviceTokenChange(String user, String sessionID, MpnDeviceInfo device, String newDeviceToken) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Deactivate single subscription | |
client.unsubscribe(mpnSubscription); | |
// Deactivate all subscriptions in "TRIGGERED" state | |
client.unsubscribeMpnSubscriptions("TRIGGERED"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Deactivate single subscription | |
[_client unsubscribeMPN:mpnSubscription]; | |
// Deactivate all subscriptions in "TRIGGERED" state | |
[_client unsubscribeMultipleMPN:@"TRIGGERED"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<MpnSubscription> subs = client.getMpnSubscriptions(); | |
for (MpnSubscription sub : subs) { | |
if (sub.getItemGroup().equals(thisGroup)) { | |
// Subscription found, copy it and add a trigger | |
MpnSubscription copy= new MpnSubscription(sub); | |
copy.setTriggerExpression("Double.parseDouble(${last_price}) > 100.0"); | |
// Modify the subscription on the Server | |
client.subscribe(copy, false); // When modifying the coalescing flag is ignored |
NewerOlder