Cocoa Java compilation failure in XCode 3.2 - cocoa

I developed an application in using Cocoa using Xcode 3.1. Now I upgraded the OS version and tried to compile the code in Xcode 3.2, but the app crashes with an error:
CocoaJava: com.apple.cocoa.foundation.NSRuntime
-[NSJavaVirtualMachine initWithClassPath:] FATAL: cannot initialize ObjCJava
I still dont know how to resolve this. Please any one help me....

According to this Cocoa Java runtime support has been removed in 10.6 (scroll to the bottom). That page also has a solution to the problem.

CocoaJava was deprecated in 10.4.
I wouldn't be surprised if it has been completely removed in 10.6.
Important: The Cocoa-Java API is deprecated in Mac OS X version 10.4 and later. You should use the Objective-C API instead; this API is documented in Application Kit Framework Reference and Foundation Framework Reference.
http://developer.apple.com/legacy/mac/library/documentation/Cocoa/Conceptual/LanguageIntegration/LanguageIntegration.html

Related

How do I setup wxWidgets on Mac OS 9?

Hi I would like to try out wxWidgets on Mac OS 9. Are there any directions on how to do this? I am looking at developing an application using the wxWidgets framework.
To target Mac OS 9 you will have to use an old (2.8 or maybe even earlier) Carbon-based wxMac version. Latest versions of wxWidgets use Cocoa and while 3.0 still includes Carbon support, it only targets 10.4 or later versions.
You will almost certainly need to find the corresponding vintage compiler to build it.

Xcode-beta and updated/new frameworks

I run Xcode-beta 7 on 10.10.3. It has new GameplayKit framework and updated SceneKit framework. Can I use them (or their new features) in my current project, or I must have 10.11 beta?
You can write your code on OS X 10.10.3 using Xcode 7β. You can even compile and export the app since Xcode can build it against the included 10.11 SDKs.
You can not, however, run the app on your Mac under 10.10.3. For the app to run you need to update to 10.11β.
Make sure to
always use the same beta version for Xcode and OS X
always use the latest beta
If you try to run an app that links against an SDK that is not available your app will crash before it even started with an error similar to
dyld: Library not loaded: /System/Library/Frameworks/Metal.framework/Versions/A/Metal
That is because the app is configured to tell dyld to search in the system's Frameworks directory for the framework and that directory does not contain the framework on your version of OS X.
For unknown symbols in existing (updated) frameworks there are two options depending on the language:
Swift: With Swift 2.0 the compiler automatically warns you that the API you want to use is not available and makes you guard that statement like so:
if #available(OSX 10.11, *) {
let nameComponents = NSPersonNameComponents()
} else {
// Fallback on earlier versions
}
Objc: Use this answer.

What is the minimum version of Xcode I can use for submission to app store

I have an app on the appstore currently that is built using Xcode 6 with a deployment target of iOS 7. The recent release Xcode 6.3, however only works on OSX 10.10
Can I submit updates to the app store by building on an earlier version of Xcode (6.2 in my case) because I am unable to update OSX to 10.10? Does Apple release documentation about this when it releases a new Xcode version? The only thing I found was this
https://developer.apple.com/library/ios/qa/qa1806/_index.html
which says that I should aim to build with the latest version of Xcode but does not mention if the app would be rejected/approved if built with a lower version.
The minimum Version of Xcode is 5.1.1 as stated in iTunesConnect when you want to upload a new binary of your app. This information does obviously include, that you can of course use Xcode 6.2 for AppStore submission.
Hope that helps :)
You can build using the lower version of the SDK within reason I believe. Some older compilers may be missing features that Apple will eventually require, but in the short term shipping with 6.2 won't really hurt much.
That said, Xcode 6.3 should include the iOS SDK. Make sure you got it from the App Store, which includes the full suite of stuff.

Xcode built app on 10.6 wont run on 10.5.8

I am new here and new in Xcode world.
I made a simple app with Xcode 3.2 on Snow Leopard.
The resulting built app works on snow leopard, however it will not even start on leopard (10.5.8) - I get message "You cannot use this version of application with this version of Mac OS X". Is it normal?
Or is there a way to make app that will work both on Snow Leopard and Leopard? Please advise, as I have no way to find out myself
Thanks for any input
You need to change the deployment target in your Build Settings. You should set it to the lowest version of OS X that you're willing to provide support for. You should set your base SDK to the latest available public SDK.
If you do this, you must ensure that you only use new 10.6-only APIs after doing runtime checks for their existence. To do this, you can use functions like NSClassFromString and respondsToSelector:.
Any Frameworks or libraries that are new to 10.6 should be weak-linked. This will prevent the app from trying to load those frameworks on 10.5 and thus cause the program to crash when it doesn't find the frameworks.
All explained in the SDK Compatibility Guide from Apple (Requires (free) login).

iPhone App made using Xcode 3.2.3 does not run on 3.1.3 OS

I can't figure this out and I thought that someone might run through the same thing.
I have Xcode 3.2.3 (Pre Release with OS 4 beta) and I started to create my application, after the final touches and everything worked ok, I changed the Simulator - 4.0 to Simulator - 3.1.3 (latest iPhone OS) and I could never start my app again :-(
Does anyone know what I should do?
I created a simple Screencast of the problem so everyone can see what I'm writing about.
Thank you for all the help.
Independent of the NDA, the key thing to understand is that the base SDK does not have anything to do with you "deployment target", which basically sets what platform you are deploying to.
Go to your project settings and search for "iPhone OS Deployment Target". You can set that to 3.1.3 at your leisure. Even if your base SDK is 4.0 beta, it will work.
In the same way, if you had Base SDK 3.1.2, and wanted to be able to check whether you're safe on 2.1, you could set the iPhone OS Deployment Target accordingly.
I wish I could find the URL that answered this question for me when I had the same concern - it makes a very clear distinction.
You should ask on the Developer Forums, since OS 4 is in beta and under NDA.

Resources