Skip to content

Commit 7949c2d

Browse files
committed
Merge pull request #430 from NativeScript/buhov/remove-metadata-generation-on-library-add
Remove metadata generation on library add
2 parents 6402f61 + 79915a4 commit 7949c2d

File tree

3 files changed

+0
-37
lines changed

3 files changed

+0
-37
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ If you have installed Chocolatey, you can complete these steps to set up JDK, Ap
141141
* For iOS development
142142
* [Latest Xcode][12]
143143
* [Xcode command-line tools][12]
144-
* (Optional for working with third-party libraries) [64-bit Mono][Mono] installed via Homebrew
145144
* For Android development
146145
* [JDK 7][JDK 7] or a later stable official release
147146
* [Apache Ant 1.8][Apache Ant 1.8] or a later stable official release
@@ -531,4 +530,3 @@ This software is licensed under the Apache 2.0 license, quoted <a href="LICENSE"
531530
[Apache Ant 1.8]: http://ant.apache.org/bindownload.cgi
532531
[Android SDK 19]: http://developer.android.com/sdk/index.html
533532
[Genymotion]: https://www.genymotion.com/#!/
534-
[Mono]: http://www.mono-project.com

docs/man_pages/lib-management/library-add.md

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ Before adding a framework, verify that your project meets the following requirem
3434

3535
Before adding an iOS framework, verify that your system and the framework meets the following requirements.
3636

37-
* You have installed Mono using Homebrew.
3837
* You have Xcode 6 and the iOS 8.0 SDK installed.
3938
* The framework is a Cocoa Touch Framework with all build architectures enabled.
4039
* If the framework relies on other third-party frameworks, make sure to add these frameworks manually as well.

lib/services/ios-project-service.ts

-34
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,6 @@ class IOSProjectService implements IPlatformProjectService {
174174
this.$fs.ensureDirectoryExists(targetPath).wait();
175175
shell.cp("-R", libraryPath, targetPath);
176176

177-
this.generateFrameworkMetadata(platformData.projectRoot, targetPath, frameworkName, umbrellaHeader).wait();
178-
179177
var pbxProjPath = path.join(platformData.projectRoot, this.$projectData.projectName + ".xcodeproj", "project.pbxproj");
180178
var project = new xcode.project(pbxProjPath);
181179
project.parseSync();
@@ -257,38 +255,6 @@ class IOSProjectService implements IPlatformProjectService {
257255
}).future<string>()();
258256
}
259257

260-
private generateFrameworkMetadata(projectRoot: string, frameworkDir: string, frameworkName: string, umbrellaHeader: string): IFuture<void> {
261-
return (() => {
262-
if (!this.$fs.exists("/usr/local/lib/libmonoboehm-2.0.1.dylib").wait()) {
263-
this.$errors.failWithoutHelp("NativeScript needs Mono 3.10 or newer installed in /usr/local");
264-
}
265-
266-
var yamlOut = path.join(frameworkDir, "Metadata");
267-
this.$fs.createDirectory(yamlOut).wait();
268-
269-
var tempHeader = path.join(yamlOut, "Metadata.h");
270-
this.$fs.writeFile(tempHeader, util.format("#import <%s/%s>", frameworkName, umbrellaHeader)).wait();
271-
272-
this.$logger.info("Generating metadata for %s.framework. This can take a minute.", frameworkName);
273-
var sdkPath = this.$childProcess.exec("xcrun -sdk iphoneos --show-sdk-path").wait().trim();
274-
// MetadataGenerator P/Invokes libclang.dylib, so we need to instruct the Mach-O loader where to find it.
275-
// Without this Mono will fail with a DllNotFoundException.
276-
// Once the MetadataGenerator is rewritten in C++ and starts linking Clang statically, this will become superfluous.
277-
var generatorExecOptions = {
278-
env: {
279-
DYLD_FALLBACK_LIBRARY_PATH: this.$childProcess.exec("xcode-select -p").wait().trim() + "/Toolchains/XcodeDefault.xctoolchain/usr/lib"
280-
}
281-
};
282-
this.$childProcess.exec(util.format('%s/Metadata/MetadataGenerator -s %s -u %s -o %s -cflags="-F%s"', projectRoot, sdkPath, tempHeader, yamlOut, frameworkDir), generatorExecOptions).wait();
283-
284-
var metadataFileName = frameworkName + ".yaml";
285-
this.$fs.copyFile(path.join(yamlOut, "Metadata-armv7", metadataFileName), path.join(projectRoot, "Metadata", "Metadata-armv7", metadataFileName)).wait();
286-
this.$fs.copyFile(path.join(yamlOut, "Metadata-arm64", metadataFileName), path.join(projectRoot, "Metadata", "Metadata-arm64", metadataFileName)).wait();
287-
288-
this.$fs.deleteDirectory(yamlOut).wait();
289-
}).future<void>()();
290-
}
291-
292258
private replaceFileContent(file: string): IFuture<void> {
293259
return (() => {
294260
var fileContent = this.$fs.readText(file).wait();

0 commit comments

Comments
 (0)