Adding smart BASIC to Xcode Tutorial

Elliot
Posts: 37
Joined: Thu Jun 23, 2016 10:58 am
My devices: iphone
ipad
PC
Flag: United States of America

Re: Adding smart BASIC to Xcode Tutorial

Post by Elliot »

Hi, Mr Kibernetik,

I was able to create a fully functioning iphone app using your Smart BASIC. It creates an archive and ipa file and downloads to beta-tester iphones without a problem. However when I try to upload it to the app store, it fails because of what I believe is a coding error in your Xcode Tutorial.

When I build the app (or build your Xcode Turtle tutorial), it generates the following warning message (still builds correctly); A 83.5x83.5@2x app icon is required for iPad apps targeting iOS 9.0 and later. Do you have any idea how to eliminate this error message and thus allow my app to upload?

I have tried creating a 167x167 icon (called Icon-83.5@2x.png") and placing it in directory: Basic/Images.xcassets/AppIcon.appiconset/. It still does not recognize that the icon is there.

I believe there is a problem with your file: Contents.json which lists the App icons in java: there is bracketed code describing each icon. Near the bottom is this:
{
"idiom": "ipad",
"size": "83.5x83.5",
"scale": "2x"
}

I tried changing it to this:
{
"size" : 167x167"
"idiom" : "ipad",
"filename": "Icon-83.5@2x"
"scale" : "2x"
}

This only produced more error messages, as if I had corrupted the Contents.json file. Do you have any thoughts? I really want to submit this to the app store. The Apple Developers do not respond to my coding problem requests.

Thanks.

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

Re: Adding smart BASIC to Xcode Tutorial

Post by Mr. Kibernetik »

There are no errors in SDK, you just need to add a new icon in Xcode.
There are simple means to do it, you aren't supposed to edit any files in SDK for this purpose.
Please consult Apple docs how to add an icon to a project in Xcode.

Elliot
Posts: 37
Joined: Thu Jun 23, 2016 10:58 am
My devices: iphone
ipad
PC
Flag: United States of America

Re: Adding smart BASIC to Xcode Tutorial

Post by Elliot »

I got it to the App store finally. I had not defined it just as an iphone app. When I did that, the missing icon was not relevant.

Thanks again for your smart BASIC app.

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: Adding smart BASIC to Xcode Tutorial

Post by GeorgeMcGinn »

Hi,

I have two questions:

Do I need the folders for Russian and Chinese in my project? I would create an App in Russian and Chinese to expand my market, but I've learned not to trust the translators to translate my text into other languages (I ran into issues when covering Egypt, Libya and the war on terror in Pakistan using those translators to translate Arabic to English).

My other question is that I understand you have two files, one for the device and the other for the simulator. I will also be creating applications that will run on the MAC/OS itself. Will the one for the device work? Or is there another file for this?

Thanks,

George.
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: 4782
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Adding smart BASIC to Xcode Tutorial

Post by Mr. Kibernetik »

GeorgeMcGinn wrote: Do I need the folders for Russian and Chinese in my project?
What kind of folders? If you don't have any special folder for English, so you will not need folders for other languages.
GeorgeMcGinn wrote: My other question is that I understand you have two files, one for the device and the other for the simulator. I will also be creating applications that will run on the MAC/OS itself. Will the one for the device work? Or is there another file for this?
Smart BASIC SDK is not intended for making apps for Mac OS. It will make apps running either on iOS device or on iOS Simulator.

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: Adding smart BASIC to Xcode Tutorial

Post by GeorgeMcGinn »

Thanks for the OS/iOS answer.

Here's the folder's I'm talking about:

In the SDK in the BASiC folder, there are three files:
eng.lproj
ru.lproj
zh-Hans.lproj

The eng-lproj has 3 files, including a localizable.strings file. It has messages "Copying Files=Copying Files" etc. whole bunch of these messages.

For example:
The ru-lproj has "Copying Files..." = "копирую файлы..."
The zh-Hans.lproj has "copying files..." = "复制文件..."

My question is are these files automatically used, say if someone who speaks Russian has his device set to Russian language will this file be used, or do I have to specify using this version and/or the zh-Hans file?

The reason I ask is that I do not see these files when I use the sample projects provided by XCode. I only see the eng-lproj file.

So does the BASIC SDK need these files? If I wanted to provide multi-language support for my Apps, is there anything special in my code I have to do? Or will I need extra copies of my code with all text values converted to my target language? And if I wanted to add support for Spanish or French or German, can I just add these files with the values translated to the file's proper language (Spanish get a file where "copying files..."=Copiando documentos ... ?

I haven't found a sample XCode project that supports other languages, nor has any of my searching turned up much. I suspect that XCode does all the translations for me, and if so, and I can find out those other file names for other languages, If I do the conversions, I will post those files here so everyone can support more languages.

Thanks for your help.

EDIT: I forgot to mention the other two files, but you probably know them, but I will list here for the record as I do have a question about one of them:

The eng-lproj directory also include: "InfoPlist.strings" and "ViewController.xib." It is the latter I have a question about. I am assuming, based on what's in this file, it is used when executing the simulator. It has code to say Hello and a bunch of other output to the screen. Does this need a translated version, or is it something that English will suffice for everyone?

Thank you for taking the time to answer my questions. While learning the XCode system, I also, as a computer scientist, am also trying to understand how these files work with XCode and my final App.

Thanks again, George.

Mr. Kibernetik wrote:
GeorgeMcGinn wrote: Do I need the folders for Russian and Chinese in my project?
What kind of folders? If you don't have any special folder for English, so you will not need folders for other languages.
GeorgeMcGinn wrote: My other question is that I understand you have two files, one for the device and the other for the simulator. I will also be creating applications that will run on the MAC/OS itself. Will the one for the device work? Or is there another file for this?
Smart BASIC SDK is not intended for making apps for Mac OS. It will make apps running either on iOS device or on iOS Simulator.
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: 4782
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Adding smart BASIC to Xcode Tutorial

Post by Mr. Kibernetik »

GeorgeMcGinn wrote:Thanks for the OS/iOS answer.

Here's the folder's I'm talking about:

In the SDK in the BASiC folder, there are three files:
eng.lproj
ru.lproj
zh-Hans.lproj

The eng-lproj has 3 files, including a localizable.strings file. It has messages "Copying Files=Copying Files" etc. whole bunch of these messages.

For example:
The ru-lproj has "Copying Files..." = "копирую файлы..."
The zh-Hans.lproj has "copying files..." = "复制文件..."

My question is are these files automatically used, say if someone who speaks Russian has his device set to Russian language will this file be used, or do I have to specify using this version and/or the zh-Hans file?

The reason I ask is that I do not see these files when I use the sample projects provided by XCode. I only see the eng-lproj file.

So does the BASIC SDK need these files? If I wanted to provide multi-language support for my Apps, is there anything special in my code I have to do? Or will I need extra copies of my code with all text values converted to my target language? And if I wanted to add support for Spanish or French or German, can I just add these files with the values translated to the file's proper language (Spanish get a file where "copying files..."=Copiando documentos ... ?

I haven't found a sample XCode project that supports other languages, nor has any of my searching turned up much. I suspect that XCode does all the translations for me, and if so, and I can find out those other file names for other languages, If I do the conversions, I will post those files here so everyone can support more languages.

Thanks for your help.

EDIT: I forgot to mention the other two files, but you probably know them, but I will list here for the record as I do have a question about one of them:

The eng-lproj directory also include: "InfoPlist.strings" and "ViewController.xib." It is the latter I have a question about. I am assuming, based on what's in this file, it is used when executing the simulator. It has code to say Hello and a bunch of other output to the screen. Does this need a translated version, or is it something that English will suffice for everyone?

Thank you for taking the time to answer my questions. While learning the XCode system, I also, as a computer scientist, am also trying to understand how these files work with XCode and my final App.

Thanks again, George.
Just follow instructions until you are an experienced Xcode user.
These folders you are speaking about does not apply to your BASIC program.

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

Re: Adding smart BASIC to Xcode Tutorial

Post by Mr. Kibernetik »

GeorgeMcGinn wrote:...
In continuation of this question:

"does not apply to your BASIC program" means that these messages are not shown in your BASIC programs, so you shouldn't care about them. Those messages which you found inside SDK - nobody sees them and they have internal usage.

Explanation if internationalization follows...

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

Re: Adding smart BASIC to Xcode Tutorial

Post by Mr. Kibernetik »

Regarding internationalization of your application.

Function SYSTEM_LANGUAGE$() from Misc section returns user language, so it depends on your BASIC program how you implement internationalization. Of course it has nothing to do with SDK or Xcode localization settings.
So, if you need to test internationalization of your app then you will need to check how it works on your iOS device by changing your device language and running your BASIC program in smart BASIC prior to using SDK or Xcode.

NOTE: If you need your app to have specific language marked as supported when your app is already published in App Store then this is another story.
In this case you will need to localize your app in Xcode, but this does not affect internationalization of your BASIC program in any way except that extra languages will be shown as supported in App Store. Real internationalization support depends not on SDK but on your BASIC program.

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: Adding smart BASIC to Xcode Tutorial

Post by GeorgeMcGinn »

Thanks for the info.

I know I have to set my iOS so I can make sure I get the language, date, time, numbers, currency, etc. for internationalization. There are a couple of other settings I need to change too.

Thanks for the help. I have a program with loads of text, numbers, dates, I will use to test this. I just need the starting point. Thanks.

George.
Mr. Kibernetik wrote:Regarding internationalization of your application.

Function SYSTEM_LANGUAGE$() from Misc section returns user language, so it depends on your BASIC program how you implement internationalization. Of course it has nothing to do with SDK or Xcode localization settings.
So, if you need to test internationalization of your app then you will need to check how it works on your iOS device by changing your device language and running your BASIC program in smart BASIC prior to using SDK or Xcode.

NOTE: If you need your app to have specific language marked as supported when your app is already published in App Store then this is another story.
In this case you will need to localize your app in Xcode, but this does not affect internationalization of your BASIC program in any way except that extra languages will be shown as supported in App Store. Real internationalization support depends not on SDK but on your BASIC program.
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)

Post Reply