Sto cercando di installare i simulatori IOS tramite la riga di comando. Dal plist si scarica, posso vedere questo:
<dict>
<key>dependencies</key>
<array/>
<key>fileSize</key>
<integer>584180466</integer>
<key>identifier</key>
<string>Xcode.SDK.iPhoneSimulator.6.1</string>
<key>name</key>
<string>iOS 6.1 Simulator</string>
<key>source</key>
<string>http://devimages.apple.com/downloads/xcode/simulators/ios_6_1_simulator.dmg</string>
<key>userInfo</key>
<dict>
<key>ActivationPredicate</key>
<string>$XCODE_VERSION >= '5.0'</string>
<key>ApplicationsBlockingInstallation</key>
<array>
<string>com.apple.iphonesimulator</string>
</array>
<key>IconType</key>
<string>IDEDownloadablesTypeSimulator</string>
<key>InstallPrefix</key>
<string>$(DEVELOPER)</string>
<key>InstalledIfAllPathsArePresent</key>
<array>
<string>$(DEVELOPER)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk</string>
</array>
<key>RequiresADCAuthentication</key>
<false/>
<key>Summary</key>
<string>This package enables testing of this previous version of iOS by installing legacy frameworks into the iOS Simulator. If your app intends to support this version of iOS, it is highly recommended that you download this package to aid in your development and debugging.</string>
<key>Xcode.SDKs</key>
<array>
<dict>
<key>CanonicalName</key>
<string>iphonesimulator6.1</string>
<key>Path</key>
<string>$(DEVELOPER)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk</string>
<key>Platform</key>
<string>com.apple.platform.iphonesimulator</string>
<key>SupportedDeviceFamilies</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>Version</key>
<string>6.1</string>
</dict>
</array>
</dict>
<key>version</key>
<string>6.1</string>
</dict>
Qui è un .dmg
http://devimages.apple.com/downloads/xcode/simulators/ios_6_1_simulator.dmg
e un InstallPrefix.
All'interno di .dmg
è un file .pkg
che installa su (relativo) ./Platforms
.
Il problema è che se cerco di installarlo tramite installer
:
sudo installer -pkg /Volumes/.../ios_6_1_simulator.pkg -target /
Verrà installato in /Platforms
anziché in /Applications/Xcode.app/Contents/Developer/Platforms
.
Non riesco a impostare un target diverso che non sia un punto di montaggio. Come faccio a installarlo in quella posizione?
EDIT: non funziona nemmeno se imposto un punto di montaggio personalizzato. Ecco il mio tentativo:
$ mkdir /tmp/SampleDir
$ hdiutil create -srcfolder "/tmp/SampleDir" -volname "Sample Install" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size 1g pack.temp.dmg
.............................................................................................................................................................................................................................................
created: /tmp/pack.temp.dmg
$ hdiutil attach -readwrite -noverify -noautoopen -mountpoint /Volumes/SampleDir "pack.temp.dmg"
/dev/disk4 GUID_partition_scheme
/dev/disk4s1 Apple_HFS /Volumes/SampleDir
$ sudo installer -pkg ~/Desktop/iPhoneSimulatorSDK6_1.pkg -target /Volumes/SampleDir
Password:
installer: Package name is iPhoneSimulatorSDK6_1
installer: Installing at base path /Volumes/SampleDir
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)