Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
For a while now I have been killing spare time by creating a 2D game programming toolkit/library. It is written in Objective C, and consists of an OpenGL rendering system and a whole bunch of AI, physics code, a bunch of specialized containers and other game related stuff. Apart from the OpenGL based View mechanism (obviously), most of this code should be easily portable to iOS since it only uses the Foundation Framework and that framework appears to be implemented on iOS. So far I have only been testing the various components using a Cocoa NSOpenGLView but now I want to create a OS X/iOS library.
My Question is:
What's the best strategy for creating an Objective-C library that can be integrated into either iOS or OS X applications?
The Xcode 'New Project' dialog offers only:
iPhone OS; Library:
- Cocoa Touch Static Library.
Mac OS X, Framework and Library:
- Cocoa Framework
- Cocoa Library
- Bundle
- BSD C Library
- STL C++ Library
- JNI Library
At first glance none of these seems to be intended for creating a library that can be integrated into either OS X or iOS applications.
Well, I finally found the correct set of Google search terms, so to answer my own question (DOH!), it seems to be possible to share code, at least between iPhone apps and possibly also iPhone and OS X apps within certain limits. You have to create a 'static library' and use 'cross-project references':
http://www.clintharris.net/2009/iphone-app-shared-libraries/
http://www.amateurinmotion.com/articles/2009/02/08/creating-a-static-library-for-iphone.html
http://zetetic.net/blog/2010/02/15/building-static-libraries-to-share-code-on-iphone-and-mac-os-x-projects/
http://weston-fl.com/blog/?p=808
Haven't tested any of this yet but it looks promising.
You can do this with Targets.
Create a new project for a Cocoa Library. Then add a new target for a iOS Static Library. As you create new files ensure they're added to the appropriate targets (i.e. presumably both in your case) and set per-target build settings as required.
Projects using your library on the different platforms will need to link against the appropriate product but you won't need to duplicate your code.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I am planning to implement iOS game where certains assets - textures, shaders, etc. are downloaded at runtime when user buys specific in-app purchases .
Its well known fact about Apple prohibiting downloading & emitting iOS app code at runtime:
3.3.2 An Application may not download or install executable code. Interpreted code may only
be used in an Application if all scripts, code and interpreters are packaged in the Application and
not downloaded. The only exception to the foregoing is scripts and code downloaded and run by
Apple's built-in WebKit framework.
Does this restriction also include Open GL shaders, i.e. can shaders code be downloaded at runtime?
Alex and co are correct. Section 2.4 of the agreement states that you may not use the In-App Purchase API to "add any additional executable code" to the app - only data is permitted. They explicitly state that the functionality must be embedded within the app and unlocked by the purchase.
I can see why it would be desirable to add shaders as part of new content though; maybe you should contact Apple directly for a ruling to be certain?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am looking into the possibility of doing some mobile app development, firstly for Iphone and then later possibly for Windows phone and Android. I am familiar with .NET development and am wondering about what options to consider. I have read a little about Mono Touch and Phone Gap, what are the advantages and disadvantages of these and are there any other better options anyone could recommend? Or is it really necessary to learn Objective C for Iphone, and Silverlight for Windows phone etc?
Have a look at Appcelerator Titanium. Its a pretty decent cross platform app creator for iPhone and Android.
However, the problem is that Android and iPhone (and Windows Phone) are different platforms. For instance, iPhone has navigation controllers with title bars and Android doesn't. Thus you can put buttons in the title bar on iPhone, but not on Android. Eventually you get to the point where you're writing specific code for each platform, even though you're supposed to be writing once and deploying to many places.
Personally the overlap isn't worth the time saved. It makes the code base much more complicated and less maintainable. Plus you can't do as much with those cross platform tools as you can if you do everything natively.
Lastly, who doesn't want to learn a new skill? Why do something the easy/quick way when you could learn how to make iphone, android and windows phone apps natively, which may help you in the future with freelance work or indeed your career.
Here's a tutorial on setting up a cross-platform solution in C# and Xamarin tools. It doesn't cover ios, but it's extendable in that direction.
How to Create a Cross-Platform Solution for Android, WP8 and WinRT
Hope that helps.
PhoneGap or Titanium is good platform for fast development very simple applications. But when you need to go deeper, you will find a lot of pitfalls. And the most important that all this cross-platformed frameworks, based on JavaScript, that they are VERY SLOW!
So for my opinion, the best solution for development cross-platform application is Mono (MonoTouch and MonoDroid). With Mono, you can develop for iOS, Android and WP7. And you business and data-logic remains unchanged. UI-layer you have to write different for each platform. But I think it's even better, because each platform has its own approach. In addition, you get really fast speed with Mono, as it is translated into native code.
But it is not free.
Using a cross platform framework will make your app look non-native on every device, this can be ok if you want to brand your whole app.
This will mean you can only make a standard app and won't be able to take advantage of the nice stuff each os has to provide.
I would go for iPhone -> Android -> Web Mobile -> Windows Phone. In that order.
Porting from iphone to Android has it's caveats but is pretty straight forward as similar design patterns were used. Windows Phone is a bit more industrial in it's design and you might not be able to get your head round the differences.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Currently, I plan to port a Java desktop application, to the Android platform. Besides official Android SDK, I also take a look on, as it will be a plus, if it is able to run in iphone with minimal effort.
http://www.rhomobile.com/
http://www.phonegap.com/
appcelerator.com
Those cross platform frameworks seem nice. However, I was wondering, what are the limitation on those frameworks?
Will they still have the same look and feel as native Android application? (Or a native iPhone application)
Is there any difference in the speed and responsiveness of the application?
Are they able to provide same set of GUI components as in Android SDK? (Or iphone's)
Limitation access to I/O, network resource, hardware?
Ability to use threading?
From my experience (my background being native mobile app development), we get a lot more control with native apps vs framework based apps. That advantage has greatly reduced in android and iphone platforms, however there are a few other things to condsider:
If it is a one off app then you are
better off working with the
frameworks you mentioned, they
provide all the features you asked
about and for a beginner, are a bit
faster to develop.
If you are going to do multiple apps
then it makes sense to have a custom
framework for your needs. In this
case you can reuse parts of your
Java desktop app and absorb them
into your framework. You will
probably need to create iphone and
android/java versions.
If you create your own framework,
you can also incorporate other
software development best practices
like CI more easily when compared to
off the shelf frameworks.
The UI components are different for
Android and iphone and you are
better off having them different as
they have quite different
sensibilities and interaction. So it
may not be a good idea to aim for
one to one mapping.
Speed, performance etc are not an
issue, same for threads support.
Hope these points help in your decision making process.
This post will be immensely useful for you :)
Comparison between Corona, Phonegap, Titanium
As for threading - since both PhoneGap and Titanium (I cannot speak to RhoMobile) allow you to hook into native code from JavaScript (and the reverse) I see no reason why you cannot multi-thread an application using one of these technologies.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a collection of open-source frameworks/projects for the iPhone platform.
I've found quite a few good frameworks and resources. Such as ASIHTTPRequest, DrawKit, and Cocos2D just to name a few.
I'm just curious about the minor, or unknown frameworks that have yet surfaced or that I'm unaware of. Do any of you know of frameworks that are not mentioned in the following link?
Some of the frameworks that I've found and utilize in some of my iPhone applications can be found here (list of iPhone frameworks).
I'm not limiting the scope or type of frameworks/projects all are welcome.
This is a pretty cool library:
"ASIHTTPRequest is an easy to use wrapper around the CFNetwork API that makes some of the more tedious aspects of communicating with web servers easier. It is written in Objective-C and works in both Mac OS X and iPhone applications."
- http://allseeing-i.com/ASIHTTPRequest/
Also, here's a list I stumbled upon in my travels:
http://code.google.com/p/iui/ (UI library for Safari iPhone apps)
http://iwebkit.net/ (another UI library for Safari)
http://code.google.com/p/oolongengine/ (Google engine for iPhone)
http://www.smartfoxserver.com/labs/API/ (SmartFoxServer multiplayer engine details for their new iPhone/iPod Touch API)
http://code.google.com/p/cocos2d-iphone/ (Objective-C based 2D engine for the iPhone)
http://www.unity3d.com (3D engine for iPhone and other platforms)
http://blogs.unity3d.com/
http://iphonedevelopment.blogspot.com/2008/12/updated-opengl-es-xcode-project.html (OpenGL template for Xcode)
http://www.garagegames.com/products/consoles (2d and 3d engines for iPhone)
http://www.garagegames.com/products/torque-2d/iphone
http://www.stonetrip.com/ (3d development tool)
http://code.google.com/p/cocoahttpserver
http://sio2interactive.com/HOME/HOME.html (free open source 3D engine for iPhone)
http://homepage.mac.com/aglee/downloads/appkido.html (great alternative for the class/library browser)
http://code.google.com/p/simple-iphone-image-processing/
http://code.google.com/p/appsales-mobile/ (locally built app for gathering metrics on your app)
http://ioquake3.org/
http://en.wikipedia.org/wiki/Id_Tech_3
http://unifycommunity.com/ (community for Unity3d development)
http://www.fmod.org/index.php/products/fmodex (music/audio engine)
http://code.google.com/p/simple-iphone-image-processing/
http://groups.google.com/group/cocos2d-iphone-discuss
http://monoclestudios.com/cocos2d_whitepaper.html
http://www.neverreadpassively.com/2009/03/review-of-iphone-3d-engines.html
http://code.google.com/p/bullet/ (physics engine)
http://www.box2d.org/ (physics engine)
http://digitalbreed.com/2008/3d-engines-on-iphone-ipod
http://wiki.slembcke.net/main/published/Chipmunk (physics engine)
The following questions list many good iPhone open source frameworks:
What open source Cocoa/Cocoa Touch Frameworks are out there?
Open source iPhone components? Reusable views, controllers, buttons, table cells, etc?
Is there any open source OCR project for the iPhone out there?
Is there a good charting library for iPhone?
Open Source Cocoa/Cocoa-Touch POP3/SMTP library?
Open source iPhone Coverflow like library
Open Source VoIP/SIP Objective-C Code
http://www.ohloh.net/p?query=iphone
instead of listing open source components.
Here are the sites from were you can find reusable components
1) http://cocoacontrols.com/
2) http://open.iphonedev.com/
3) http://cocoaobjects.com/
Here is the twitter account where you can find popular reusable components on github about iPhone or iPad
4) https://twitter.com/#!/github_objc
as answered here Is there a gallery of reusable iPhone components on the web?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I'm planning to develop kind of DJ application which loads musics from music library.
And of course it'll sell in app store.
So question is, does it possible distribute in AppStore?
I found it was forbidden at least about 6 month ago...
But I hope it is possible now...
In iPhone OS 2.x you can't access the music transferred to the phone via iTunes. You only have access to the data created by your own application.
The forthcoming version 3.0 does have this capability. Release notes include this
iPod Library Access
Several new classes and protocols have
been added to the Media Player
framework (MediaPlayer.framework) to
allow access to the user’s audio
library. You can use these classes to
perform the following tasks:
Play audio items from the user’s library. This support lets you play
all audio types supported by the iPod
application.
Construct queues of audio items to play back.
Perform searches of the user’s audio library.
Access the user’s playlists (including smart, on-the-go, and
genius playlists).
For more information about the classes
of the Media Player framework, see
Media Player Framework Reference.
(sorry,links may only be working for registered Apple developers).
In version 3.0 of the iPhone SDK you now have access to the music library.
The SDK 3.0's Media Library Framework only allows you the most basic iPod controls over the music. You can't even output the .mp3 and work on it yourself (with OpenAL etc.).
So basically, its control can be only as capable as the iPod's, which is far too limited for any DJ applications.
Otherwise I would dream making the most amazing portable DJ device in the history of turntablism, ever. Hope we see that coming in SDK 3.1.
Just putting it out there:
If you want to use PrivateFrameworks and make an app for the hell of it, then there is a Private Framework called MusicLibrary.
To create a DJ application, won't you need the ability to load multiple songs at once then play over the top of each other?
As far as I know, the SDK only allows you to load 1 track at a time.