-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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-23136] iOS: Deprecate TiJSCore / Kroll-Thread #9237
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,27 +49,37 @@ var platformsRegExp = /^(android|ios|iphone|ipad|mobileweb|blackberry|windows|ti | |
function iOSBuilder() { | ||
Builder.apply(this, arguments); | ||
|
||
// the minimum supported iOS SDK required when building | ||
this.minSupportedIosSdk = parseInt(version.parseMin(this.packageJson.vendorDependencies['ios sdk'])); | ||
|
||
// the maximum supported iOS SDK required when building | ||
this.maxSupportedIosSdk = parseInt(version.parseMax(this.packageJson.vendorDependencies['ios sdk'])); | ||
|
||
// object mapping the build-targets to their deploy-types | ||
this.deployTypes = { | ||
'simulator': 'development', | ||
'device': 'test', | ||
'dist-appstore': 'production', | ||
'dist-adhoc': 'production' | ||
}; | ||
|
||
// list of available build-targets | ||
this.targets = ['simulator', 'device', 'dist-appstore', 'dist-adhoc']; | ||
|
||
// object of device families to map the --device-family parameter to the | ||
// native TARGETED_DEVICE_FAMILY build-setting | ||
this.deviceFamilies = { | ||
iphone: '1', | ||
ipad: '2', | ||
universal: '1,2', | ||
watch: '4' | ||
}; | ||
|
||
// device-family set by the --device-family parameter | ||
this.deviceFamily = null; | ||
|
||
// blacklisted files and directories that throw an error when used and will | ||
// lead to a rejection when submitted | ||
this.blacklistDirectories = [ | ||
'contents', | ||
'resources', | ||
|
@@ -85,20 +95,26 @@ function iOSBuilder() { | |
'hyperloop' | ||
]; | ||
|
||
// graylisted directories that throw a warning when used and may lead to a | ||
// rejection when submitted | ||
this.graylistDirectories = [ | ||
'frameworks' | ||
]; | ||
|
||
// templates-directory to render the ApplicationRouting.m into | ||
this.templatesDir = path.join(this.platformPath, 'templates', 'build'); | ||
|
||
// object of all used Titanium symbols, used to determine preprocessor statements, e.g. USE_TI_UIWINDOW | ||
this.tiSymbols = {}; | ||
|
||
// when true, uses the JavaScriptCore that ships with iOS instead of the original Titanium version | ||
this.useJSCore = false; | ||
this.useJSCore = true; | ||
|
||
// when false, JavaScript will run on its own thread - the Kroll Thread | ||
this.runOnMainThread = false; | ||
this.runOnMainThread = true; | ||
|
||
this.useAutoLayout = false; | ||
|
||
// populated the first time getDeviceInfo() is called | ||
this.deviceInfoCache = null; | ||
|
||
|
@@ -2269,19 +2285,30 @@ iOSBuilder.prototype.initialize = function initialize() { | |
this.currentBuildManifest.encryptJS = !!this.encryptJS | ||
this.currentBuildManifest.showErrorController = this.showErrorController | ||
|
||
// This is default behavior for now. Move this to true in phase 2. | ||
// Remove the debugHost/profilerHost check when we have debugging/profiling support with JSCore framework | ||
// TIMOB-17892 | ||
this.currentBuildManifest.useJSCore = this.useJSCore = !this.debugHost && !this.profilerHost && (this.tiapp.ios['use-jscore-framework'] || false); | ||
// Remove this check on 6.0.0 | ||
// Use native JSCore by default (TIMOB-23136) | ||
this.currentBuildManifest.useJSCore = this.useJSCore = !this.debugHost && !this.profilerHost && (this.tiapp.ios['use-jscore-framework'] || true); | ||
|
||
// Remove this check on 7.0.0 | ||
if (this.tiapp.ios && (this.tiapp.ios.hasOwnProperty('run-on-main-thread'))) { | ||
this.logger.info(__('run-on-main-thread no longer set in the <ios> section of the tiapp.xml. Use <property name="run-on-main-thread" type="bool">true</property> instead')); | ||
this.logger.warn(__('run-on-main-thread no longer set in the <ios> section of the tiapp.xml. Use <property name="run-on-main-thread" type="bool">true</property> instead')); | ||
this.currentBuildManifest.runOnMainThread = this.runOnMainThread = (this.tiapp.ios['run-on-main-thread'] === true); | ||
} else { | ||
this.currentBuildManifest.runOnMainThread = this.runOnMainThread = (this.tiapp.properties && this.tiapp.properties.hasOwnProperty('run-on-main-thread') && this.tiapp.properties['run-on-main-thread'].value || false); | ||
} | ||
this.currentBuildManifest.useAutoLayout = this.useAutoLayout = this.tiapp.ios && (this.tiapp.ios['use-autolayout'] === true); | ||
|
||
// Deprecate TiJSCore and leave a warning if used anyway | ||
if (!this.useJSCore) { | ||
this.logger.warn(__('Titanium 7.0.0 deprecates the legacy JavaScriptCore library in favor of the built-in JavaScriptCore'.)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Period at the end of the line is in the wrong place:
should be
|
||
this.logger.warn(__('The legacy JavaScriptCore library will be removed in Titanium SDK 8.0.0.')); | ||
} | ||
|
||
// Deprecate KrollThread and leave a warning if used anyway | ||
if (!this.runOnMainThread) { | ||
this.logger.warn(__('Titanium 7.0.0 deprecates the legacy UI-execution on Kroll-Thread in favor of the Main-Thread.')); | ||
this.logger.warn(__('The legacy execution will be removed in Titanium SDK 8.0.0.')); | ||
} | ||
|
||
this.moduleSearchPaths = [ this.projectDir, appc.fs.resolvePath(this.platformPath, '..', '..', '..', '..') ]; | ||
if (this.config.paths && Array.isArray(this.config.paths.modules)) { | ||
this.moduleSearchPaths = this.moduleSearchPaths.concat(this.config.paths.modules); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The check is wrong. Try: