[AC-1257] update ios-sim for Xcode 6
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2014-09-25T18:29:41.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator CLI |
Labels | n/a |
Reporter | Paul Mietz Egli |
Assignee | Chris Barber |
Created | 2014-09-25T17:54:39.000+0000 |
Updated | 2016-03-08T07:37:38.000+0000 |
Description
The 3.4.0-rc2 SDK contains ios-sim version 2.0, which doesn't work with the simulators in Xcode 6. The current workaround is to install ios-sim using
npm install -g ios-sim
and replacing the iphone/ios-sim file with a symlink to /usr/local/bin/ios-sim.
The version of
ios-sim
that ships with Titanium SDK 3.4.0-rc most certainly supports Xcode 6. You should not installios-sim
from npm. Can you please elaborate on why you believeios-sim
does work with the Xcode 6 iOS Simulator? What behavior are you seeing? Please be very specific.Hi Chris, thanks for the quick response. I'm trying to build and run a module that was created with the CLI as follows: {noformat} $ ti sdk install 3.4.0.v20140916181713 $ ti create -p ios -t module -d /tmp -n test -u http:// --id com.example.test $ cd /tmp/test/iphone $ python build.py $ ln -s ../example . $ python ~/Library/Application\ Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/titanium.py run {noformat} The output of the final command is: {noformat} [INFO] Minimum iOS version: 4.3 Linked iOS Version 8.0 [DEBUG] executing command: /usr/bin/killall ios-sim [DEBUG] No matching processes belonging to you were found [DEBUG] executing command: /usr/bin/killall iPhone Simulator [DEBUG] No matching processes belonging to you were found [DEBUG] finding old log files [INFO] Launching application in Simulator [DEBUG] Unable to load simulator framework. Error: (null) [DEBUG] Failed to find class DTiPhoneSimulatorSystemRoot at runtime. [INFO] Launched application in Simulator (26.13 seconds) [INFO] Application has exited from Simulator {noformat} The version of the ios-sim executable used by titanium.py is 2.0: {noformat} $ ~/Library/Application\ Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/iphone/ios-sim --version 2.0 {noformat} If I replace ios-sim with a symlink to 3.0 as described above, the simulator launches successfully and loads the generated example app. I expect the answer to this problem is that the titanium.py script isn't supported any more, which is a bummer because the CLI currently doesn't have a one-step way to generate and launch a test app based on the contents of the
example
directory. Let me know if you need any additional info.Ah, I see now. We are in the process of rewriting the build process for modules (TIMOB-10757) and we're not quite finished yet. The building of modules is the only Python code left. I highly recommend you do NOT use
titanium.py
. It's very old, very out-of-date, and not maintained. Until TIMOB-10757 is finished, I recommend you create a new mobile app, then create a small bash script that callsbuild.py
from the ios module's directory, unzips the generated module zip file into the project directory, and runti build
from the project dir. I know this seems like a lot of work, but it's probably the best workflow right now.Sounds good; thanks for your help!
I've got an interim module build-and-test process working now and thought I'd share in case anyone else is having similar issues:
Use the old
titanium.py
script to generate the test application from your current example directory.Find the temporary directory where the example app was staged in the log output. It should be something like
/var/folders/pr/769r4l2d4q11jstd9bvyd95r0000gq/T/mb1K27Lti/MODULENAME
.cp -R /var/folders/pr/769r4l2d4q11jstd9bvyd95r0000gq/T/mb1K27Lti/MODULENAME ../testapp
*IMPORTANT* edit
Once this is done, you can build and run for iOS like this:.../testapp/tiapp.xml
and remove the extra<modules/>
section. You probably want to get rid of the version number on the remaining<module/>
tag as well.and for Android like this:
Hi, Paul your solution is for build or pack the module right ? not the testing module with titanium.py run because I also found the same problem with you but for me the build process works fine, only the testing module that throw me the error
Yes, this is what I am now doing to build and test my modules. The commands above replace the call to
titanium.py run
that was used prior to the 3.4.0 SDK.ah ok, so it actually run test the module