Adding smart BASIC to Xcode Tutorial
Posted: Mon Oct 27, 2014 8:50 am
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.
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.