-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
# Conflicts: # iphone/titanium/HyperloopModule.m
// 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'); |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
Closing PR since the issues here were already addressed in other tickets |
https://jira.appcelerator.org/browse/TIMOB-23144