Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18193] iOS: 64-bit Platform reports wrong value for iOS

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-01-07T06:38:04.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.5.0, Release 4.0.0
ComponentsiOS
Labelsqe-automatedtest
ReporterJeff Haynie
AssigneeJon Alter
Created2014-12-12T16:31:10.000+0000
Updated2015-07-29T00:06:20.000+0000

Description

We hard coded 32-bit. Need to make this based on whether we are building for 64-bit or 32-bit. https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/PlatformModule.m#L39

Comments

  1. Tim Poulsen 2014-12-12

    Since we need to determine whether we're building for 32-bit or 64-bit to resolve this ticket, that target should be exposed so that the CLI can check. This would give us a non-hooks way of resolving TIMOB-18176 and TIMOB-18168.
  2. Jeff Haynie 2014-12-12

    since 64-bit is required going forward, maybe it's as easy as just hardcoding to 64-bit?
  3. Tim Poulsen 2014-12-12

    Would hard-coding 64-bit prevent developers form including both 32-bit and 64-bit builds in an app (to support pre-iOS8 devices)?
  4. Jon Alter 2014-12-12

    PRs

    master: https://github.com/appcelerator/titanium_mobile/pull/6475 3_5_X: https://github.com/appcelerator/titanium_mobile/pull/6476

    Test case:

    Run the code below

    Tap on the window and the correct ostype and architecture for your device/sim should be printed in the log

       var win = Ti.UI.createWindow({
           backgroundColor: 'blue'
       });
       win.open();
       win.addEventListener('click', function(e) {
           console.log('ostype: ' + Ti.Platform.ostype);
           console.log('architecture: ' + Ti.Platform.architecture);
       });
       
  5. Ewan Harris 2015-01-07

    Reopening ticket as when using the following configuration with the above code, Ti.Platform.ostype returns 32bit which is incorrect. Mac OSX 10.10.1 Appcelerator Studio, build: 3.4.1.201410281743 Titanium SDK build: 3.5.0.v20150106102524 Titanium CLI, build: 3.4.1 Alloy: 1.5.1 Xcode 6.1.1 iPhone 6 Plus (8.1)
  6. Jon Alter 2015-01-07

    PRs

    master: https://github.com/appcelerator/titanium_mobile/pull/6545 3_5_X: https://github.com/appcelerator/titanium_mobile/pull/6544

    To Test:

    1. From Studio or using the CLI, build an app for device (that is 64bit) using the example code above 2. You should see the following statements in the log
       [INFO]  ostype: 64bit
       [INFO]  architecture: arm64
       
  7. Chee Kiat Ng 2015-01-07

    Both PRs tested with iPhone 5s, iPhone 4, iPhone 6, and iPad 2. Looks good. PRs merged.
  8. Ewan Harris 2015-01-07

    Verified fix on: Mac OSX 10.10.1 Appcelerator Studio, build: 3.4.1.201410281743 Titanium SDK build: 3.5.0.v20150106224118 Titanium CLI, build: 3.4.1 Alloy: 1.5.1 Xcode 6.1.1 And the devices below Devices give the following output ||Device and iOS Version||osType||architecture||Correct|| |iPhone 4 - 7.0.6|32 Bit|armv7|(/)| |iPhone 4s - 8.1.1|32 Bit|armv7|(/)| |iPhone 5 - 8.1|32 Bit|armv7|(/)| |iPhone 5s - 8.0.2|64 Bit|arm64|(/)| |iPhone 6 - 8.1|64 Bit|arm64|(/)| |iPhone 6 Plus - 8.1.1|64 Bit|arm64|(/)| |iPad 4 - 8.0.2|32 Bit|armv7|(/)| |iPad Air - 7.0.3|64 Bit|arm64|(/)| |iPad Air 2 - 8.2b3|64 Bit|arm64|(/)| |iPad Mini- 7.0.3 |32 Bit|armv7|(/)| |iPad Mini 2 8.1.1|32 Bit|armv7|(/)| When running *xcrun lipo -info * on the binary within the .app file the following was output in the terminal *Architectures in the fat file: Test are: armv7 arm64* Simulators give the following ouput ||Simulator and iOS Version||osType||architecture||Correct|| |iPhone 4s, iPhone 5 , iPad 2 and iPad Retina - 8.1|32 Bit|i386|(/)| |iPhone 5s, iPhone 6 Plus, iPhone 6 and iPad Air - 8.1|64 Bit|x86_64|(/)| Closing ticket.

JSON Source