For this chapter, we will create a new project to run on an Android device. While creating a project, keep in mind that the project needs to be developed in Objective-C and not Swift as the Android plugin doesn't support it.
I have created a project called SBAndroid
for this chapter, so we will first open the Sprite builder project.
We will then navigate to File | Project Settings.
Here, we can see the locations for iOS and Android resources. For iOS, they will be in the Published-iOS
folder, and for Android, they will be in the Published-Android
folder.
Similar to iOS, Android resources will be created for the phone
, phonehd
, tablet
, and tablethd
devices.
Sceen mode is Flexible, and Orientation is set to Landscape. If you are developing a game for the Portrait mode, you can change the orientation here.
To close the window, we will navigate to File | Publish.
Now, we will plug our device into the Mac PC.
Next, we will open the Xcode
project for the same. Do not click on openProjectInXcode
as it might open in the default Xcode
version, which might not be 6.1.1.
Once the project is open in 6.1.1, we will see that the device is shown when we select Android Scheme at the top of Xcode
.
We will select the device for building and then run the project.
Once the build is ready, we should see the following in the console:
Don't worry if you see a lot of warnings as it is standard.
Now, the project should be built on our device.
The application will also be available as an app on the device. We can simply click on it to open it up.
3.138.106.233