Smart BASIC allows you to create genuine iOS applications which can be valid for App Store submission or Ad-Hoc distribution.
Although all iOS applications should be compiled with Xcode, you will not need to write any single line in Objective C language - you will simply compile template Xcode project together with your smart BASIC program.
Of course you will need Apple developer license and knowledge of how to use Xcode for compiling and codesigning your applications. But these topics are out of scope of smart BASIC support and should be referred to respective Apple help resources.
Now, as a tutorial let's create an iOS application for example from this smart BASIC program:
viewtopic.php?p=3493#p3493
Download smart BASIC SDK for Xcode.
Copy text of BASIC program and create text file "turtle.txt" from it.
Rename root template foler name from "BASIC SDK" to "Turtle".
Copy file "turtle.txt" to "Turtle/Samples" folder.
Open template project in Xcode.
In file "BASIC/AppDelegate.m" inside empty quotes write down name of program file which you want to run (in our case: turtle.txt).
In file "BASIC/Supporting Files/Application-Info.plist" change "Bundle display name" parameter from default "Application" to "Turtle".
Compile project by selecting Xcode menu item "Product > Build". Thus all changes will be saved.
Rename project name from default "Application" to "Tutrtle".
Select Xcode menu item "Product > Scheme > Edit Scheme..." and in "Archive" section rename default name "Application" to "Turtle".
Now you can do anything you want with your application: compile it for App Store submission, for Ad-Hoc distribution or test it in iOS Simulator.
NOTES:
1) Template project "BASIC SDK" contains two libraries: "libSB-dev.a" for running on iOS device and "libSB-sim.a" for running on iOS Simulator. Library name used in project is "libSB.a", so you may need to rename proper library file to "libSB.a" before running your project.
Here you can download the complete instruction as a PDF file, compiled by Scott A. Rossell.
Adding smart BASIC to Xcode Tutorial
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Adding smart BASIC to Xcode Tutorial
Do we as SmartBasic developers have the right to distribute SmartBasic apps in the Apple App Store for commercial use, royalty free?
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Adding smart BASIC to Xcode Tutorial
Of course YES.greycheek wrote:Do we as SmartBasic developers have the right to distribute SmartBasic apps in the Apple App Store for commercial use, royalty free?
Re: Adding smart BASIC to Xcode Tutorial
Does it matter what version of Xcode I use? (Version 8 is what is available at Mac Store) ..
Thanks.
Thanks.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Adding smart BASIC to Xcode Tutorial
Whatever works.Elliot wrote:Does it matter what version of Xcode I use? (Version 8 is what is available at Mac Store) ..
Thanks.
Re: Adding smart BASIC to Xcode Tutorial
I have downloaded the smart BASIC SDK for Xcode. But your tutorial says rename template folder from "BASIC runner" to "Turtle". Are you referring the the folder labelled BASIC? This is a virtual folder, correct?
Then you open the Samples (virtual) folder and copy the turtle.txt into it.
When you click on Application.xcdoeproj, it should open in Xcode. Do I have this right?
Thanks so much for your help.
Then you open the Samples (virtual) folder and copy the turtle.txt into it.
When you click on Application.xcdoeproj, it should open in Xcode. Do I have this right?
Thanks so much for your help.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Adding smart BASIC to Xcode Tutorial
Now name of this folder is "BASIC SDK" (I have corrected the tutorial). So you can rename it to "Turtle".Elliot wrote:I have downloaded the smart BASIC SDK for Xcode. But your tutorial says rename template folder from "BASIC runner" to "Turtle". Are you referring the the folder labelled BASIC? This is a virtual folder, correct?
Usually I run Xcode and then load project from there.Elliot wrote:When you click on Application.xcdoeproj, it should open in Xcode. Do I have this right?
These folders are not virtual (what does it mean?). "BASIC SDK" and "Samples" are normal folders.
Re: Adding smart BASIC to Xcode Tutorial
I attempted to build the product but got 9 error messages. including Ignoring file/Users/admin/Downloads/Turtle/libSB.a, missing required architecture x86_64 in file /Users/admin/Downloads/Turtle/lib SB.a (2 slices)...
The others were _OBJ__$_ViewController.activateGPS", and similar with .dropboxAppKey, .dropboxAppSecret, .dropboxRoot,
I have screenshots of the error messages if that would help. Also the BASIC SDK already contained all 3 library files (libSB-dev.a, libSB-sim.a, and libSB.a) I did not change the names of any library.
Thanks.
The others were _OBJ__$_ViewController.activateGPS", and similar with .dropboxAppKey, .dropboxAppSecret, .dropboxRoot,
I have screenshots of the error messages if that would help. Also the BASIC SDK already contained all 3 library files (libSB-dev.a, libSB-sim.a, and libSB.a) I did not change the names of any library.
Thanks.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Adding smart BASIC to Xcode Tutorial
Probably you should change. Please read NOTES in the end of tutorial: proper library should be chosen when compiling for Simulator and for device.Elliot wrote:I have screenshots of the error messages if that would help. Also the BASIC SDK already contained all 3 library files (libSB-dev.a, libSB-sim.a, and libSB.a) I did not change the names of any library.
Re: Adding smart BASIC to Xcode Tutorial
I am not sure what you mean. I would be using the iOS Simulator. Does that mean I should change the name of libSB-sim.a to libSB.a? (Overwriting or deleting the current libSB.a file)?
Thanks.
Thanks.