Skip to content

Fix (publish): Remove binary-plist and use simple-plist instead #3490

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

Merged
merged 1 commit into from
Mar 27, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/definitions/simple-plist.d.ts

This file was deleted.

4 changes: 2 additions & 2 deletions lib/services/ios-project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import * as plist from "plist";
import { IOSProvisionService } from "./ios-provision-service";
import { IOSEntitlementsService } from "./ios-entitlements-service";
import { XCConfigService } from "./xcconfig-service";
import * as simplePlist from "simple-plist";
import * as mobileprovision from "ios-mobileprovision-finder";
import { SpawnOptions } from "child_process";
import { BUILD_XCCONFIG_FILE_NAME } from "../constants";
Expand Down Expand Up @@ -51,6 +50,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
private $xcode: IXcode,
private $iOSEntitlementsService: IOSEntitlementsService,
private $platformEnvironmentRequirements: IPlatformEnvironmentRequirements,
private $plistParser: IPlistParser,
private $sysInfo: ISysInfo,
private $xCConfigService: XCConfigService) {
super($fs, $projectDataService);
Expand Down Expand Up @@ -1045,7 +1045,7 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f
this.$errors.failWithoutHelp("The bundle at %s does not contain an Info.plist file.", libraryPath);
}

const plistJson = simplePlist.readFileSync(infoPlistPath);
const plistJson = this.$plistParser.parseFileSync(infoPlistPath);
const packageType = plistJson["CFBundlePackageType"];

if (packageType !== "FMWK") {
Expand Down
6 changes: 3 additions & 3 deletions lib/services/itmstransporter-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class ITMSTransporterService implements IITMSTransporterService {
private _itunesConnectApplications: IiTunesConnectApplication[] = null;
private _bundleIdentifier: string = null;

constructor(private $bplistParser: IBinaryPlistParser,
constructor(private $plistParser: IPlistParser,
private $childProcess: IChildProcess,
private $errors: IErrors,
private $fs: IFileSystem,
Expand Down Expand Up @@ -135,8 +135,8 @@ export class ITMSTransporterService implements IITMSTransporterService {
}
const appFile = path.join(payloadDir, allApps[0]);

const plistObject = await this.$bplistParser.parseFile(path.join(appFile, INFO_PLIST_FILE_NAME));
const bundleId = plistObject && plistObject[0] && plistObject[0].CFBundleIdentifier;
const plistObject = await this.$plistParser.parseFile(path.join(appFile, INFO_PLIST_FILE_NAME));
const bundleId = plistObject && plistObject.CFBundleIdentifier;
if (!bundleId) {
this.$errors.failWithoutHelp(`Unable to determine bundle identifier from ${ipaFileFullPath}.`);
}
Expand Down
5 changes: 0 additions & 5 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
],
"dependencies": {
"@types/ora": "1.3.2",
"bplist-parser": "0.1.0",
"bufferpack": "0.0.6",
"byline": "4.2.1",
"chalk": "1.1.0",
Expand Down
1 change: 1 addition & 0 deletions test/ios-project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function createTestInjector(projectPath: string, projectName: string): IInjector
testInjector.register("settingsService", SettingsService);
testInjector.register("httpClient", {});
testInjector.register("platformEnvironmentRequirements", {});
testInjector.register("plistParser", {});

return testInjector;
}
Expand Down