App inventor disconnects as it loads

Hi everyone:
I am new to the community. I have created a simple app dealing with labels and clocks. As I use Connect and Scan the code, It starts loading to 15% and stops there with no warning, soon later it disconnects with the iPhone and the screen of the app disappears on the phone too. Any idea how to resolve this issue, please? Thanks

You cannot use (BLE) extension(s) on iOS. Show you blocks.

Thanks for the kind response. please elaborate, I am new to the whole idea. Thanks.

I think you asked to see the block diagram, please see the attached file.

Where do you increment or decrement the variable Count?

i.e.

set Count to Count + 1

Also, 2080 - 2023 = 57 years.

How long do you expect your app to run?

in this case, only 1000 seconds as I have used that to expire and terminate the program. the year is just a year number. The idea is to just show the remaining time to that future date. I think the problem is a communication issue and should not do anything with the logic of the code. what do you think, based on the behavior of the App Inventor?

even if that does not work, the count I mean. the app shall calculate the result and display it every second as long as the app is running on the phone. until I disable the app on the phone.

What you want is a countdown timer, based on Duration.

That calculation is done by successively removing days, hours, minutes, seconds in integral quantities from the Duration, working from major to minor.

Search the Gallery for Countdown Timer for examples.

The FormatDateTime Clock blocks that accept milliseconds assume those are milliseconds from 1970, not Duration milliseconds.

Check their tool tips to verify that.

Which version of the companion app do you have installed? There was a bug in some of the Clock methods that would cause a crash when they were used. That should be fixed in the latest version available from the App Store. If you're running an older version, you will want to upgrade to get the fix.

What does your topic have to do with bluetooth?