swift

POST NSData to a Server

POST NSData to a Server Question: I am trying to POST the iPhone depth data to a Macbook using wifi (at-least 30 fps). I extracted depth CVPixelBuffer from ARSession followed by creating an NSMutableData. My question is that how I can POST this message (NSMutableData) to a server? In the meantime, how can I GET …

Total answers: 1

Sending big amount of bytes from Swift to Python with types and @_cdecl

Sending big amount of bytes from Swift to Python with types and @_cdecl Question: I have two simple functions, one pass to another array of UInts. When I pass small array of 20 UInts function works, but when I pass 21576 Uints function returns small amount of bites, why is it happened? I checked UnsafeMutablePointer<UInt8> …

Total answers: 2

Calling a python Command-line tool with arguments, with PythonKit using Swift

Calling a python Command-line tool with arguments, with PythonKit using Swift Question: I have been experimenting a bit with PythonKit and have some simple examples working. However I would now like to call a python script that takes some command line arguments and I can’t seem to get it working – it mostly just crashes. …

Total answers: 1

How to use python to run IOS Simulator

How to use python to run IOS Simulator Question: Is it possible to create a python script that I can use, to run the iOS simulator? For example, I would use the python script to run the iOS simulator, run a specific app on the simulator, and go through the app and take screenshots. Is …

Total answers: 2

SwiftUI – packing with Python and a module library

SwiftUI – packing with Python and a module library Question: My goal: Import via PythonKit Python 3.9.1 in my Swift Project, where I can use it to package it with the needed module "openpyxl" (for filling an excel sheet with values). Here are the imports at the beginning of the specific python file: # some …

Total answers: 1

Swift socket.io compatible version with server python-socketio

Swift socket.io compatible version with server python-socketio Question: I’ve searched couple of days for it but found nothing to fix this issue. My client is an iOS device running socket.io v15.2.0 (Oct 17, 2019). I’ve followed this post (Implement a WebSocket Using Flask and Socket-IO(Python)) That post described how to connect to the python socket …

Total answers: 2

Call Python code from an existing project written in Swift

Call Python code from an existing project written in Swift Question: I need a way to call Python code from Swift on an Apple platform. A library would be ideal. I’ve done a considerable amount of Google searching, and the closest material I found is for Objective-C. Asked By: Shaun || Source Answers: If anyone …

Total answers: 4

swift if or/and statement like python

swift if or/and statement like python Question: Is there a way to to do and/or in an if statement in swift. eg/ if a > 0 and i == j or f < 3: //do something can we do that in swift? Thanks in advance Asked By: Tomblasta || Source Answers: Yes. if (a > …

Total answers: 2