Skip to content

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

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

Open
PeterStaev opened this issue Nov 16, 2017 · 8 comments
Open

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

PeterStaev opened this issue Nov 16, 2017 · 8 comments

Comments

@PeterStaev
Copy link
Contributor

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 **
@pap5508
Copy link

pap5508 commented Nov 20, 2017

@dtopuzov @PeterStaev : I am getting same error..!! NativeScript/NativeScript#5059

@pap5508
Copy link

pap5508 commented Dec 1, 2017

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

@manijak
Copy link

manijak commented Jan 17, 2018

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.

@jvdonk
Copy link

jvdonk commented Feb 15, 2018

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

@lambourn
Copy link

lambourn commented Feb 16, 2018

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

@toddanglin
Copy link

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*

@lord-zeus
Copy link

lord-zeus commented Jul 4, 2021

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

@sepccom
Copy link

sepccom commented Jan 16, 2023

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

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

10 participants