[Marmalade SDK] Warning: Using default deployment icon(s)

I just found this error when deploying my Marmalade App to Android.

As it’s explained on this thread, we need to supply a default generic icon, apart from the android-specific icon options (like android-icon-xhdpi).

For those using the hub, there is a solution in the previously mentioned thread. For those who, like me, still use .mkb files, this is how I’ve solved it.

deployments
{
["Default"]
icon='data/icons/icon96.png'

... rest of the mkb
}

Deploy tool is not complaining about this anymore 🙂

Advertisements

[Marmalade SDK] Compiling your extension for supporting iOS 64-bit

When deploying a Marmalade App to AARCH64 (iOS 64-bit support), it is also necessary to re-compile its native extensions.
Else, “ld” will ignore the whole extension and warn us about the fact.
In order to recompile the iOS extension, you are forced to use a Mac. This can be an impediment if you use Marmalade under Windows. The steps you basically need are

1.- Download and install Marmalade SDK for Mac
2.- If you are Windows user, release your license on Windows Marmalade Hub
3.- Activate your license in Mac Marmalade Hub
4.- Copy the whole extension’s folder from Windows to your mac
5.- Right-click on the extension’s .mkb for iphone (extensionName_iphone.mkb), select “Open with”. There will be two options: Mkb (default), and Mkb (7.4.3), choose the second one. Note that the numbers may change in future Marmalade versions
6.- A shell command-prompt will appear, and will attempt to compile the extension. Once completed, make sure that file
extensionName/lib/arm64/libExtName.a
is present. There should be also two folders with names finishing in _iphone_scons_aarch64 and _iphone_iphone_xcode. If that’s not the case, go to step 6b 🙂
6b.- [Optional] Open the extension Xcode project (it is located inside build_extName_iphone_iphone_xcode folder), go to Build settings, and select “Latest iOS SDK” (mine is 8.2 in this moment), and include “arm64” inside Valid architectures. This is explained in more depth in this document.
7.- Once process is complete, you can copy your extension folder back to your usual Marmalade installation (either under Windows or Mac), and recompile the whole App (including extension) to AARCH64 in iOS-fat mode. More info in the previous post 🙂

Sorry for the little mess going on here!! Hope it helps someone!!

[Marmalade SDK] Deploying to iOS 64-bit (AARCH64)

Since feb’2015, It is mandatory to have 64-bit support in your Marmalade App.
In order to deploy a 64-bit compatible .ipa, you need Marmalade SDK 7.5 or higher.

First, build your application using GCC AARCH64 Release, instead of old GCC ARM Release.

Then, when Marmalade Deploy Tool opens, select “ARM+AARCH64 GCC Release” (see screenshot below)

marmalade64bitm1

In the next step “Stage: Configuration – Platform selection”, select “iOS fat” as the platform.

marmalade64bitm2

Rest of the steps are the same. Click on “Deploy All” to run the deployment process. Note that iOS-native extensions must be also recompiled in a Mac running iOS 8 SDK or higher. Else, ld will ignore the .a files and extensions won’t be linked to your .ipa. If you also need to link your 64-bit iOS extension see this post.

[Marmalade SDK] Signing error: Can’t find your distribution signing private key at iPhone Distribution, when deploying to iOS

After updating Marmalade from 7.2 to 7.5, I just found this error when deploying to iOS:

ERROR: Signing error: Can’t find your distribution signing private key at iPhone Distribution

The reason is quite simple: My Apple Developer’s code-signing certificates (.cer, .key, .p12, .mobileprovision…) were not copied from the old to the new installation.

Just had to copy them from

C:\Marmalade\7.2\s3e\deploy\plugins\iphone\certificates

to C:\Marmalade\7.5\s3e\deploy\plugins\iphone\certificates.

After that, deployment succeeded, and .ipa file was succesfully generated 🙂

[Update] Particularly, the file that is lacking now is the distribution_identity.key. That’s exactly the private key that Deploy Tool is searching for.

Marmalade Mac SDK – Opening a project from existing code

Sometimes things are so obvious, that we find them difficult.

It took me 20 minutes to guess how to open a Marmalade project (.mkb file) in a Mac laptop.
When double-clicking the .mkb, it asked me about which program to use to open that file. (the “Select application, Cancel, Search in App Store”…). So i had to do the following:

1.- Open a terminal (Ctrl+Space, then write “Terminal”).

2.- To make sure that mkb.py python script is in the current pathname, write “mkb –help”. If you get a long list of available options, then the script is correctly placed. If not, see the end of this post

3.- Change to the project’s directory; Where the .mkb is. (in my case: “cd /Users/user/Desktop/MyProject”)

4.- write “mkb MyProject.mkb”. Some Marmalade resources may be downloaded, then Xcode is automatically launched to start working with the project. Additionally, a “build_xxx” directory should be created inside the “MyProject” directory. Inside, there is an .xcodeproj file that you can double-click to open the project with Xcode from now on.

As silly as that 🙂
Hope it helps

* If step 2 fails and you get “command not found”, you should add the Marmalade path to your current system PATH variable.In a terminal, write:

export PATH=/Developer/Marmalade/6.1/s3e/bin:$PATH

to check if all went fine:

echo $PATH

the PATH value should appear. it should have “/Developer/Marmalade/6.1/s3e/bin” in the beginning, and more pathnames separated by “:”.

Marmalade stupid mistakes compilation

I’ll periodically update this post with the most common mistakes that i do when developing with Marmalade, and that make me waste time.

– adding an empty .group file: Let’s say that i have a main .group file, say, MyProject.group, including all the .ui files, assets, fonts, etc. And this MyProject.group includes another SomeAssets.group file.

If SomeAssets.group is an empty file, application will compile, and work fine on x86 debug / x86 release; But when deploying to Android, App will come with an “Application has crashed unexpectedly” message on its start. Check your .group files! don’t leave one of them empty!

– Having an empty .h/.cpp file in a subproject: This case is much simpler. The app just doesn’t compile. But it displays an error related to the linker that is difficult to identify. It’s just about an empty .h or .cpp file.

– Deploying to win32 release, and not deleting the previous folder: After deploying to Windows, and executing my InnoSetup script to generate an installer, application is installed and overwrites the same folder than the last remaining installation. That means that all user data (e.g. SQLite databases) remain untouched.

– Deploying to Android, not deleting the App first: Marmalade, by default, does an “adb install -r” command when you select the “Package and install” option. That means it will re-install the App, but will keep user data untouched (databases, files, etc…in the smartphone’s SD card). So if you make changes like adding tables to the database, these changes won’t work because the new installation will keep the old database file. The solution to this is just doing “adb uninstall com.myapp.packagename” before re-installing the app.