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-20469] Fix build after clean #18

Merged
merged 1 commit into from
Apr 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions iphone/plugin/hyperloop.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,13 @@ HyperloopiOSBuilder.prototype.generateSourceFiles = function generateSourceFiles
* Generates the symbol reference based on the references from the metabase's parser state.
*/
HyperloopiOSBuilder.prototype.generateSymbolReference = function generateSymbolReference() {
var symbolRefFile = path.join(this.hyperloopBuildDir, 'symbol_references.json');
var json = JSON.stringify(this.parserState.getReferences(), null, 2);

if (!this.parserState) {
this.logger.info('Skipping ' + HL + ' generating of symbol references. Empty AST. ');
return;
}
var symbolRefFile = path.join(this.hyperloopBuildDir, 'symbol_references.json'),
json = JSON.stringify(this.parserState.getReferences(), null, 2);
if (!fs.existsSync(symbolRefFile) || fs.readFileSync(symbolRefFile).toString() !== json) {
this.forceStubGeneration = true;
this.logger.trace('Forcing regeneration of wrappers');
Expand All @@ -550,6 +554,11 @@ HyperloopiOSBuilder.prototype.compileResources = function compileResources(callb
* Generates stubs from the metabase.
*/
HyperloopiOSBuilder.prototype.generateStubs = function generateStubs(callback) {

if (!this.parserState) {
this.logger.info('Skipping ' + HL + ' stub generation. Empty AST.');
return callback();
}
if (!this.forceStubGeneration) {
this.logger.debug('Skipping stub generation');
return callback();
Expand Down
4 changes: 3 additions & 1 deletion metabase/ios/lib/generate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ function generateFromJSON (name, dir, json, state, callback, includes) {

// remove these functions for now until we can fix them
['NSLogv', 'NSLog', 'UIApplicationMain'].forEach(function (fn) {
delete json.functions[fn];
if (json.functions) {
delete json.functions[fn];
}
});

// we must have a root object even those this is a protocol and
Expand Down
4 changes: 3 additions & 1 deletion metabase/ios/lib/generate/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ function getResultWrapper (state, json, obj, instance) {
addImport(state, name, struct);
return newPrefix(state, name);
} else {
typedef = json.typedefs[cls];
if (json.typedefs) {
typedef = json.typedefs[cls];
}
if (typedef) {
return getResultWrapper(state, json, typedef, instance);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperloop",
"version": "1.1.2",
"version": "1.1.3",
"description": "Access native APIs from within Titanium.",
"keywords": [
"appcelerator",
Expand Down