Integrate Flic bluetooth button on a LC standalone

Are you developing tools to extend the LiveCode environment? This is the place to talk about the nuts and bolts of extending our nuts and bolts. If you want to use a LiveCode or third party Environment extension, visit the Using Evironment Extensions forum.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
trevix
Posts: 427
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Integrate Flic bluetooth button on a LC standalone

Post by trevix » Wed Feb 27, 2019 5:57 pm

Hi all.
I found this cleaver bluetooth button, albeit a little expensive:

https://flic.io/?gclid=EAIaIQobChMI-OOn ... gJyd_D_BwE

Apparently it should be possible to integrate its actions with iOS application (see this tutorial):
https://partners.flic.io/partners/devel ... s-tutorial
All of this unfortunately is out of my reach. I don't understand half of it.

My question is: would you think, given the above, possible to develop a LC standalone (a simple graphic counter) that works with this hardware ? What would be the main points of such development?
Thanks
Trevix

trevix
Posts: 427
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Integrate Flic bluetooth button on a LC standalone

Post by trevix » Sat Mar 09, 2019 7:15 pm

Let's put it in this way.
Is there some way to do interaction between LC development and xCode development?
Trevix

bogs
Posts: 3354
Joined: Sat Feb 25, 2017 10:45 pm

Re: Integrate Flic bluetooth button on a LC standalone

Post by bogs » Sat Mar 09, 2019 9:29 pm

I assume there must be, after all, you need xCode to create an iOs standalone. The how of it escapes me though.
Image

trevix
Posts: 427
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Integrate Flic bluetooth button on a LC standalone

Post by trevix » Sat Mar 23, 2019 7:35 pm

Before I start a LOOONG learning process, I would like to hear some confirmation from the livecoders savvy about what I found:

I got a working example that, in xCode using Swift, connects and reacts to the Flic bluetooth button:
https://github.com/50ButtonsEach/fliclib-ios

I also found that, apparently, you can use xCode to build LC externals:
https://livecode.com/resources/guides/externals/
https://www.youtube.com/watch?v=lqduyQkhigg

WHAT I DON'T UNDERSTAND is that on the LiveCode link, where there is no date for the article, Swift is not mentioned (only C, C++ or Objective C) and the requirement are for xCode 4.2 (we are at 10.1)

So, my question is: is this old stuff? Is it still possible? Why the LC pages have not been updated (and date signed, for the matter!!)?.

Sorry for my ignorance and thanks for any help.
Trevix
Trevix

bogs
Posts: 3354
Joined: Sat Feb 25, 2017 10:45 pm

Re: Integrate Flic bluetooth button on a LC standalone

Post by bogs » Sat Mar 23, 2019 8:01 pm

trevix wrote:
Sat Mar 23, 2019 7:35 pm
So, my question is: is this old stuff? Is it still possible?
Heya trevix, that page is very old stuff.
the first 2 paragraphs of that page wrote: 1. Introduction
LiveCode provides an iOS externals interface which allows you to extend the existing iOS feature set using a lower level language like C, C++ or Objective C.

THIS RELEASE IS FOR IOS EXTERNALS ONLY

This SDK does not replace the existing LiveCode externals interface for the desktop and web platforms.
You can also extend LiveCode functionality on the desktop platform. For more details see this ‘externals tutorial series’ here.

Note: From 5.5.2, the iOS engine’s internal structure has been changed. Unfortunately this means that all existing externals written for that platform must be updated. (Externals updated for 5.5.2 will still load and run in 5.5.1). See section Threading.
2. Requirement

Before installing the SDK ensure that your system complies with the following requirements:

MacOS 10.6 or higher
LiveCode 4.6.2 or higher
XCode 4.2 <-- as you already mentioned, 6 generations back (I think)
iOS5 SDK <-- iOs 5? can you even download the sdk anymore for iOs 5?
If it doesn't say something like "FFI" (I think) or "Foreign Language Interface" or something like that, you are talking about old school Lc (you know, MY kind of stuff :P )

As to whether it is still possible, yes (*qualified). Just you go back to your roots in RunRev 4-5, or Lc 6.x, and it is certainly possible to build externals still.

*As pertains to desktop apps, about iOs I know less than nothing, not sure you can get old xCode short of having your 10.6 install disc (I have one for snow leopard), and as I said up there, not sure you can get old sdks (unless your REALLY determined) :D
Image

trevix
Posts: 427
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Integrate Flic bluetooth button on a LC standalone

Post by trevix » Sat Mar 23, 2019 8:06 pm

And in LC builder, there is no mention of Swift:
https://livecode.com/docs/9-0-2/extendi ... -livecode/

Is it because is not possible?
Trevix

bogs
Posts: 3354
Joined: Sat Feb 25, 2017 10:45 pm

Re: Integrate Flic bluetooth button on a LC standalone

Post by bogs » Sat Mar 23, 2019 8:50 pm

Unfortunately my friend, I have not the least clue about that. I run one of those "unsupported" distros, and many of my boxes are too old to run anything close to Lc on, heh. The closest I come to 7.x -> up is a VM, so not very often.

I haven't even looked at LCB yet (I do have a plan to look at it sometime in the future). Perhaps -hh will stop in and say.
Image

Post Reply

Return to “Extending LiveCode”