Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
android:
runs-on: macos-13
runs-on: macos-15
name: Android
env:
SDK_VERSION: 13.0.0.GA
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
ios:
runs-on: macos-13
runs-on: macos-15
name: iOS
env:
SDK_VERSION: 13.0.0.GA
Expand All @@ -21,7 +21,7 @@ jobs:
# ~/Library/Application Support/Titanium/mobilesdk/osx/<version>/iphone/Frameworks/TitaniumKit.xcframework/ios-arm64/TitaniumKit.framework/Headers/TitaniumKit-Swift.h
#
# An overview of macOS <> Xcode <> Swift versions can be found here: https://developer.apple.com/support/xcode/
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_26.0.app/Contents/Developer
steps:
- uses: actions/checkout@v4

Expand Down
4 changes: 2 additions & 2 deletions android/hooks/tasks/generate-metabase-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const metabase = require('../metabase');
* A task that will generate the Android metabase
*
* This is implemented as a simple base task because the metabase generation
* itself has a caching machanisim, so we just delegate and return the result.
* itself has a caching mechanism, so we just delegate and return the result.
*/
class GenerateMetabaseTask extends BaseFileTask {

Expand Down Expand Up @@ -52,7 +52,7 @@ class GenerateMetabaseTask extends BaseFileTask {
}

/**
* Gets the generated metabse
* Gets the generated metabase
*
* @return {Object} Metabase object
*/
Expand Down
8 changes: 4 additions & 4 deletions android/hooks/tasks/generate-sources-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GenerateSourcesTask extends IncrementalFileTask {
}

/**
* Metabase that will be used to genrate the warpper files
* Metabase that will be used to generate the wrapper files
*
* @return {Object} Metabase object
*/
Expand Down Expand Up @@ -84,7 +84,7 @@ class GenerateSourcesTask extends IncrementalFileTask {
}

/**
* Does a full task run, wich will generate the Hyperloop wrapper for every
* Does a full task run, which will generate the Hyperloop wrapper for every
* referenced Java class
*
* @return {Promise}
Expand Down Expand Up @@ -149,7 +149,7 @@ class GenerateSourcesTask extends IncrementalFileTask {
}

/**
* Removes any unused class wrappers from the output directoy
* Removes any unused class wrappers from the output directory
*
* @param {Array.<String>} classesToRemove Array of class names
* @return {Promise}
Expand Down Expand Up @@ -259,7 +259,7 @@ class GenerateSourcesTask extends IncrementalFileTask {
/**
* Loads the class list used in incremental task runs
*
* @return {Promise<Boolean>} True if the files was loaded succesfully, false if not
* @return {Promise<Boolean>} True if the files was loaded successfully, false if not
*/
async loadClassList() {
try {
Expand Down
2 changes: 1 addition & 1 deletion documentation/ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ module.exports = {
};
```

Any `flags` added to the `xcodebuild` property will be passed to `xcodebuild`. Any `frameworks` in the array provided will be automatically added to the xcode project. _Note: any referenced frameworks in your Hyperloop code are automatically added for you. However, this gives you even more control to custom your compile environment._
Any `flags` added to the `xcodebuild` property will be passed to `xcodebuild`. Any `frameworks` in the array provided will be automatically added to the Xcode project. _Note: any referenced frameworks in your Hyperloop code are automatically added for you. However, this gives you even more control to custom your compile environment._

### Adding a third-party framework

Expand Down
4 changes: 2 additions & 2 deletions hooks/hyperloop-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ class HyperloopBuilderFactory {
* @return {Object} Object with loaded config values
*/
loadConfiguration() {
const possibleConfigurtionFiles = [
const possibleConfigurationFiles = [
path.join(this.builder.projectDir, 'appc.js'),
path.join(this.builder.projectDir, '.appc.js'),
path.join(process.env.HOME || process.env.USERPROFILE, '.appc.js')
];
let config = {};

for (let configurationFile of possibleConfigurtionFiles) {
for (let configurationFile of possibleConfigurationFiles) {
if (fs.existsSync(configurationFile)) {
this.mergeObjectProperties(config, require(configurationFile));
}
Expand Down
2 changes: 1 addition & 1 deletion iphone/hooks/generate/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function makeClass(json, cls, state) {
* - The default Objective-C class name
* - The mangled class name for Swift classes
* - A combination of FrameworkName.ClassName for Objective-C classes that were
* impported from the Objective-C interface header of a Swift module.
* imported from the Objective-C interface header of a Swift module.
*
* @param {Object} cls Class metadata object
* @param {Object} state Parser state
Expand Down
6 changes: 3 additions & 3 deletions iphone/hooks/generate/code-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CodeGenerator {
*
* @param {Object} sourceSet Set of source info objects passed to template files
* @param {Object} modules Map of module info objects
* @param {Object} iosBuilder iOS bulder instance
* @param {Object} iosBuilder iOS builder instance
*/
constructor(sourceSet, modules, iosBuilder) {
this.sourceSet = sourceSet;
Expand Down Expand Up @@ -285,7 +285,7 @@ class CodeGenerator {
/**
* Fixes custom module imports to use the correct framework header.
*
* Prior to dynamic framework support framework includes were simply genrated
* Prior to dynamic framework support framework includes were simply generated
* by assuming their umbrella header name. Dynamic frameworks that are written
* in Swift provide an ObjC interface header which requires a different header
* resolution. It is easier to fix this here afterwards than to do it in the
Expand Down Expand Up @@ -321,7 +321,7 @@ class CodeGenerator {
* header imports.
*
* Prior to this we would simply assume umbrella headers as Framework/Framework.h,
* which is a best practive though, but not every framework sticks to this.
* which is a best practice though, but not every framework sticks to this.
*
* Utilizes the frameworks metadata to read the umbrella header from a framework's
* module map or falls back to the old naming scheme.
Expand Down
30 changes: 15 additions & 15 deletions iphone/hooks/generate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,37 +79,37 @@ function processProtocolInheritance(protocols) {
* Recursively merges a protocol with all it's inherited protocols
*
* @param {Object} protocol A protocol
* @param {Number} logIntendationLevel Intendation level for debugging messages
* @param {Number} logIndentationLevel Indentation level for debugging messages
*/
function mergeWithParentProtocols(protocol, logIntendationLevel) {
var logIntendationCharacter = ' ';
var logIntendation = logIntendationCharacter.repeat(logIntendationLevel++);
function mergeWithParentProtocols(protocol, logIndentationLevel) {
var logIndentationCharacter = ' ';
var logIndentation = logIndentationCharacter.repeat(logIndentationLevel++);
var parentProtocols = protocol.protocols;
var protocolSignature = parentProtocols ? protocol.name + ' <' + parentProtocols.join(', ') + '>' : protocol.name;
util.logger.trace(logIntendation + 'Processing inherited protocols of ' + protocolSignature);
logIntendation = logIntendationCharacter.repeat(logIntendationLevel);
util.logger.trace(logIndentation + 'Processing inherited protocols of ' + protocolSignature);
logIndentation = logIndentationCharacter.repeat(logIndentationLevel);

if (mergedProtocols.indexOf(protocol.name) !== -1) {
util.logger.trace(logIntendation + protocol.name + ' was already merged with all protocols it inherits from.');
util.logger.trace(logIndentation + protocol.name + ' was already merged with all protocols it inherits from.');
return;
}
if (!parentProtocols) {
util.logger.trace(logIntendation + protocol.name + ' does not inherit from any other protocols.');
util.logger.trace(logIndentation + protocol.name + ' does not inherit from any other protocols.');
mergedProtocols.push(protocol.name);
return;
}

util.logger.trace(logIntendation + 'Iterating over inherited protocols of ' + protocol.name);
logIntendationLevel++;
util.logger.trace(logIndentation + 'Iterating over inherited protocols of ' + protocol.name);
logIndentationLevel++;
protocol.protocols.forEach(function (parentProtocolName) {
if (protocol.name === parentProtocolName) {
util.logger.trace(logIntendation + 'Invalid protocol meta information. ' + protocol.name.red + ' cannot have itself as parent, skipping.');
util.logger.trace(logIndentation + 'Invalid protocol meta information. ' + protocol.name.red + ' cannot have itself as parent, skipping.');
return;
}
var parentProtocol = protocols[parentProtocolName];
mergeWithParentProtocols(parentProtocol, logIntendationLevel);
mergeWithParentProtocols(parentProtocol, logIndentationLevel);

util.logger.trace(logIntendation + 'Merging ' + parentProtocol.name.cyan + ' => ' + protocol.name.cyan);
util.logger.trace(logIndentation + 'Merging ' + parentProtocol.name.cyan + ' => ' + protocol.name.cyan);
protocol.properties = protocol.properties || {};
protocol.methods = protocol.methods || {};
merge(parentProtocol.properties, protocol.properties);
Expand All @@ -121,8 +121,8 @@ function processProtocolInheritance(protocols) {

Object.keys(protocols).forEach(function (protocolName) {
var protocol = protocols[protocolName];
var logIntendationLevel = 0;
mergeWithParentProtocols(protocol, logIntendationLevel);
var logIndentationLevel = 0;
mergeWithParentProtocols(protocol, logIndentationLevel);
});
}

Expand Down
4 changes: 2 additions & 2 deletions iphone/hooks/generate/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,13 +688,13 @@ function generateProp (state, json, prop, readonly, name) {
}

/**
* Generates a view model used in the class template to generate soure
* Generates a view model used in the class template to generate source
* code for class level properties
*
* @param {Object} templateVariables Holds all variable later used in the template
* @param {Object} metabase The complete metabase object
* @param {Object} propertyMeta Meta info for the current property
* @return {Object} View model used inside the class tempalte
* @return {Object} View model used inside the class template
*/
function generateClassProperty(templateVariables, metabase, propertyMeta) {
var viewModel = {name: propertyMeta.name};
Expand Down
18 changes: 9 additions & 9 deletions iphone/hooks/hyperloop.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ HyperloopiOSBuilder.prototype.validate = function validate() {
process.exit(1);
}

// check for min ios version
// check for min iOS version
if (this.appc.version.lt(this.builder.minIosVer, IOS_MIN)) {
this.logger.error('Hyperloop compiler works best with iOS ' + IOS_MIN + ' or greater.');
this.logger.error('Your setting is currently set to: ' + (this.builder.tiapp.ios['min-ios-ver'] || this.builder.minIosVer));
Expand Down Expand Up @@ -460,7 +460,7 @@ HyperloopiOSBuilder.prototype.processJSFile = function processJSFile(obj, source

self.logger.trace('Checking require for: ' + pkg.toLowerCase() + '/' + className.toLowerCase());

// if the framework is not found, then check if it was possibly mispelled
// if the framework is not found, then check if it was possibly misspelled
if (!framework && !isBuiltin) {
const pkgSoundEx = soundEx(pkg);
const maybes = Array.from(self.frameworks.keys()).filter(function (frameworkName) {
Expand Down Expand Up @@ -524,7 +524,7 @@ HyperloopiOSBuilder.prototype.processJSFile = function processJSFile(obj, source
const isBuiltin = pkg === 'Titanium';
const framework = self.frameworks.get(pkg);

// if the framework is not found, then check if it was possibly mispelled
// if the framework is not found, then check if it was possibly misspelled
if (!framework && !isBuiltin) {
const pkgSoundEx = soundEx(pkg);
const maybes = Array.from(self.frameworks.keys()).filter(function (frameworkName) {
Expand Down Expand Up @@ -621,7 +621,7 @@ HyperloopiOSBuilder.prototype.generateSourceFiles = function generateSourceFiles
this.normalizeFrameworks(outfile);
this.determineFrameworkAvailability();
} else {
this.populateFrameworkAvailabiltyFromCache();
this.populateFrameworkAvailabilityFromCache();
}

if (cached && this.swiftSources.length === 0 && !this.forceMetabase) {
Expand Down Expand Up @@ -705,7 +705,7 @@ HyperloopiOSBuilder.prototype.generateSourceFiles = function generateSourceFiles
}, this);
}

// Framwork umbrella headers are required to propery resolve forward declarations
// Framework umbrella headers are required to properly resolve forward declarations
this.frameworks.forEach(frameworkMeta => {
if (!frameworkMeta.umbrellaHeader || !fs.existsSync(frameworkMeta.umbrellaHeader)) {
this.logger.warn(`Unable to detect framework umbrella header for ${frameworkMeta.name}.`);
Expand Down Expand Up @@ -843,7 +843,7 @@ HyperloopiOSBuilder.prototype.determineFrameworkAvailability = function determin
* This only needs to be done in the main frameworks property since all other
* Maps reference the same metadata objects.
*/
HyperloopiOSBuilder.prototype.populateFrameworkAvailabiltyFromCache = function populateFrameworkAvailabiltyFromCache() {
HyperloopiOSBuilder.prototype.populateFrameworkAvailabilityFromCache = function populateFrameworkAvailabilityFromCache() {
const cachePathAndFilename = path.join(this.hyperloopBuildDir, 'metadata-framework-availability.json');
let availabilityMap = {};
try {
Expand Down Expand Up @@ -1098,7 +1098,7 @@ HyperloopiOSBuilder.prototype.updateXcodeProject = function updateXcodeProject()
if (this.systemFrameworks.has(frameworkName)) {
frameworksToAdd.push(this.systemFrameworks.get(frameworkName));
} else {
this.logger.error(`Unable to link against non-existing system framework "${frameworkName}". Please check your appc.js configurtion.`);
this.logger.error(`Unable to link against non-existing system framework "${frameworkName}". Please check your appc.js configuration.`);
process.exit(1);
}
}, this);
Expand Down Expand Up @@ -1240,7 +1240,7 @@ HyperloopiOSBuilder.prototype.updateXcodeProject = function updateXcodeProject()
}, this);
}

// add the source files to xcode to compile
// add the source files to Xcode to compile
if (nativeModules.length) {
groups['Native'] || (groups['Native'] = {});
nativeModules.forEach(function (mod) {
Expand Down Expand Up @@ -1426,7 +1426,7 @@ HyperloopiOSBuilder.prototype.hasCustomShellScriptBuildPhases = function hasCust
* @param {Object} data - The hook payload.
*/
HyperloopiOSBuilder.prototype.hookRemoveFiles = function hookRemoveFiles(data) {
// remove empty Framework directory that might have been created by cocoapods
// remove empty Framework directory that might have been created by CocoaPods
var frameworksDir = path.join(this.builder.xcodeAppDir, 'Frameworks');
if (fs.existsSync(frameworksDir) && fs.readdirSync(frameworksDir).length === 0) {
fs.removeSync(frameworksDir);
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
"version": "8.0.0",
"description": "Access native APIs from within Titanium.",
"keywords": [
"appcelerator",
"titanium",
"hyperloop",
"android",
"ios",
"windows"
"ios"
],
"author": "Jeff Haynie",
"contributors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor,
const char *name);

/**
* Sets the umbrealla header name that the module.map describes.
* Sets the umbrella header name that the module.map describes.
* \returns 0 for success, non-zero to indicate an error.
*/
CINDEX_LINKAGE enum CXErrorCode
Expand Down
Loading