diff --git a/ios/app/app.xcodeproj/project.pbxproj b/ios/app/app.xcodeproj/project.pbxproj index e742a1362..27f0d9318 100644 --- a/ios/app/app.xcodeproj/project.pbxproj +++ b/ios/app/app.xcodeproj/project.pbxproj @@ -11,6 +11,8 @@ 0B26BE6F1EC5BC3C00EEFB41 /* JitsiMeet.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0B26BE6D1EC5BC3C00EEFB41 /* JitsiMeet.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 0B412F1F1EDEE6E800B1A0A6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B412F1E1EDEE6E800B1A0A6 /* ViewController.m */; }; 0B412F211EDEE95300B1A0A6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0B412F201EDEE95300B1A0A6 /* Main.storyboard */; }; + 0B5418471F7C5D8C00A2DD86 /* MeetingRowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B5418461F7C5D8C00A2DD86 /* MeetingRowController.swift */; }; + 0B7001701F7C51CC005944F4 /* InCallController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B70016F1F7C51CC005944F4 /* InCallController.swift */; }; 0BD6B4371EF82A6B00D1F4CD /* WebRTC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BD6B4361EF82A6B00D1F4CD /* WebRTC.framework */; }; 0BD6B4381EF82A6B00D1F4CD /* WebRTC.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0BD6B4361EF82A6B00D1F4CD /* WebRTC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 0BEA5C291F7B8F73000D0AB4 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0BEA5C271F7B8F73000D0AB4 /* Interface.storyboard */; }; @@ -86,6 +88,8 @@ 0B412F1D1EDEE6E800B1A0A6 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 0B412F1E1EDEE6E800B1A0A6 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 0B412F201EDEE95300B1A0A6 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 0B5418461F7C5D8C00A2DD86 /* MeetingRowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingRowController.swift; sourceTree = ""; }; + 0B70016F1F7C51CC005944F4 /* InCallController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InCallController.swift; sourceTree = ""; }; 0BD6B4361EF82A6B00D1F4CD /* WebRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebRTC.framework; path = "../../node_modules/react-native-webrtc/ios/WebRTC.framework"; sourceTree = ""; }; 0BEA5C251F7B8F73000D0AB4 /* JitsiMeetCompanion.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JitsiMeetCompanion.app; sourceTree = BUILT_PRODUCTS_DIR; }; 0BEA5C281F7B8F73000D0AB4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; @@ -155,6 +159,8 @@ 0BEA5C3A1F7B8F73000D0AB4 /* ComplicationController.swift */, 0BEA5C3C1F7B8F73000D0AB4 /* Assets.xcassets */, 0BEA5C3E1F7B8F73000D0AB4 /* Info.plist */, + 0B70016F1F7C51CC005944F4 /* InCallController.swift */, + 0B5418461F7C5D8C00A2DD86 /* MeetingRowController.swift */, ); name = "WatchKit extension"; path = watchos/extension; @@ -390,6 +396,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 0B7001701F7C51CC005944F4 /* InCallController.swift in Sources */, + 0B5418471F7C5D8C00A2DD86 /* MeetingRowController.swift in Sources */, 0BEA5C391F7B8F73000D0AB4 /* ExtensionDelegate.swift in Sources */, 0BEA5C371F7B8F73000D0AB4 /* InterfaceController.swift in Sources */, 0BEA5C3B1F7B8F73000D0AB4 /* ComplicationController.swift in Sources */, diff --git a/ios/app/watchos/app/Base.lproj/Interface.storyboard b/ios/app/watchos/app/Base.lproj/Interface.storyboard index cda5e041e..19cd8eb80 100644 --- a/ios/app/watchos/app/Base.lproj/Interface.storyboard +++ b/ios/app/watchos/app/Base.lproj/Interface.storyboard @@ -9,33 +9,62 @@ - + - + - - + + + + + + + + + + + + diff --git a/ios/app/watchos/extension/ComplicationController.swift b/ios/app/watchos/extension/ComplicationController.swift index 3ac728bd9..30d70f0fb 100644 --- a/ios/app/watchos/extension/ComplicationController.swift +++ b/ios/app/watchos/extension/ComplicationController.swift @@ -1,10 +1,18 @@ -// -// ComplicationController.swift -// JitsiMeetCompanion Extension -// -// Created by Saul Corretge on 9/27/17. -// Copyright © 2017 Facebook. All rights reserved. -// +/* + * Copyright @ 2017-present Atlassian Pty Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import ClockKit diff --git a/ios/app/watchos/extension/InCallController.swift b/ios/app/watchos/extension/InCallController.swift new file mode 100644 index 000000000..5c330718d --- /dev/null +++ b/ios/app/watchos/extension/InCallController.swift @@ -0,0 +1,56 @@ +/* + * Copyright @ 2017-present Atlassian Pty Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import WatchConnectivity +import WatchKit +import Foundation + + +class InCallController: WKInterfaceController { + + @IBAction func hangupClicked() { + sendMessage(["command": "hangup"]) + dismiss() + } + + @IBAction func muteClicked() { + sendMessage(["command": "toggleMute"]) + } + + func sendMessage(_ message: [String : Any]) { + if WCSession.isSupported() { + let session = WCSession.default + session.sendMessage(message, replyHandler: nil, errorHandler: nil) + } + } + + override func awake(withContext context: Any?) { + super.awake(withContext: context) + + // Configure interface objects here. + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + } + + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + } + +} diff --git a/ios/app/watchos/extension/InterfaceController.swift b/ios/app/watchos/extension/InterfaceController.swift index 97a079262..95087086a 100644 --- a/ios/app/watchos/extension/InterfaceController.swift +++ b/ios/app/watchos/extension/InterfaceController.swift @@ -1,42 +1,39 @@ -// -// InterfaceController.swift -// JitsiMeetCompanion Extension -// -// Created by Saul Corretge on 9/27/17. -// Copyright © 2017 Facebook. All rights reserved. -// +/* + * Copyright @ 2017-present Atlassian Pty Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ -import WatchConnectivity import WatchKit import Foundation class InterfaceController: WKInterfaceController { - @IBOutlet var muteButton: WKInterfaceButton! - - @IBAction func muteClicked() { - sendMessage(["command": "toggleMute"]) - } - - @IBAction func hangupClicked() { - sendMessage(["command": "hangup"]) - } - - @IBAction func testClicked() { - sendMessage(["command" : "joinConference", "data" : "https://meet.jit.si/notrolex"]) - } - - func sendMessage(_ message: [String : Any]) { - if WCSession.isSupported() { - let session = WCSession.default - session.sendMessage(message, replyHandler: nil, errorHandler: nil) - } - } + + @IBOutlet var table: WKInterfaceTable! override func awake(withContext context: Any?) { super.awake(withContext: context) - - // Configure interface objects here. + + // Some fake data for the table + table.setNumberOfRows(2, withRowType: "MeetingRowType") + var controller = table.rowController(at: 0) as! MeetingRowController + controller.roomLabel.setText("HCVideoStandup") + controller.timeLabel.setText("17:45") + + controller = table.rowController(at: 1) as! MeetingRowController + controller.roomLabel.setText("DoYouEvenWatch") + controller.timeLabel.setText("23:59") } override func willActivate() { diff --git a/ios/app/watchos/extension/MeetingRowController.swift b/ios/app/watchos/extension/MeetingRowController.swift new file mode 100644 index 000000000..d383b2b6c --- /dev/null +++ b/ios/app/watchos/extension/MeetingRowController.swift @@ -0,0 +1,24 @@ +/* + * Copyright @ 2017-present Atlassian Pty Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import WatchKit + +class MeetingRowController: NSObject { + + @IBOutlet var roomLabel: WKInterfaceLabel! + @IBOutlet var timeLabel: WKInterfaceLabel! + +}