Hyperlinks with ios recipe on kivy-ios - ios

I'm trying to make a hyperlink that launches safari when clicked. I gather that this involves using iOS's native API, however I noticed in the kivy-ios package, there's a recipe called "ios" that seems to have this function built in.
I've not been able to google this successfully, maybe because searches for "kivy ios package" bring up the kivy-ios package which isn't what I'm looking for.
How can I use this and is there any documentation?

The source of the ios module is in the recipes/ios/src folder. It doesn't contain much so you can probably get what you need by just reading it.
You probably want the open_url function, which I think you can import as from ios.ios import open_url.

Related

React Native newbie. Using XCode for the native iOS part in /iOS. What do I use for javascript in root folder? What's a best-practice workflow?

Confused as any newbie would be!
I am a React Native newbie. Following a tutorial I created a project. I can use XCode to open the native iOS project in /iOS. What do I use for the javascript files in the root folder? Should I use a second editor for js - i.e. one of the standard js editors (Atom, vi etc). What is the best-practice workflow? Or can I accomplish everything with one editor. Advice, recommendations would be most appreciated.
CLARIFICATIOINS:
To clarify my question, take the following sample project:
I want to write a react native app which opens to a table view i.e. list screen with multiple items in a list screen. When you pick one item in the list the app navigates to a details screen. Suppose the list screen is React Native and the details screen is Native iOS. I can code up the list screen using VSCode in React Native js. And then I can code the native details screen in XCode. So for the native part I can open XCode and create a fresh project. What kind of project should this be? Should it be an IOS App or am IOS framework/library? Perhaps a main app as the AppDelegate and a test harness, and a framework/library for the one View Controller screen I will need to import into my React Native project? And then how do I run this to test and debug it out end to end in the simulator? I can possibly correct and live reload the React native portion, but suppose I want to update the iOS portion, what step do I need to go back to? etc.
It's not very common to do your coding work directly inside XCode. XCode is more of a place to organize your project/environment/builds/signing etc...
Instead you should be writing all of your code inside the editor of your choice. The standard workflow would be:
Create project on command line
Use your editor of choice for coding. I use VSCode.
in your editor, open your project folder that you just created
use XCode for running the ios emulator and super specific iOS tasks
All Android specific work can easily be done in VSCode (you don't ever actually need to use Android Studio)

How to include libsignal-protocol-c in my Swift iOS app?

I would like to write something like import SignalProtocol at the top of one of my Swift files and then be able to call the C functions from libsignal-protocol-c.
libsignal-protocol-c's README says: "When integrating into actual applications, you should not need anything beyond CMake. Alternatively, you may integrate the code using a build system of your choice."
I think I'd like to use the Swift Package Manager to integrate libsignal-protocol-c into my Swift iOS app. Is there a way to automatically generate a manifest file, ie, Package.swift, and a module map, ie, a module.modulemap file, from libsignal-protocol-c's CMake files? Or if I need to create these files manually, what should they include? Otherwise, how would I do this with CMake?
How to import and use libsignal-protocol-c in an existing .xcodeProj? is a similar question but for Objective-C projects.
I'm not sure its an answer but I'm going to start using https://github.com/christophhagen/LibSignalProtocolSwift. Seems like a good start.

Creating an iOS library or framework using libgdx (roboVM)

Is it possible to create an iOS library or framework using libgdx (RoboVM) that can be imported into Xcode?
Background:
One of my colleagues has created a 3D visualisation app as a libgdx project for android and windows desktop. It can be compiled to run on iOS using RoboVM. However, I would like to wrap extra native user interface elements around it using Xcode. I know its possible to build the user interface programmatically via RoboVM but I would be keen to investigate if its possible to bring the existing work into Xcode. I don't need to edit the 3D visualisation component but add extra GUI elements around the 3D Vis window. I thought compiling the libgdx (RoboVM) code to a framework or library might be a solution that could be imported?!
Yes you can do it.
All you need to create a method, say initRoboVM(), This will be called by your code when you want to initialize libgdx. You'll need to pass the app path in, which you can hardcode when you're testing.
initRoboVM() will need some modifications, namely it should not call your Java app's main method, well, at least, that's what well behaving libraries should not do IMO. It should also not call rvmShutdown.
You can get further information from here
Thanks :)
I asked the RoboVM team directly. Their answer: It's not a native function, but it certainly can be done.
The complete message...
Hi,
Sorry for the late reply. This use case is not something we're going
to do now. It is possible though if you're prepared to do some
patching of RoboVM. Search the RoboVM Google Group and you should find
others who have managed to get this working.
We get this request every know and then so we will add support for
this eventually.
Regards, Niklas

adding a library for iOS app

I am building an iOS app that requires the use of the glm library(link to site). I don't necessarily want to place the entire library in the app folder every time I want to use it. Is it possible to
A) point xcode to the library folder so it knows where to find the headers
or
B) place the library in the standard iOS library folder.
Im sure this is something developers must do all the time, but Ive been unable to find a simple solution on the web.

Can PhoneGap be used in apps built with theos?

I want to use PhoneGap to make a Cydia app, however the iOS instructions on their website only show how to use it with Xcode.
I don't have a Mac, but I'd like to be able to make my app for Cydia, with theos. Is this possible with PhoneGap, or is it only usable with Xcode?
I've never done this, but YES it should be entirely possible. The Xcode instructions set it up for you to have a specific template with all of the phonegap files already in the proper locations. So it's easy to get going. But it doesn't do anything else that is particularly special. Theoretically you could simply setup all of the files in a theos project.
To do this you will need to 'reconstruct' exactly what goes into a phonegap template. I have no experience with theos, but a rough idea of what you will need to be able to do includes the following:
Import PhoneGap.framework
Reconstruct AppDelegate code
Import Supporting Files (PhoneGap.plist)
Additionally you will need to configure the folder structure with the www folder (that the webview loads from) including the index.html file and the phonegap-1.0.0.js file.
So yes, it should be possible. Let me know if you are successful. Good luck!

Resources