[TIMOB-24180] Hyperloop: iOS - Swift files referencing each other break metabase generation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Hyperloop 2.0.0 |
Fix Version/s | n/a |
Components | Hyperloop, iOS |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Unknown |
Created | 2016-11-29T16:35:13.000+0000 |
Updated | 2018-02-28T19:55:56.000+0000 |
Description
*Steps to reproduce the behavior*
1. Create a new Hyperloop enabled project
2. Add the following sample code under
src
:
MySwift.swift
import Foundation
public class MySwift {
init() {
let test = Test()
}
}
Test.swift
import Foundation
public class Test {
public func sayHello() {
print("Hello")
}
}
3. Add a appc.js
to the project root with the following content:
module.exports = {
type: 'app',
group: 'titanium',
hyperloop: {
ios: {
thirdparty: {
'MyFramework': {
source: ['src'],
header: 'src',
resource: 'src'
}
}
}
}
};
4. Add var MySwift = require('MyFramework/MySwift');
to app/controller/index.js
to trigger Hyperloop's metabase generation
5. Build the project with appc run -p ios
*Actual behavior*
Metabase generation fails with the following error:
[INFO] Generating metabase for swift MyFramework /Users/jvennemann/Development/appc/hyperloop-examples/src/MySwift.swift
[ERROR] /Users/jvennemann/Development/appc/hyperloop-examples/src/MySwift.swift:5:14: error: use of unresolved identifier 'Test'
*Expected behavior*
Metabase generation succeeds and one can reference types from other Swift source files.
No comments