gregy - have got the two swift packages install...

have got the two swift packages installed from github into swift playgrounds (IOS) - good so far now trying to edit /display - using your image on github as a guide … but seems i need a lot more swift playground tutorial watching:)
85 Replies
Scott Bender
Scott Bender3mo ago
the code in the screenshot is in thr repo things are really in flux right now And I just realized I have broken things with Swift Playgrounds I am working on that right now
Greg Young
Greg YoungOP3mo ago
ok ... i will keep doing the tutorils and ignore the wsk untill you givethe go ahead
Scott Bender
Scott Bender3mo ago
ok, things are fixed now
Scott Bender
Scott Bender3mo ago
GitHub
WilhelmSKLibrary/Demo Signal K.swiftpm at main · sbender9/WilhelmSK...
Contribute to sbender9/WilhelmSKLibrary development by creating an account on GitHub.
Scott Bender
Scott Bender3mo ago
let me see how to download that to an iPad... ok, you can down this to your iPad and open it in Playgrounds
Scott Bender
Scott Bender3mo ago
Hit the down load button on the right
Scott Bender
Scott Bender3mo ago
No description
Scott Bender
Scott Bender3mo ago
Then go to the Files app, in Downloads And tap the file to unzip it Then tap the file to open in Playgrounds
Greg Young
Greg YoungOP3mo ago
i did find a way to download a "swift pakage" directly from github using its URL
Scott Bender
Scott Bender3mo ago
it'd the down arrow on the right in my screenshot second button after "Raw" You may need to that link in Safari not sure if the browser in Discord can handle it
Greg Young
Greg YoungOP3mo ago
in the swift playgrounds menu - i use the add swift package - then add the URL thats in the resource file - and its downlaods the complete package and all directories from githb (kinda like a GIT clone outcome)
Scott Bender
Scott Bender3mo ago
That’s a package, not an app
Greg Young
Greg YoungOP3mo ago
oh maybe i buggerd up
Scott Bender
Scott Bender3mo ago
Follow my instructions!
Greg Young
Greg YoungOP3mo ago
mea culpa
Scott Bender
Scott Bender3mo ago
No description
Greg Young
Greg YoungOP3mo ago
still finding my way around nuances of swift playgrounds .... working on it success . looking through the various "files" /packages - to find where/how to point it to my local rpi signalk server...
Scott Bender
Scott Bender3mo ago
It's in the "MyApp" file
Greg Young
Greg YoungOP3mo ago
ah got it
Scott Bender
Scott Bender3mo ago
No description
Greg Young
Greg YoungOP3mo ago
i dont think it matters? however i have an "app" the one you just sent ... but also an earlier "app" - the one created when i downloaded the two githib packages in other words the two packages are in another "app" ... but it seems happy
Scott Bender
Scott Bender3mo ago
the Demo app has the packages already added those are specific too each app
Greg Young
Greg YoungOP3mo ago
interestingly when i "shared" the zip file to "playgrounds" - it adds a new app (as expected) butt when i open it I see whilhelmskDummay Guages package has been added (but not the library) the library is still in the earlier "app" i created
Scott Bender
Scott Bender3mo ago
I'm not sure what you mean oh, it's a dependency
Greg Young
Greg YoungOP3mo ago
No description
Scott Bender
Scott Bender3mo ago
so you don't see it in the future just add the Dummy library only
Greg Young
Greg YoungOP3mo ago
yep - just see the dummy pkg - which was auto loaded from the zip file
Scott Bender
Scott Bender3mo ago
yep, that's how it should be
Greg Young
Greg YoungOP3mo ago
ok assuming i need to add rpi IP address - along with server credentials?
Greg Young
Greg YoungOP3mo ago
No description
Scott Bender
Scott Bender3mo ago
I don't have support for providing credentials yet so it's read only make sure you have "Read Only" access turned on in Security Settings for your sk server
Greg Young
Greg YoungOP3mo ago
noted ….. let host = “https:192.168.0.30” ?
Scott Bender
Scott Bender3mo ago
needs the port probably probably :3000
Greg Young
Greg YoungOP3mo ago
nope - i have mine set to 80
Scott Bender
Scott Bender3mo ago
ok, then not needed don't forget the slashes I just added this to the demo app
Scott Bender
Scott Bender3mo ago
No description
Greg Young
Greg YoungOP3mo ago
read only enabled - check slashes added - check no data ... hmm (i know ... i really need to go learn the swift syntax !)
Greg Young
Greg YoungOP3mo ago
No description
Scott Bender
Scott Bender3mo ago
not "https"
Greg Young
Greg YoungOP3mo ago
duh ... its working.!
Scott Bender
Scott Bender3mo ago
yeah!
Greg Young
Greg YoungOP3mo ago
small steps !
Scott Bender
Scott Bender3mo ago
If you download the latest demo app, you'll get that Electrical Overview gauge also
Greg Young
Greg YoungOP3mo ago
noted the new dummy guage type ...
Scott Bender
Scott Bender3mo ago
See in MyApp where you will need to enter in the paths for your server
Scott Bender
Scott Bender3mo ago
No description
Scott Bender
Scott Bender3mo ago
The Swift stuff is really new too me also, I have been puting it off too long, so I still have a lot to learn too!
Greg Young
Greg YoungOP3mo ago
yep already all over that 🙂 (& changing units to those used by the rest of the world:)
Scott Bender
Scott Bender3mo ago
lol
Greg Young
Greg YoungOP3mo ago
? when i select the electrical overview .. it still shows the wind guage in the right side preview window
Scott Bender
Scott Bender3mo ago
There's some tabs above that
Greg Young
Greg YoungOP3mo ago
ah .. found the select button on top of preview panel
Scott Bender
Scott Bender3mo ago
And you can edit MyApp, you'll see it commented out there
Greg Young
Greg YoungOP3mo ago
swift GUI familiarisation needed!
Scott Bender
Scott Bender3mo ago
trust me, I did the same thing!
Greg Young
Greg YoungOP3mo ago
ah yep. in myapp let guage config is setup for AWA guage
Scott Bender
Scott Bender3mo ago
look down at the bottom
Scott Bender
Scott Bender3mo ago
No description
Scott Bender
Scott Bender3mo ago
yours will look a little different make yours look like mine, comment out ContentView, an uncomment ElectricalOverViewGauge
Greg Young
Greg YoungOP3mo ago
ah so i think that it "defaults" to the AWA guage .. untill you uncomment the abve?
Scott Bender
Scott Bender3mo ago
yes
Greg Young
Greg YoungOP3mo ago
so the config, setup paths etc are all in "myapp" file and the guage definitions in the resepective files (eg elelctricalOverview) - which is where the graphical layout stuff hapens
Scott Bender
Scott Bender3mo ago
right then that code can be coppied to WilhelmSK where the config part is handled in WilhelmSK
Greg Young
Greg YoungOP3mo ago
looking to see if swift has any version type control --- for when i bugger something up and need to go backwards?
Scott Bender
Scott Bender3mo ago
I forget, was there an option to attach a github repository when creating an ?? nope
Greg Young
Greg YoungOP3mo ago
browing thru all the menus - dont find anything
Scott Bender
Scott Bender3mo ago
That sucks
Greg Young
Greg YoungOP3mo ago
i think this might work
Greg Young
Greg YoungOP3mo ago
No description
Greg Young
Greg YoungOP3mo ago
process in “working copy” (an IOS app i installed for github interaction) click and hold the my app button in playgrounds - opens above menu (obviously need “wworking copy” installed first)
Scott Bender
Scott Bender3mo ago
cool
Greg Young
Greg YoungOP3mo ago
looks like “working copy” allows push, fetch, sync etc al *albeit needs a paid version of the app) can you elaborate further on the mechanism for “code can be copied to wsk” does this add a new guage type? new widget? .. and if latter …. can a widget be embedded into a wsk layout/page?
Scott Bender
Scott Bender3mo ago
It will create a new gauge type I'll create a new catagory there for "User Contributed Gauges" They will look and work like any other gauge type in WilhelmSK
Greg Young
Greg YoungOP3mo ago
ok, next question… how to add “lines” or “connectors” that show electrical connections and/or power flows between boxs in the combo style guage? .. is this additional code in playgrounds?
Scott Bender
Scott Bender3mo ago
yes, I have not gone there yet I will do it, so don't worry about for now
Greg Young
Greg YoungOP3mo ago
sorry … if im getting a bit ahead
Scott Bender
Scott Bender3mo ago
I should be able to port my objc code over for that pretty easily
Greg Young
Greg YoungOP3mo ago
i will concentrate on getting “box” layout correct and the sk data into each respectively.. some days of work no doubt! i will leave you in peace for a bit
Scott Bender
Scott Bender3mo ago
I am coding not stop, so.... no wories
Greg Young
Greg YoungOP3mo ago
🙂
No description
Greg Young
Greg YoungOP3mo ago
so am i?
Scott Bender
Scott Bender3mo ago
clearly
Greg Young
Greg YoungOP3mo ago
not
Want results from more Discord servers?
Add your server