Skip to content
This repository was archived by the owner on Jul 8, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UPchieve iOS client

Mobile tutoring app, native iOS version written in Swift

Changes supposed to be made to server

Since the iOS version of Socket.IO cannot emit JavaScript objects directly, changes are supposed to be made to router/api/sockets.js file in server to handle JSON data emitted by iOS client.

The following functions are supposed be modified:

socket.on('join', function(data)
socket.on('message', function(data)
socket.on('drawClick', function(data)
socket.on('saveImage', function(data)
socket.on('undoClick', function(data)
socket.on('clearClick', function(data)
socket.on('drawing', function(data)
socket.on('end', function(data)
socket.on('changeColor', function(data)
socket.on('changeWidth', function(data)
socket.on('dragStart', function(data)
socket.on('dragAction', function(data)
socket.on('dragEnd', function(data)
socket.on('insertText', function(data)
socket.on('resetScreen', function(data)

An example of possible way of changing (Take drawing for example):

Before changing:

socket.on('drawing', function(data) {
  if (!data || !data.sessionId) return;
  socket.broadcast.to(data.sessionId).emit('draw');
});

After changing:

socket.on('drawing', function(data) {

  # new code at the beginning
  if (!data.sessionId) {
    data = JSON.parse(data)
  }

  # everything remains the same
  if (!data || !data.sessionId) return;
  socket.broadcast.to(data.sessionId).emit('draw');
});

The changes made in the example above will make the server work for both the web client and the iOS client.

Server Configurations

All the server configurations, including the address of the server, are stored in UPchieve/UPchieve/ServerAccess/ServerConfiguration.swift

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

About

iOS application (no longer active)

Resources

Stars

0 stars

Watchers

13 watching

Forks

Releases

Packages

Contributors

Languages