ChatGPT解决这个技术问题 Extra ChatGPT

Install Simulator SDK 4.3 to Xcode 4.4 on Mountain Lion

I want to install SDK 4.3 in xcode 4.4 on mountain lion (os x 10.8), but when I installed the 4.3 sdk package from xcode 4.1 and launched the simulator from xcode 4.4, the simulator just told me that the ios simulator could not find the sdk.

The sdk may need to be reinstalled, which means it couldn't run! What's wrong with xcode 4.4 GM?

Are there any ideas about how to solve this kind of problem?

I could only use iPhone simulator 5.1 to run app compiled by SDK 4.3... It's ridiculers, why mountain lion GM couldn't run xcode 4.3?~!!!!!!!!
Nop, Xcode 4.4 drops iOS 4.3 simulator, only leaves debugging support for 4.0 - 4.1 devices.

K
Kemenaran

I've looked into it, and this is a deliberate behavior from Apple.

Here is an (edited) extract of the cache for Xcode download locations:

~/Library/Caches/com.apple.dt.Xcode/Downloads/eded78df8bfabaf6560841d10cf8e53766f74f28.dvtdownloadableindex

<dict>
    <key>source</key>
    <string>http://adcdownload.apple.com/ios/ios_simulator__resigned/ios_43_simulator.dmg</string>
    <key>identifier</key>
    <string>Xcode.SDK.iPhoneSimulator.4.3</string>
    <key>name</key>
    <string>iOS 4.3 Simulator</string>
    <key>userInfo</key>
    <dict>
        <key>InstalledIfAllPathsArePresent</key>
        <array>
            <string>$(DEVELOPER)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk</string>
        </array>
        <key>ActivationPredicate</key>
        <string>$MAC_OS_X_VERSION < "10.8.0"</string>
    </dict>
</dict>

Note the explicit "ActivationPredicate: $MAC_OS_X_VERSION < 10.8.0" setting, which is not present on other simulator packages.

I tried to edit the file, but it is replaced by another version as soon as Xcode opens. And I couldn't manage a manual download of the 4.3 Simulator DMG: the ADG website throws a "Session expired" error.

Looks like Apple had issues with the 4.3 simulator, and decided to disable it. Which sucks for people that have to support this version.


you can prevent the file from being replaced when Xcode starts by doing 'chgflags -vv uchg *.dvtdownloadableindex' (make the file editable again by changing uchg to nouchg, the -vv just sets verbose on so you can see the change). However, Xcode seems still seems to ignore the 4.3 simulator...
For me this opened in BBEdit, but not in Vim.
H
Hisham

I filed a DTS with Apple and confirmed with them that iOS4 simulator is not supported on Mountain Lion. They recommend to test on a real device.


Thanks. I havn't had luck with my testdevice either, because Xcode (4.5) didn't find it. I guess I'll test on a backup partition or a virtual machine.
Careful with your backup partition. Running an update on xcode via the Appstore updated Xcode (4.4) on the the Lion backup partition, not the Xcode on the Mountain Lion partition. I ended up by setting chmod 000 /Aplication/xcode.app on the backup during updates.
@brainray Xcode 4.5 has completely deprecated iOS 4.2.1 and earlier operating systems, as well as any device that uses armv6 architecture (iPhone 2G, iPhone 3G, and first two generations of iPod Touch). This is unrelated to support for iPhone Simulator. So -- keep Xcode 4.4 around.
@Olaf: thanks, yes I'm aware of this. I keep the backups disconnected, but thanks for the warning.
they do not support 4.3 on mountain lion and they do not let me update my ipod from 4.2 to 4.3 how can i test it on real device under circumtances ?
p
perpenso

It looks like a Lion vs Mountain Lion issue. I updated several machines to Xcode 4.4 today. The two older Lion systems offer to install the iOS 4.3 and 5.0 simulators under xcode|preferences|downloads. The newer Mountain Lion system only offers the iOS 5.0 simulator.


I see this too - just updated to XCode 4.4 on Lion, and the iOS 4.3 sim is still available to download under Preferences->Downloads.
B
Bo A

I've had this annoying situation too. Recently, I managed to add a compile-time check for checking APIs against older versions of the SDK. Unfortunately, you can't test it with the older version through the simulator but it's still something.

So here's what I did:

I first had to get the older Simulator SDK I wanted to get. I could easily get this by downloading older Xcode 3 (not 4) versions which included the SDK needed. Xcode 3.2.6 with iOS SDK 4.3 is linked here.

I next had to install the SDK. This wasn't too hard, so I won't explain much here. But the SDKs are stored in the Packages folder. This folder is clearly visible in earlier Xcode 3 versions but is hidden in later versions (like Xcode 3.2.6). You can easily open it anyway through Terminal. Remember to install the simulator SDK, not the regular one. Also, after the change in Xcode 4.3 where the Developer folder moved to within Xcode.app, I had to install the SDK into a tmp folder and move the SDK into Xcode.app myself. I would then need to restart Xcode if I had it open.

After that, I duplicated the debug configuration in my project and named it something like iOS 4.3 API Check or something like that - doesn't really matter. Then I changed the Base SDK of this new configuration to the old SDK which I installed. The SDK I installed was not listed though so I had to select other and entered iphonesimulator4.3.

Finally, when I needed to check against older versions of the SDK, I changed the configuration for the Run <appname>.app in my project scheme to my iOS 4.3 API Check configuration. And there we go, a compile-time check against iOS 4.3.


To easily gei into the Packages folder hit Command-Shift-G while in a Finder window & enter "/Volumes/Xcode and iOS SDK/Packages".
The target location for moving the newly installed SDK to is... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/De‌veloper/SDKs
Y
Yariv Nissim

After upgrading to ML, I had an option to download iOS 4.3 Simulator. However it did not work! I received an error while debugging. When I tried to switch the simulator version manually, it got stuck.

If I knew, I would have probably waited for a solution, instead of upgrading.


I updated to Xcode 4.4 as well before upgrading to ML. I definitely have iOS 4.3 Simulator. But now that I'm on ML, I don't see it available for download anymore. However, I can still try to simulate an app in 4.3 Simulator. And by "try" I meant to say that it won't run. The SimulatorBridge process will choke and chew up all CPU time, followed by an error message: "iOS Simulator could not find the SDK. The SDK may need to be reinstalled."
Is there an official statement from apple to this issue?

关注公众号,不定期副业成功案例分享
Follow WeChat

Success story sharing

Want to stay one step ahead of the latest teleworks?

Subscribe Now