How should I start with IOS?

How do you integrate java and objective-c/swift?
From this page I can see how to build it, but the integration is a mystery to me.

Also, does anybody have any general tips about it?

Edit: also, how do I figure out if I am running on iOS from java? For Android I use System.getProperty(“”).toLowerCase().equals(“android runtime”), but how can I check if it is running on iOS?

System.getProperty("") should provide a clue what you’re running on. For details see:

Sorry, I don’t have any tips on integration.

Use the SDK and start a new iOS Project (Or was it only enabling iOS under Deployment settings?) Either way it generates an xCode Project to use later on. You just code in java and don’t care about the iOS side. Be aware that you need Mac OS.

There’s a built in Enum for finding the platform. I think it’s JmeSystem.getPlatform() or something like that.

Edit: Yup.

1 Like

The IOS sdk menu is empty in a MacOS Mojave emulator with XCode and sdk 3.2

I wouldn’t.

I’ve done some iOS work and would only tackle it again natively or using something like Unity that does all the work for me.

Not a very pro-active answer sorry, but it needs to be mentioned.

“I wouldn’t”

I’m sorry, but not a very descriptive answer…

Are you referring to using ios and JME together?

yep. The task appears to be a massive pain in the arse to me, I personally wouldn’t want to travel down that rocky road less travelled.

Just trying to save you huge headaches down the road. But by all means don’t let my pessimism stop you from doing it, I’m very often, if not always, wrong =)

I’m prepared to deal with some issues… Not surprisingly, the android version works just fine, but I’m guessing this will be harder to integrate.

good stuff =) I hope iOS works out smoothly so I/we can use it more.

It might be because i dont seem to have the cmd line developer tools

Followed this guide:

I got as far as linking.
I keep getting this error:

LD: -filelist file '../../build/iOS-arm64/libs.list' could not be opened errno=2 (no such file or directory)

Clang: error: linker command failed with exit code 1 (use -v to see invocation)

mmmkay, so where is the file ?

It looks like you need to switch on IOS in the Jmoneyengine SDK then compile in the SDK first.

It should build the IOS natives and project file for you. My guide assumes you have already got to that point. My guide was from the point where you are starting with XCODE.

Have you enabled IOS and allowed it download Avian and then build the natives?

I think so, i did a clean-and-build, then enabled IOS deployment. Then I waited for the saving project properties dialog to go away, and opened XCODE. Lastly, I followed your steps until the linker bit.

Are you building on OSX?

If so, if I remember correctly folder names are case sensitive. I notice you have got upper case in the folder name iOS-arm64/libs.txt

Does this folder exist and have you got the case correct?

Are you getting these messages when building in the SDK? Especially the last message???

If so, then check if the ios-arm64, ios-arm and ios-x86_64 folders exist in the build folder?
If so, then build in the XCODE project. Note: DO NOT use CLEAN in XCODE or it will delete these folders. Only use BUILD.


Packaging iOS classpath and resources

Creating iOS resources object file for arm
Creating iOS bootimage and codeimage for arm

Compiling native code for arm

Expanding libavian.a for arm

Create library list for arm

Creating iOS resources object file for arm64
Creating iOS bootimage and codeimage for arm64

Compiling native code for arm64

Expanding libavian.a for arm64

Create library list for arm64

Creating iOS resources object file for x86_64
Creating iOS bootimage and codeimage for x86_64

Compiling native code for x86_64

Expanding libavian.a for x86_64

Create library list for x86_64

The needed native iOS libraries have been built, open the XCode project at ios/project to run the application on iOS.

Wiithout looking into it: ProGuard obfuscates classes, maybe that’s part of the problem

is there a flag to disable proguard like there is in android? (yea, I had to use that…)

which library jars are including in your app?