Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23144] Fixed crash on device and swift code compiler for device #12

Closed
wants to merge 3 commits into from
Closed

[TIMOB-23144] Fixed crash on device and swift code compiler for device #12

wants to merge 3 commits into from

Conversation

pec1985
Copy link
Contributor

@pec1985 pec1985 commented Apr 4, 2016

// the device build needs to know the target for the ast-dump
if (sdkPath.indexOf('Simulator') == -1) {
args.push('-target');
args.push('armv7-apple-ios7.1');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to find a way to get the target more generically, the rest looks great!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pec1985 This is not going to be easy, but here's the best approach so far:
From what i understand, there's only 3 possible options for target:
arm64-apple-ios<deployment version> ,armv7-apple-ios<deployment version>, armv7s-apple-ios<deployment version>
in this case, deployment version relates to our minVersion, which is '7.1' and can be obtained here inside metadata.
https://github.com/appcelerator/hyperloop.next/blob/master/iphone/plugin/hyperloop.js#L498

So my suggestion is instead of searching for the string 'simulator' you should be looking at metadata.sdkType, and do a string combination of arm64-apple-ios<metadata.minVersion>

Reference link: https://marc.ttias.be/swift-users/2016-02/msg00277.php

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another reason why we should NOT hard code 7.1
https://jira.appcelerator.org/browse/TIMOB-23172

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have the Hyperloop CLI plugin pass the Xcode version in. From the iOS Hyperloop build implementation, you have this.builder which is the Titanium iOS build state. There's a property called xcodeEnv on the builder object that contains the info for the selected Xcode used to build. Just pass this.builder.xcodeEnv.version into the metabase call.

Note that this is probably in the format X.Y, but not guaranteed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, just tested. It returns 7.3.

@cheekiatng
Copy link
Contributor

Closing PR since the issues here were already addressed in other tickets

@cheekiatng cheekiatng closed this May 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants