开发者

Which should I use for iOS development, a C library the Java version?

开发者 https://www.devze.com 2023-02-07 18:09 出处:网络
I am working on an iPhone project and want to use an open source library which I found in both java and C. Currently I am working on iPhone only, but later I plan to port to other platforms too. It\'s

I am working on an iPhone project and want to use an open source library which I found in both java and C. Currently I am working on iPhone only, but later I plan to port to other platforms too. It's a client-server app, where server is already java-based.

What I want to do is to design iPhone UI in objective-c which communicates with java-based or C-based client library.

As far as I know, a Java-based library will remain the best option for me beca开发者_开发问答use it is cross-platform, but what about Objective-c and Java communication. Is it possible using JNI, and will it take more time to develop than C, and what abt software efficiency?? Which should I choose, C or java-based library, bearing in mind fast development lifecycle?

Through Googling, I learned that Java and Objecive-c communication is possible using a "Java bridge", but I read another post, which said that Apple has restricted the use of "java bridge" in Mac OS X 10.4 and later...

Given that information, which version of the library should I use?


Use C.

Java does not run on iOS. You would need to communicate with a web server to execute Java code.

However, for your web service, I would recommend using Java, since your server already runs Java. To communicate with the service from the app, define some endpoints and then make HTTP request from your app to the server.


If your code need to run on the iPhone you can not use Java. There is no jvm (for a non jailbroken device).

0

精彩评论

暂无评论...
验证码 换一张
取 消