nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

Export fails when using provisioning in build.xconfig and XCode9.1

Open PeterStaev opened this issue 7 years ago • 8 comments

This is the same problem as #3046 but when using the build.xconfig file to supply provisioning instead of the CLI options. I'm using CLI 3.3 and have the following setup in the build.xconfig

DEVELOPMENT_TEAM = 8S2LJDD3SB;

CODE_SIGN_ENTITLEMENTS = HM4CaregiverApp/Resources/app.entitlements;
CODE_SIGN_IDENTITY = iPhone Distribution;

PROVISIONING_PROFILE[config=Debug] = Caregiver App AdHoc;
PROVISIONING_PROFILE[config=Release] = Caregiver App Store;

ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;

The received error is:

2017-11-16 12:01:50.567 xcodebuild[6524:181614] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/0n/h71pcgm54md26m5mz_mkz4140000gn/T/HM4CaregiverApp_2017-11-16_12-01-50.567.xcdistributionlogs'.
2017-11-16 12:01:51.629 xcodebuild[6524:181614] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fa082a1ffd0>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
    "Error Domain=IDEProvisioningErrorDomain Code=9 \"\"HM4CaregiverApp.app\" requires a provisioning profile with the Push Notifications feature.\" UserInfo={NSLocalizedDescription=\"HM4CaregiverApp.app\" requires a provisioning profile with the Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to the \"provisioningProfiles\" dictionary in your Export Options property list.}"
)}
error: exportArchive: "HM4CaregiverApp.app" requires a provisioning profile with the Push Notifications feature.

Error Domain=IDEProvisioningErrorDomain Code=9 ""HM4CaregiverApp.app" requires a provisioning profile with the Push Notifications feature." UserInfo={NSLocalizedDescription="HM4CaregiverApp.app" requires a provisioning profile with the Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}

** EXPORT FAILED **

PeterStaev avatar Nov 16 '17 10:11 PeterStaev

@dtopuzov @PeterStaev : I am getting same error..!! https://github.com/NativeScript/NativeScript/issues/5059(url)

pap5508 avatar Nov 20 '17 08:11 pap5508

@PeterStaev , @dtopuzov : does this issue is resolved ?

pap5508 avatar Dec 01 '17 12:12 pap5508

Any update on this issue? I keep getting this on a freshly installed MacBookPro with Xcode 9.2 and tns 3.4.

EDIT: Sorry, issue with manual provisioning profiles. Switched to Automatic, and it worked.

manijak avatar Jan 17 '18 20:01 manijak

I'm having the same error when specifying the provisioning profile in the .xcconfig file. When removing the PROVISIONING_PROFILE option from the .xcconfig file and supplying it through the cli with the --provision parameter the build succeeds and exports an .ipa file.

XCode: 9.2 TNS: 3.4.2

jvdonk avatar Feb 15 '18 10:02 jvdonk

same here. And @jvdonk solution does not even work for me.

It feels as if this error is popping up ever so often. Specifically, when not using automatic code signing but manual signing style.

It's not yet clear to me when to set up things in .xcconfig and when not. Right now, I cannot use any of the tns commands to run a build on an iOS device. Only option for now is to open the xcode propject in Xcode directly and run it there... which is kind of annoying as livesync etc. does not work.

Also, I'm not sure if the exportOptions plist file that gets created when excodebuild exports the archive as an deployable IPA is correct.

tns-ios: 3.4.1 NS: 3.4.1 Xcode: 9.2

lambourn avatar Feb 16 '18 14:02 lambourn

Did this ever get resolved or root caused?

It's been a few years, but I'm running in to the same NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list. error using {N} CLI 6.4.1. I didn't have this problem with earlier versions of {N}, so wondering if this is a regression...or if there's something specific that triggers this behavior.

In the meantime, the work around the solves the problem for me is to explicitly pass my provisioning profile UUID on the command line: tns appstore upload --appleApplicationSpecificPassword *APP_PASSWORD* --provision *PROVISIONING_PROFILE_UUID*

toddanglin avatar Mar 10 '20 03:03 toddanglin

ns publish ios --appleApplicationSpecificPassword=xxxx-xxxx-xxx-xx --provision ProvisionName

lord-zeus avatar Jul 04 '21 14:07 lord-zeus

I was having this problem. The temp fix @lord-zeus provided worked, however, will this issue be resolved?

sepccom avatar Jan 16 '23 05:01 sepccom