Xcode 9 Conflicting provisioning settings - ios

I have a nativescript angular app that is showing an error whenever I try to run it on a real IOS device. The app runs fine on an emulator and on android.
The error log is reproduced below. I have tried to use automatically manage signing option in Xcode a suggested in this SO answer. However this does not work and I keep getting the same error.
I also tried building an archive in Xcode. When I try to Export the archive xcode just shuts down with an error.
The error log is as follows:
Xcode build...
2017-10-22 14:14:29.951 xcodebuild[69327:634958] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/73/29kcfd816cd6jbsm48mqkp2r0000gp/T/questNewS_2017-10-22_14-14-29.950.xcdistributionlogs'.
2017-10-22 14:14:34.389 xcodebuild[69327:634958] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-13233/DVTFoundation/DeveloperStructure/DVTPlatformFamily.m:192
Details: Error Domain=DVTMachOErrorDomain Code=1 "Reached end of file while looking for: Mach-O slice." UserInfo={NSLocalizedDescription=Reached end of file while looking for: Mach-O slice., NSLocalizedRecoverySuggestion=}
Object: <NSBundle>
Method: +dvt_platformFamilyForBundleAtPath:error:
Thread: <NSThread: 0x7ff668d15a50>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2017-10-22 14:14:34.510 xcodebuild[69327:634958] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-13233/DVTFoundation/DeveloperStructure/DVTPlatformFamily.m:192
Details: Error Domain=DVTMachOErrorDomain Code=1 "Reached end of file while looking for: Mach-O slice." UserInfo={NSLocalizedDescription=Reached end of file while looking for: Mach-O slice., NSLocalizedRecoverySuggestion=}
Object: <NSBundle>
Method: +dvt_platformFamilyForBundleAtPath:error:
Thread: <NSThread: 0x7ff668d15a50>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2017-10-22 14:14:34.512 xcodebuild[69327:634958] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-13233/DVTFoundation/DeveloperStructure/DVTPlatformFamily.m:192
Details: Error Domain=DVTMachOErrorDomain Code=1 "Reached end of file while looking for: Mach-O slice." UserInfo={NSLocalizedDescription=Reached end of file while looking for: Mach-O slice., NSLocalizedRecoverySuggestion=}
Object: <NSBundle>
Method: +dvt_platformFamilyForBundleAtPath:error:
Thread: <NSThread: 0x7ff668d15a50>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2017-10-22 14:14:34.513 xcodebuild[69327:634958] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-13233/DVTFoundation/DeveloperStructure/DVTPlatformFamily.m:192
Details: Error Domain=DVTMachOErrorDomain Code=1 "Reached end of file while looking for: Mach-O slice." UserInfo={NSLocalizedDescription=Reached end of file while looking for: Mach-O slice., NSLocalizedRecoverySuggestion=}
Object: <NSBundle>
Method: +dvt_platformFamilyForBundleAtPath:error:
Thread: <NSThread: 0x7ff668d15a50>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2017-10-22 14:14:34.863 xcodebuild[69327:634958] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7ff66e134cc0>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=IDEProvisioningErrorDomain Code=8 \"adb has conflicting provisioning settings.\" UserInfo={NSLocalizedDescription=adb has conflicting provisioning settings., NSLocalizedRecoverySuggestion=adb is automatically signed for distribution, but a conflicting code signing identity iPhone Developer has been manually specified. Remove the \"signingCertificate\" entry from your Export Options property list, or switch to manual signing by setting \"signingStyle\" to \"Manual.}",
"Error Domain=IDEProvisioningErrorDomain Code=8 \"ios-device-lib has conflicting provisioning settings.\" UserInfo={NSLocalizedDescription=ios-device-lib has conflicting provisioning settings., NSLocalizedRecoverySuggestion=ios-device-lib is automatically signed for distribution, but a conflicting code signing identity iPhone Developer has been manually specified. Remove the \"signingCertificate\" entry from your Export Options property list, or switch to manual signing by setting \"signingStyle\" to \"Manual.}"
)}
error: exportArchive: adb has conflicting provisioning settings.
Error Domain=IDEProvisioningErrorDomain Code=8 "adb has conflicting provisioning settings." UserInfo={NSLocalizedDescription=adb has conflicting provisioning settings., NSLocalizedRecoverySuggestion=adb is automatically signed for distribution, but a conflicting code signing identity iPhone Developer has been manually specified. Remove the "signingCertificate" entry from your Export Options property list, or switch to manual signing by setting "signingStyle" to "Manual.}
error: exportArchive: ios-device-lib has conflicting provisioning settings.
Error Domain=IDEProvisioningErrorDomain Code=8 "ios-device-lib has conflicting provisioning settings." UserInfo={NSLocalizedDescription=ios-device-lib has conflicting provisioning settings., NSLocalizedRecoverySuggestion=ios-device-lib is automatically signed for distribution, but a conflicting code signing identity iPhone Developer has been manually specified. Remove the "signingCertificate" entry from your Export Options property list, or switch to manual signing by setting "signingStyle" to "Manual.}
** EXPORT FAILED **
Unable to apply changes on device: 2f5eb251a28d7102c8c421f1f8477b21f67a1470. Error is: Command xcodebuild failed with exit code 70

Related

xcodebuild ios export archive fail on success build

I am trying to build a complicated xcworkspace that contains 8 xcodeproj.
Main project (target app, framework, app extension)
Pods
6 cpp projects with one static library target each (these have dependencies with each other and added to the final project)
I can build the project via xcodebuild command. I am also able to Archive it, but I cannot export the IPA file, it always gets the following error:
2020-03-18 19:04:49.801 xcodebuild[28749:691158] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/vr/1fb5zcxd0gg92359ynn0r2gm0000gn/T/xxxxx_2020-03-18_19-04-49.800.xcdistributionlogs'.
2020-03-18 19:04:49.834 xcodebuild[28749:691158] [MT] IDEDistributionMethodManager: -[IDEDistributionMethodManager orderedDistributionMethodsForTask:archive:]: Error = Error Domain=IDEDistributionMethodManagerErrorDomain Code=2 "Unknown Distribution Error" UserInfo={NSLocalizedDescription=Unknown Distribution Error}
error: exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but no value was provided
Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key 'method': expected one of {}, but no value was provided" UserInfo={NSLocalizedDescription=exportOptionsPlist error for key 'method': expected one of {}, but no value was provided}
I also tried to use the XCode 10.3 (10G8) UI in order to perform the same actions. This results to the Organizer screen where I see the xcarchive erroneous located in a group "Other Items" and not "iOS Apps" as it should.
Additionally, the option
"Validate Content" is disabled.
"Distribute Content" does not provide anything for iOS packing.
I have verified that my build commands are correct as the project was able to build with these in its previous state.
I've tried changing static project libraries dependencies but when adding all dependencies to all items it ends with a build error of multiple symbols.
I suspect that something in the build settings, or library/header references is faulty, but I cannot really troubleshoot it.
Is there any way to get additional information for the problem?
I had the same issue. I had to reset my developer certificate on our build server to resolve this.
I hope this helps others.

Phonegap Build Error: Xcode could not determine type of profile / No signing certificate "iOS Distribution" found - Xcode 11 or Xcode 10.1

I'm trying to compile an IPA for distribution in Phonegap Build, but I'm receiving the following error:
Running command: xcodebuild -exportArchive -archivePath Releva.xcarchive -exportOptionsPlist /private/project/exportOptions.plist -exportPath /private/project/build/device
2020-02-19 14:42:12.285 xcodebuild[46455:98411165] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/37/x2444x712rnbshh_b1tlfwsm0000gp/T/************.xcdistributionlogs'.
2020-02-19 14:42:12.665 xcodebuild[46455:98411167] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks_Fall2018/IDEFrameworks-14460.46/IDEFoundation/Provisioning/IDEProfileQualification.m:509
Details: Xcode could not determine type of profile "/Library/MobileDevice/Provisioning Profiles/production-ios-1582151957--90970.mobileprovision" (could be {(
)})
Object: <IDEProfileQualification: 0x7fd1f6e0b350>
Method: -_profileTypeQualifier
Thread: <NSThread: 0x7fd1f6806dc0>{number = 4, name = (null)}
Please file a bug at https://bugreport.apple.com with this warning message and any useful information you can provide.
error: exportArchive: No signing certificate "iOS Distribution" found
Error Domain=IDECodesignResolverErrorDomain Code=1 "No signing certificate "iOS Distribution" found" UserInfo={IDEProvisioningError_UserInfoKey_IDEProvisioningErrorPlatform=com.apple.platform.iphoneos, IDEProvisioningError_UserInfoKey_IDEProvisioningErrorAction=5, NSLocalizedRecoverySuggestion=No "iOS Distribution" signing certificate matching team ID "************" with a private key was found., IDEProvisioningError_UserInfoKey_IDEProvisioningErrorSpecifier=iOS Distribution, IDEProvisioningError_UserInfoKey_IDEProvisioningErrorTeam=<IDEProvisioningBasicTeam: 0x7fd1f6e0a330; teamID='***********', teamName='(null)'>, NSLocalizedDescription=No signing certificate "iOS Distribution" found}
I tried and retried everything with the credentials and provisioning profiles, but continue to get the same error. Creating them again and again, selecting the certificate with the private key together to export the p12, etc ..
Only thing I noticed is that when I select the certifcate to create the Provisioning Profile, it says "For use in Xcode 11 or later":
And in the error log it says "Xcode could not determine type of profile" and appears "Applications/Xcode101.app" in a lot of lines what makes me think it's trying to compile it with Xcode 10.1
What can I do for Pronegap Build to use Xcode 11 when I submit it?
Is anyone else having this issue? Any workaround to this?
Well, the problem was at the moment of creating the certificate in developers.apple.com. (Not the Provisiotioning Profile)
It seems Apple changed that last year, and now you have 2 options. One is Apple Distribution for Xcode 11+ and iOS (App Store and Ad Hoc) for any version.
Hope it helps anyone else having this issue.

Export Error : Jenkins with Xcode

I am trying to export IPA from Jenkins. I have installed Jenkins in Unix. To build xcode project on this server, I have created a Slave node to build project.
Archive created successfully.
`export
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/touch -c /Users/tushar/Library/Developer/Xcode/DerivedData/*-ddkzgiiehnftznefgacmhnffkdiv/Build/Intermediates.noindex/ArchiveIntermediates/OET/BuildProductsPath/Release-iphoneos/***.app.dSYM
** ARCHIVE SUCCEEDED **
Finished: SUCCESS `
I am getting following error ---
2018-02-26 16:32:31.244 xcodebuild[15086:3083978] [MT]
IDEDistribution: Step failed: : Error
Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating
signing assets failed." UserInfo={NSLocalizedDescription=Locating
signing assets failed.,
IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=IDEProvisioningErrorDomain Code=9 \"\"***.app\" requires a provisioning profile.\"
UserInfo={NSLocalizedDescription=\"****.app\" requires a provisioning
profile., NSLocalizedRecoverySuggestion=Add a profile to the
\"provisioningProfiles\" dictionary in your Export Options property
list.}" )} error: exportArchive: "****.app" requires a provisioning
profile.
Can some one please help me?
You need to download the Provisioning File on your node machine and drag and drop it to Xcode installed on the node.
Furthermore, if you are using exportPlist file to sign the build then you have to mention the Provisioning Profile name in exportPlist file as well.

Xcode 8.2.1 Failed to codesign archive

I am trying to upload an archive for test flight to itunesconnect. However, when I go to validate the archive I get an error message saying that code signing failed and that a .ipa file is missing. I have scoured the internet for quite some time and can't find a viable solution to fixing this problem.
Xcode: Version 8.2.1 (8C1002)
Deployment Target: iOS 8.0+
IDEDistribution.standard.log:
2017-03-15 20:25:03 +0000 [MT] Validation failed for archive ******* with issues: IDEDistributionIssue: severity(error), error(Error Domain=ITunesSoftwareServiceErrorDomain Code=-21013 \"The archive is invalid. /var/folders/yc/y1chf6z95zj63mnsw7m6qwm80000gn/T/XcodeDistPipeline.6rX/Packages/*******.ipa does not exist.\" UserInfo={NSLocalizedDescription=The archive is invalid. /var/folders/yc/y1chf6z95zj63mnsw7m6qwm80000gn/T/XcodeDistPipeline.6rX/Packages/*******.ipa does not exist., NSLocalizedFailureReason=Unable to validate your application.})
IDEDistribution.critical.log
2017-03-15 20:19:52 +0000 [MT] Presenting: Error Domain=IDEFoundationErrorDomain Code=1 "Codesign failed" UserInfo={NSLocalizedDescription=Codesign failed}
I got it working. We are using Carthage libraries in the project, and I guess the code signing of the libraries we were using didn't like our project for some reason. I manually placed the source code for the libraries into the project and it ran fine.

Found an unexpected Mach-O header code: 0x72613c21 on submitting to App Store

I know there are a lot of possible solutions but none of them have worked for me so far. I am using a framework called Alamofire.framework and Kingfisher.framework. I built an iOS App which I would like to submit to AppStore. I archived it and then I come in the Archives window and click "Upload to App Store".
The following error occurs: "Found an unexpected Mach-O header code:
0x72613c21" with the following logs:
IDEDistribution.critical.log
2016-01-08 06:00:47 +0000 [MT] Failed to generate distribution items
with error: Error Domain=DVTMachOErrorDomain Code=0 "Found an
unexpected Mach-O header code: 0x72613c21"
UserInfo={NSLocalizedDescription=Found an unexpected Mach-O header
code: 0x72613c21, NSLocalizedRecoverySuggestion=} 2016-01-08 06:00:47
+0000 [MT] Presenting: Error Domain=DVTMachOErrorDomain Code=0 "Found an unexpected Mach-O header code: 0x72613c21"
UserInfo={NSLocalizedDescription=Found an unexpected Mach-O header
code: 0x72613c21, NSLocalizedRecoverySuggestion=}
IDEDistribution.standard.log
2016-01-08 06:00:47 +0000 [MT] Beginning distribution assistant for
archive: UCDA, task: Validate 2016-01-08 06:00:47 +0000 [MT]
Automatically selecting the only availaable distribution method
2016-01-08 06:00:47 +0000 [MT] [OPTIONAL] Didn't find archived user
entitlements for
:
Error Domain=NSCocoaErrorDomain Code=4 "Item at
"/Users/chikitin/Library/Developer/Xcode/Archives/2016-01-07/UCDA
1-7-16, 11.59
PM.xcarchive/Products/Applications/UCDA.app/Frameworks/FBSDKLoginKit.framework"
did not contain a "archived-expanded-entitlements.xcent" resource."
UserInfo={NSLocalizedDescription=Item at
"/Users/chikitin/Library/Developer/Xcode/Archives/2016-01-07/UCDA
1-7-16, 11.59
PM.xcarchive/Products/Applications/UCDA.app/Frameworks/FBSDKLoginKit.framework"
did not contain a "archived-expanded-entitlements.xcent" resource.}
2016-01-08 06:05:27 +0000 [MT] Canceled distribution assistant
IDEDistribution.verbose.log
2016-01-08 06:00:47 +0000 [MT] IDEDistributionItem init
I hope someone could help me with this.
Thanks a lot!
I ran into this error with a FacebookSDK framework. I removed it from the Embed frameworks list and it solved the issue. Inspect the log and find the framework causing the error.
I have the same issue with facebook SDK ... I create a bug task on facebook (bug report), the problem appears with the new SDK version .
And No solution works ...
If you have found a solution let us know. Thank you.
I run my app without facebook connect actually.
You need to remove any Frameworks’ related files in the "Copy Bundle Resources” in the build phases. Please see https://kobkrit.com/how-to-fix-found-an-unexpected-mach-o-header-code-0x72613c21-on-submitting-to-app-store-7d5b8ec180c
Remove any frameworks or folders with frameworks from Build Phases -> Copy Bundle Resources:
This solved the error for me!
I had no frameworks folder but had ios folder in Build Phases -> Copy Bundle Resources, I removed ios folder and rebuild the project, created archive again, it worked for me.

Resources