Loooong test install of standalone on iOS 15.7 and 15.6

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Loooong test install of standalone on iOS 15.7 and 15.6

Post by trevix » Mon Sep 19, 2022 1:22 pm

Hello!
While installing a standalone via USB (using the test menu) from LC to Android hardware is fine (54 seconds), the time required on iOS is getting way big.

I am using: Mac studio, OSX 12.5.1,xCode 13.2, LC 9.6.9 Rc1, iOS 15.7, Android 10

My standalone is close to 100 MB and has a lot of libraries and extensions to be loaded, still, to install it to my iPhone requires more then 4 minutes
I don't think it was like this on previous versions of LC.
Is this normal?

Thanks
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7239
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by jacque » Mon Sep 19, 2022 5:43 pm

How long does it take to build a standalone? If that is fairly quick then the difference is the time it takes to transfer the app to the phone in test mode. I'm not sure you can do much about that.

If the build itself takes a long time then make sure you are choosing inclusions manually. If you let LC find inclusions it has to scan every script and library, which is time consuming.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by trevix » Mon Sep 19, 2022 6:09 pm

Hello.
Inclusion are already manual.
Time to create a standalone on the desktop is around 8 minutes. Strange enough it takes longer then installing the same standalone via USB.

I noticed that for the most time the standalone builder (and also the test menu) is doing "Copying files...". (everything is on the main 2TB SSD with has plenty of room).
I am afraid that this could be caused by the big number of button icons (in 3 sizes) and small png images, even tough none of them are bigger then 100k.
The icons/images folder is around 9 MB. I guess the copy pane copies one file at the time in the package.

Any suggestions?
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

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

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by trevix » Mon Sep 19, 2022 6:11 pm

PS: some icons are hard to create as SVG
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by stam » Tue Sep 20, 2022 9:17 am

If you have a stack that *only* contains your icons/graphics, how large is that stack?


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

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by trevix » Tue Sep 20, 2022 11:56 am

Thanks for the links.
The standalone is for iOS and Android (I guess the "symbols" link doesn't apply?)

The way my standalone has been created is the following:
  • There is a main stack (with 3000 lines of generic code) and lot of substacks. 19 MB overall
  • On the main stack there is a card named "deposito" where I imported all the images, referred trough the app using their ID.
  • Every image on this card has a source property linked to its main Png file, which is in a folder that gets copied by the standalone copy pane
  • Every image on the folder is also replicated in 3 sizes iOS and 3 Android (so there are 6 files for image).
I don't know if this is the correct way to do it (beside converting most of them to SVG, which i guess sometime I will do...) but this works pretty well on keeping all icons and images with a good resolution on any platform.

What I don't understand is why there is such a difference in time, on USB testing a standalone, between iOS (4 minutes) and Android (54 seconds).
Consider that my Android hardwares are poor performer, ranging from Android 7 to 10.

One more thing, please: how can I use SVG icons in buttons (android and iOS)?. The only way is to create a group with the twos? (beside buying the mega bundle).

Thanks very much for your help.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by Klaus » Tue Sep 20, 2022 12:04 pm

Ciao Trevix,
trevix wrote:
Tue Sep 20, 2022 11:56 am
...
One more thing, please: how can I use SVG icons in buttons (android and iOS)?.
The only way is to create a group with the twos? (beside buying the mega bundle).
you can:
1. create an image from the SVG with
-> drawingSvgCompileIcon("thumbs up") ## Name of SVG icon
and use that image as the icon.
Hint:
The resulting image is still resolution independant, Kudos to Mark Waddingham!
Or:
2. Load and install the free "Universal Button" widget here, it can also display SVGs directly:
https://github.com/revig/universal-button-widget


Best

Klaus

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by stam » Tue Sep 20, 2022 1:04 pm

trevix wrote:
Tue Sep 20, 2022 11:56 am

One more thing, please: how can I use SVG icons in buttons (android and iOS)?. The only way is to create a group with the twos? (beside buying the mega bundle).

Thanks very much for your help.
Other than universalButton widget as Klaus recommends (which I also use when needed), you can just use the vanilla SVG widget directly as a button - you just need to implement the mouseDown/Up/Release etc. I do this frequently, partly because if sharing stacks the other person also needs to have universalButton.

I just create a behaviour sub stack I can apply to SVG to turn them into “buttons”. I do the same with graphics, especially with small ones where there is a Unicode icon I can assign as the “image”.only with graphics I have to include the colour/hiliteColor to apply the change in code.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7239
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by jacque » Tue Sep 20, 2022 6:01 pm

You can use the LC file menu to "import as control", choose the SVG image, and LC will convert it to an image format that retains the SVG properties but can be used the same way as any other image. This is the same thing that drawingSvgCompileIcon does, but it is automatic. This way you do not need multiple copies of the image and you can cut your resource files by two-thirds.

I'm not sure it matters, but looking up an external reference to an image may take longer than having the image in the stack. Builds might be faster if the images were imported directly onto the card. I haven't tested that, but since SVG images are much smaller than bitmaps they shouldn't require much room in the stack.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by stam » Tue Sep 20, 2022 6:06 pm

On that note, a simple behaviour script to turn an SVG into a 'button' is:

Code: Select all

on mouseDown
     set the hilited of me to true
     pass mouseDown
end mouseDown

on mouseUp
     set the hilited of me to false
     if the mouseLoc is within the rect of me then -- because sometimes mouseRelease doesn't work
          buttonAction -- buttonAction is a handler in the individual SVG
     end if
end mouseUp

on mouseRelease
     set the hilited of me to false
end mouseRelease
just create a substack and add this to its script, then set the behaviour of the SVG to this substack.

In the script of the SVG just add a 'buttonAction' handler, eg:

Code: Select all

on buttonAction
     answer "Hello LC World!"
end buttonAction
You can add handlers to the behaviour for mouseOver effects as well, but you'd need to manage the color changes on mouseEnter/Leave; this is easy to modify for any graphic (again, you'd need to modify the colours or effects to provide user feedback on button press etc)

Might be one way of cutting down size ;)

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

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by trevix » Wed Sep 21, 2022 10:43 am

I think I will go for the Universal Button, which is great.
This because most of my buttons have a label, so using the SVG widget I would have to add a txt field, group them, etc...

About the Universal Button, having languange localisation in my standalone, the label of the widget may vary in length.
I noticed that the widget does not account for formattedwidth.
Even if place the UB widget in a group, after changing the widget label, the formattedwidth always report 0, both of the widget and of the group.
Am I missing something?
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Loooong test install of standalone on iOS 15.7 and 15.6

Post by stam » Wed Sep 21, 2022 10:52 am

If you raise an issue on Ralph’s GitHub page for UB he may well be able to sort this for you.

Not so long ago I raised an issue with the SVG icon being fixed in location and size (dependent on button size) and within a week he pushed an update that allowed relocation of icon and resizing. I was extremely impressed!

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”