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-24198] Force include Foundation framework (2.0.X) #115
Conversation
metabase/ios/lib/metabase.js
Outdated
@@ -178,6 +178,16 @@ function generateMetabase (buildDir, sdk, sdkPath, iosMinVersion, includes, excl | |||
var header = path.join(buildDir, 'metabase-' + iosMinVersion + '-' + sdk + '-' + cacheToken + '.h'); | |||
var outfile = path.join(buildDir, 'metabase-' + iosMinVersion + '-' + sdk + '-' + cacheToken + '.json'); | |||
|
|||
// Foundation header always needs to be included | |||
var absoluteFoundationHeaderRegex = /Foundation\.framework\/Headers\/Foundation\.h$/; | |||
var systemFoundationHeaderRegex = /^[<"]Foundation\/Foundation\.h[<"]$/; |
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 regex matches for some incorrect require-statements. Replace at least the latter <
with >
.
metabase/ios/test/generate_test.js
Outdated
should(instance.className).be.equal('NSString'); | ||
should(instance.$native).be.an.object; | ||
|
||
// ... and if INPreferences is genreated correctly, which does not work without |
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.
Typo in genreated
metabase/ios/test/generate_test.js
Outdated
|
||
// ... and if INPreferences is genreated correctly, which does not work without | ||
// explicitly including Foundation framework | ||
var INPreferences = require(nodePath.join(buildDir, 'intents/inpreferences.js')); |
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.
Do we only run the test with iOS 10+? Otherwise, we need to wrap this out for iOS 9.
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.
These tests are currently not run by the CI build at all and need to be triggered manually, so you have to make sure to run them with Xcode 8 / iOS 10 selected. Most of them are broken anyway and i'll rework them in a separate PR.
CR + FT passed, PR approved! |
JIRA: https://jira.appcelerator.org/browse/TIMOB-24198
Fixes a metabase parsing issue for headers that do not explicitly include the Foundation framework themselves.
2.0.X backport of #114