Screen size- Running in App versus Basic

BASIC SDK для Xcode
tampadancing
Posts: 13
Joined: Fri Jun 29, 2018 11:34 am
My devices: iPad Pro
iPhone se

Screen size- Running in App versus Basic

Post by tampadancing »

I have a 12.8 inch iPad Pro running iOS 12 and used Smart Basic to write a program. The program runs great and uses the full screen. I followed the steps and successfully created an app using Xcode, but have one problem. When I run the app, the program only uses about 2/3 of the screen. The app runs great, just at a reduced size. I suspect it is a simple setting in Xcode that I need to adjust, though I have played around with it quite a bit and have not had any success. Any ideas?
By the way, I love Smart Basic. I keep reading how simple "Swift" is, and have completed the Swift Playground series training, but calling Swift simple is untrue (I am being nice). Smart Basic is powerful, intuitive, functional, and truly easy to use. It lets a person focus on their ideas and creativity instead of being caught up in the weeds of complex programming nomenclature and process.
Thank you for Smart Basic.

User avatar
GeorgeMcGinn
Posts: 435
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro 10.5in
IMac
Linux i386
Windows 7 & 10
Location: Venice, FL
Flag: United States of America
Contact:

Re: Screen size- Running in App versus Basic

Post by GeorgeMcGinn »

What version of XCode?

There are also settings in XCode that are device-specific, so the iPad you choose may be a generic iPad (such as XCode v8.2 does not have the iPad Pro as a device) so it picks or you pick the closest device to it.



tampadancing wrote:
Thu Oct 11, 2018 11:54 am
I have a 12.8 inch iPad Pro running iOS 12 and used Smart Basic to write a program. The program runs great and uses the full screen. I followed the steps and successfully created an app using Xcode, but have one problem. When I run the app, the program only uses about 2/3 of the screen. The app runs great, just at a reduced size. I suspect it is a simple setting in Xcode that I need to adjust, though I have played around with it quite a bit and have not had any success. Any ideas?
By the way, I love Smart Basic. I keep reading how simple "Swift" is, and have completed the Swift Playground series training, but calling Swift simple is untrue (I am being nice). Smart Basic is powerful, intuitive, functional, and truly easy to use. It lets a person focus on their ideas and creativity instead of being caught up in the weeds of complex programming nomenclature and process.
Thank you for Smart Basic.
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Screen size- Running in App versus Basic

Post by Mr. Kibernetik »

Thank you for your comments.

SDK is practically the same application as smart BASIC itself, but without editor and file manager.
I don't know why SDK application screen size differs from screen size in smart BASIC.

tampadancing
Posts: 13
Joined: Fri Jun 29, 2018 11:34 am
My devices: iPad Pro
iPhone se

Re: Screen size- Running in App versus Basic

Post by tampadancing »

Yes, Mr. K, I have read in previous posts and love that the SDK really is SmartBasic and everything else is just a shell. It really is puzzling how it can display one way when running code through SmartBasic and another way through the app on same device. The program app does run flawlessly except for the reduced screen. Thank you for responding.

George McGinn, thank you for your input too. I am building directly to my device, not through the simulator, so I was under the impression the correct device build would occur. I have viewed most of the device specific references in the Xcode project file as best I understand them, and cannot detect any reference to the wrong device.

By the way, I am running version 10 of Xcode and IOS 12 on my iPad Pro.

Thank you both.

User avatar
GeorgeMcGinn
Posts: 435
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro 10.5in
IMac
Linux i386
Windows 7 & 10
Location: Venice, FL
Flag: United States of America
Contact:

Re: Screen size- Running in App versus Basic

Post by GeorgeMcGinn »

I can't run XCode v10 on my iMac as it is considered obsolete by Apple (Spring 2008 build) so updates physically check hardware and refuses to load. But I would assume that your IPad should be listed.

One thing you can do, which I've been doing a lot of is direct development in XCode instead of on the tablet. In one program rbytes and I worked on I found that Apple will change how something works. For example, the SLIDER statement works on the iPad version of SB, but when I copied the code to XCode, it kept getting exception errors.

So I will do my development in XCode and if any other issues like this pop up, I don't spend days or weeks writing and testing only to find out I can't compile in XCode due to changes Apple makes in its internals.

SB is also not the only language with this problem. Similar issues occur with TechBASIC. For example, when Mike wrote the manual, the PICKER statements created a nice box around it until Apple made changes. Now I get a thin line as the box.

Some of the changes are cosmetic while others affect how a statement works. I know that SB will not fix the SLIDER issue as Mr. K isn't making any more upgrades. Even in TechBASIC, since Apple makes many changes, Mike told me if he chased and fixed every issue that's cosmetic, he could not add more important functionality.

I have to speak with Mike as I beta tested his next version many months ago, yet he hasn't posted the upgrades, which fixed some important issues, some caused by Apple changing things in iOS or how hardware interacts with OS internals.

Good luck. And a good programmer knows that with time, any problem has a work-a-round.



tampadancing wrote:
Thu Oct 11, 2018 2:30 pm
Yes, Mr. K, I have read in previous posts and love that the SDK really is SmartBasic and everything else is just a shell. It really is puzzling how it can display one way when running code through SmartBasic and another way through the app on same device. The program app does run flawlessly except for the reduced screen. Thank you for responding.

George McGinn, thank you for your input too. I am building directly to my device, not through the simulator, so I was under the impression the correct device build would occur. I have viewed most of the device specific references in the Xcode project file as best I understand them, and cannot detect any reference to the wrong device.

By the way, I am running version 10 of Xcode and IOS 12 on my iPad Pro.

Thank you both.
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Screen size- Running in App versus Basic

