Skip to content

Error when we are publishing to AppStore #3470

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

Closed
nuno-morais opened this issue Mar 17, 2018 · 8 comments
Closed

Error when we are publishing to AppStore #3470

nuno-morais opened this issue Mar 17, 2018 · 8 comments
Assignees
Milestone

Comments

@nuno-morais
Copy link

Tell us about the problem

When I run the following command: tns publish ios <Apple ID> <Password> <Mobile Provisioning Profile Identifier> <Code Sign Identity>
an error is thrown:

Exported <ProjectName>.xcarchive to: /Users/nunomorais/Projects/<ProjectName>/platforms/ios/build/device
Project successfully built.
Invalid binary plist. Expected 'bplist' at offset 0.

I've already tryed to publish by Sidekick but the error is not clear too.

[18-03-17 16:03:40.989] Publishing failed.
[!] The request could not be completed because:, Error: Publishing failed.
[!] The request could not be completed because:
at CloudPublishService.getiOSError (/Users/nunomorais/.local/share/.nativescript-cli/extensions/node_modules/nativescript-cloud/lib/services/cloud-publish-service.js:79:21)
at CloudPublishService.<anonymous> (/Users/nunomorais/.local/share/.nativescript-cli/extensions/node_modules/nativescript-cloud/lib/services/cloud-publish-service.js:103:29)
at Generator.next (<anonymous>)
at fulfilled (/Users/nunomorais/.local/share/.nativescript-cli/extensions/node_modules/nativescript-cloud/lib/services/cloud-publish-service.js:4:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.4.3
  • Cross-platform modules: 3.4.1
  • Runtime(s): 3.4.1
  • Plugin(s):
"dependencies": {
    "@angular/animations": "~5.2.9",
    "@angular/common": "~5.2.9",
    "@angular/compiler": "~5.2.9",
    "@angular/core": "~5.2.9",
    "@angular/forms": "~5.2.9",
    "@angular/http": "~5.2.9",
    "@angular/platform-browser": "~5.2.9",
    "@angular/platform-browser-dynamic": "~5.2.9",
    "@angular/router": "~5.2.9",
    "moment": "^2.21.0",
    "nativescript-angular": "~5.2.0",
    "nativescript-background-http": "^3.2.1",
    "nativescript-camera": "^4.0.0",
    "nativescript-drop-down": "^3.2.1",
    "nativescript-imagecropper": "^0.1.2",
    "nativescript-imagepicker": "~4.0.1",
    "nativescript-iqkeyboardmanager": "^1.3.0",
    "nativescript-localstorage": "^1.1.5",
    "nativescript-plugin-firebase": "^5.1.8",
    "nativescript-pro-ui": "3.4.1",
    "nativescript-socket.io": "^0.9.0",
    "nativescript-swift-3.0": "^1.0.0",
    "nativescript-theme-core": "~1.0.2",
    "nativescript-toolbox": "^3.0.1",
    "nativescript-uuid": "0.0.1",
    "reflect-metadata": "~0.1.12",
    "rxjs": "~5.5.7",
    "tns-core-modules": "^3.4.1",
    "ts-events": "^3.2.0",
    "zone.js": "~0.8.20"
  },
  "devDependencies": {
    "@types/node": "^9.4.7",
    "babel-traverse": "6.26.0",
    "babel-types": "6.26.0",
    "babylon": "6.18.0",
    "lazy": "1.0.11",
    "nativescript-dev-less": "0.0.11",
    "nativescript-dev-typescript": "~0.6.0",
    "typescript": "~2.7.2"
  }

Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleDisplayName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundleExecutable</key>
	<string>${EXECUTABLE_NAME}</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1.0</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIRequiresFullScreen</key>
	<true/>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UIBackgroundModes</key>
	<array>
		<string>remote-notification</string>
	</array>
</dict>
</plist>

.entitlements:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>aps-environment</key>
        <string>development</string>
        <key>com.apple.keystore.access-keychain-keys</key>
        <true/>
        <key>com.apple.keystore.device</key>
        <true/>
</dict>
</plist>

build.xcconfig:

// You can add custom settings here
// for example you can uncomment the following line to force distribution code signing
// CODE_SIGN_IDENTITY = iPhone Distribution
// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
DEVELOPMENT_TEAM = *6*******;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
TARGETED_DEVICE_FAMILY = 1;
// IPHONEOS_DEPLOYMENT_TARGET = 8.0;
CODE_SIGN_ENTITLEMENTS = <AppName>/<AppName>.entitlements
@NickIliev
Copy link
Contributor

+1 from #3479

@nmongiya
Copy link

+1

@NickIliev
Copy link
Contributor

@elimin8r @nmongiya @xnramx @dbay920 are you guys hitting this issue with previous versions of NativeScript?

@elimin8r @nmongiya if possible, please provide more details about your cases - including the exact command used to build the release IPA and the used versions of NativeScript CLI, tns-ios and all dependencies.

@nuno-morais
Copy link
Author

nuno-morais commented Mar 23, 2018

I did a workaround...

  • remove platforms
  • tns prepare ios --bundle --provision "$PROVISION" --release --env.uglify (or tns prepare ios --release without webpack)
  • Open the TeleHealth.xcworkspace
  • Build with xcode
  • Product -> Archive

If any error occurs the xcode will give you more information.

@nuno-morais
Copy link
Author

nuno-morais commented Mar 23, 2018

@NickIliev I only tryed to publish with this NS version.

@rosen-vladimirov rosen-vladimirov added this to the 4.0.0 milestone Mar 26, 2018
Fatme added a commit to telerik/mobile-cli-lib that referenced this issue Mar 27, 2018
In case when produced Info.plist is not a binary file, `tns publish ios` command fails because `bplist-parser` is not able to parse non-binary plist files. This PR replaces `bplist-parser` module with `sample-plist` that is able to parse binary and non-binary files.

Fixes NativeScript/nativescript-cli#3470
Fatme added a commit that referenced this issue Mar 27, 2018
In case when produced Info.plist is not a binary file, `tns publish ios` command fails because `bplist-parser` is not able to parse non-binary plist files. This PR replaces `bplist-parser` module with `sample-plist` that is able to parse binary and non-binary files.

Fixes #3470
@Fatme
Copy link
Contributor

Fatme commented Mar 27, 2018

Hi guys,

We've investigated the error from tns publish ios command and found the problem. The fix is already merged. You can use npm i -g nativescript@rc command to install the rc version of nativescript and try the fix on your side.

@dtopuzov
Copy link
Contributor

dtopuzov commented Apr 3, 2018

@xnramx @nmongiya @elimin8r Did you had a change to try nativescript@rc and can you confirm it fix the problem?

@dtopuzov
Copy link
Contributor

dtopuzov commented Apr 4, 2018

Will be shipped officially with 4.0 next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants