Home Features Docs Blog Support GitHub

Tutorial MOE 1.3.10 (All in One)


(Saeed) #1

Hi everybody,

It seems that all of the new users of this community has same problem and that’s create a new first HelloWorld application.
In this topic i’m trying to create a step by step tutorial.

Install AndroidStudio and Multi-Os Engine Plugin

  1. Install AndroidStudio v2.3.3 (It seems that we have some problem on version 3 of AndroidStudio).
  2. Go to AndroidStudio -> Preferences -> Plugins -> Browse Repositories -> Search for Multi-Os Engine Plugin Install this plugin and then restart AndroidStudio
    52 PM

Create a (Android) sample project

It is assumed that you have the ability to make a simple Android app. :wink: :smile:

40 PM

Create a (iOS) sample project

  1. Right click on android module and choose New -> Multi-Os Engine Module
    13 PM

  2. Select Java > Single View Application and click next

  3. Fill your custom project detail and click next
    35 PM

  4. Specify the name of your module and click Finish
    34 PM

For a while, your system freezes :thinking: :smirk: :roll_eyes: :zipper_mouth_face:, and after the gradle downloads are finished, the modules are listed for you in this way.

03 PM :blush: :heart_eyes:

Create first ViewController and connect to storyboard -> (This is equivalent to Activity in android)

  1. Right click on ios module and select Multi-Os Engine Actions -> Open Project on Xcode
    50 PM

  2. In Xcode click on Main.storyboard and drag a view (Label-Button-TextField-…) from right-bottom side of Xcode and drop on ViewController.
    10 PM

  3. Create new Cocoa Touch named : SampleViewController
    58 PM
    13 PM
    57 PM

  4. Click on Main.storyboard and click on top layer of ViewController and then click on Identity tab then fill Custom Class -> Class value by SampleViewController and press Enter key.
    44 PM54 PM

  5. Now connect your Views to SampleViewController. Click on Show the Assistant editor and select SampleViewController.h then press control key + click on TextField and release click on the body of SampleViewController.h like the below. (Do this by all of other element of your ViewController) - (For button i select Connection type as Action).
    12 PM
    47 PM
    08 PM

  6. Go to AndroidStudio again. and on ios module -> ui package rename class to SampleViewController.java.
    25 PM
    Check these line in SampleViewController class:

@org.moe.natj.general.ann.Runtime(ObjCRuntime.class)
@ObjCClassName("SampleViewController")
@RegisterOnStartup

@Selector("init")
public native SampleViewController init();

@Owned
@Selector("alloc")
public static native SampleViewController alloc();

protected SampleViewController(Pointer peer) {
    super(peer);
}
  1. Add this following code to SampleViewController class:
    @Selector("textfield")
    @Property
    public native UITextField getTextfield();

    @Selector("label")
    @Property
    public native UILabel getLabel();

    @Selector("submit:")
    public void submit(NSObject sender) {
        getLabel().setText(getTextfield().text());
    }
  1. I have the best wishes for you.
  2. Special thanks of MOE team.

How to Install Multi os engine
Is documentation being updated anytime soon?
Why was Multi-OS Engine UI Designer for iOS removed?
(kapil) #2

Hello Saeed,

thanks for your reply,according to your reply you created hello world app please confirm me last thing only this will clear all my doughts

  1. can i use my own created android app…which i bought from envato account and according to the sellers the app is fully customizable…

  2. after completing the given process then how can i generate ipa in android studio…

please help me to clear these problem i shall be very thankful to you.


(kapil) #3

when i am tring to open the project in xcode error shows neither the xcode nor the workspace is set in the gradle plugin …please help


(Saeed) #4

Dear @kapilrai2

What version of MOE do you use?


(Erick Barahona) #5

what version of Xcode do you use?


(Van Van) #6

Dear all,
Has anybody resolved this yet?
I got the same error @kapilrai2 and i cannot open Xcode project and stuff with it now. Could you please help? @kapilrai2