Post by rbytes »

When I first read this thread I didn't feel I had anything to add. But on re-reading, I think that my experiences with Smart Basic and screen sizes might be relevant.

The last iPhone that Smart Basic was correctly able to identify the screen size for was the 5s. When I ran GET SCREEN SIZE sw, sh, I got sw=568 and sh=320 in landscape orientation. That is point size, so the pixel size should be doubled in each direction. The resulting 1136 x 640 is the pixel size specified by Apple, and a screen capture measures exactly that.

When I moved to an iPhone 6 a couple of years ago, I posted a bug that is probably still in Bug Reports. When I ran GET SCREEN SIZE sw, sh, I got sw=568 and sh=320. But that was wrong! The iPhone 6 screen is 667 x 375 points or 1334 x 750 pixels. A screen capture gave those dimensions. But here is the crazy part. Smart Basic's display still filled my screen exactly, though its ability to sense the actual dimensions was now lost.

I asked other users who had even newer phones to post their results, but no one responded. However last spring I upgraded to an iPhone X. It has a significantly larger resolution of 2426 by 1125 pixels. So does Smart Basic show a larger size? NO. It still reports the screen size as 568 x 320 points - unchanged from the 5S! It should be displaying 1213 x 612.5 for point size. I now assume that the iPhone 7 and 8 series would have produced the same incorrect result.

But it gets worse. Smart Basic no longer fills the entire screen in either portrait or landscape. Here is a screen shot of my latest program running on my iPhone X.


CAAA8A67-489D-42E1-B896-28A16DFF4756.png
CAAA8A67-489D-42E1-B896-28A16DFF4756.png (519.48 KiB) Viewed 7165 times


It may be that this problem does not exist for the iPad. You say that your program fills the screen on your Pro when run in Smart Basic. But what are your results when you test for GET SCREEN SIZE sw, sh? If Smart Basic does not sense the right dimensions, then perhaps the SDK interprets that you are running the compiled program on a regular iPad, and is sizing the display to 1024 x 768 points or 2048 x 1536 pixels. You could do a screen capture and post it here if you would like me to measure it.
The only thing that gets me down is gravity...

User avatar
GeorgeMcGinn
Posts: 435
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro 10.5in
IMac
Linux i386
Windows 7 & 10
Location: Venice, FL
Flag: United States of America
Contact:

Re: Screen size- Running in App versus Basic

Post by GeorgeMcGinn »

This is one reason why I've done more SB development directly in XCode. Apple keeps it updated with new hardware on a regular basis.

Also, things that work in the SB IDE no longer works in XCode, such as the slider. I wasted a lot of time with our Dates App, trying to get it to work in XCode only to realize that the problem is carried over with the SB object code. But I did learn a lot about how Xcode works, and I started to write this program In XOJO. However, with the problems I've had with my move and busting/crushing my left foot, it has been a slow process.

So if you have a current iMac or iBook or any currently supported Apple computer, if you would've put that program into Xcode, it should display properly for the device that you're working with. But, do you to the assembly object module from smart BASIC, you'll still have the same problem.

You might have to look at a Nother programming language to get this to work unless Mr. K plans to fix this issue. However I would not count on that. I really don't think you'll find that this issue will be fixed in smart basic, and that you'll never be able to work with anything past iPhone 5s.
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)

tampadancing
Posts: 13
Joined: Fri Jun 29, 2018 11:34 am
My devices: iPad Pro
iPhone se

Re: Screen size- Running in App versus Basic

Post by tampadancing »

Thank you both for responding.
The screen size by SB is 768 x 980 and it fills the screen when ran through SB.
The option to select iPad Pro 12.8 " is available in Xcode, and I selected it.
When I build the app on my iPad Pro , it builds and runs fine, but only occupies a portion of the screen.
When I build the app on my wife's iPad, it builds and runs fine, and fills the full screen as expected.

Thanks!
See attachments (screen Prints)
Image
Attachments
C08D9FCA-2763-4E7D-B3A1-546F53594D79.png
C08D9FCA-2763-4E7D-B3A1-546F53594D79.png (732.69 KiB) Viewed 7117 times

tampadancing
Posts: 13
Joined: Fri Jun 29, 2018 11:34 am
My devices: iPad Pro
iPhone se

Re: Screen size- Running in App versus Basic

Post by tampadancing »

Screen print showing reduced size when ran from built app.
Attachments
8CCEC9EB-93EF-42FE-A4BD-0360590352A0.png
8CCEC9EB-93EF-42FE-A4BD-0360590352A0.png (505.95 KiB) Viewed 7116 times

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Screen size- Running in App versus Basic

Post by rbytes »

I measured your two images, and then measured the area that is displayed versus what is reported by SB as screen width and height.

Both of the screen captures you posted are clearly from an iPad Pro 12.8".
They measure 2048 x 2732 pixels in portrait position, which equates to 1024 x 1366 points
Smart Basic is unable to determine the correct screen size of the Pro in points, and instead is reporting a much lower figure of 768 x 980. That figure is exactly what SB reports for a 9.7" iPad in portrait position with the top toolbar on (vs 768 x 1024 with the top toolbar off),

I measured the size of the "shrunken" screen in your second image in a drawing app rather than Smart Basic, to be sure I was accurate. It is 980 x768, excluding the toolbar at the top. So do I think that Smart Basic is responsible for your problem? Definitely! It can read the 9.7" iPad screen size correctly and any iPhone screen size up to the iPhone 5s. Nothing else. I have no idea where it gets its dimensions from for newer iPhones and iPad Pros, but it is plainly wrong.
The only thing that gets me down is gravity...

Post Reply