regulaforensics / react-native-document-reader

React-Native Framework for reading and validation of identification documents
19 stars 10 forks source link

[BR] Failed to build project when I'm using enterprise provisioning profile #16

Closed shariffahes closed 2 years ago

shariffahes commented 2 years ago

Before Submitting, be sure to

Bug Description When I'm using the apple development provisioning profile, I have no issue building and distributing the app using the apple development method. However, when I switch it to the enterprise provision profile, the build starts to fail for the below reason. I've also tried to use the demo project and I got the same results Steps To Reproduce

Expected behavior

The project to build successfully Screenshots

archive_issue

Environment:

Additional context

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/shariffahes/Library/Developer/Xcode/DerivedData/AriesBifold-axprsgyojerhxpassssdivbsshad/Build/Intermediates.noindex/AriesBifold.build/Release-iphoneos/AriesBifold.build/Script-F5B7D67D9BBF4C5FE692BB29.sh (in target 'AriesBifold' from project 'AriesBifold')
    cd /Users/shariffahes/Documents/Regula-Integration/rn-regula-integration/ios
    /bin/sh -c /Users/shariffahes/Library/Developer/Xcode/DerivedData/AriesBifold-axprsgyojerhxpassssdivbsshad/Build/Intermediates.noindex/AriesBifold.build/Release-iphoneos/AriesBifold.build/Script-F5B7D67D9BBF4C5FE692BB29.sh

mkdir -p /Users/shariffahes/Library/Developer/Xcode/DerivedData/AriesBifold-axprsgyojerhxpassssdivbsshad/Build/Products/Release-iphoneos/AriesBifold.app/Frameworks
rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/shariffahes/Library/Developer/Xcode/DerivedData/AriesBifold-axprsgyojerhxpassssdivbsshad/Build/Products/Release-iphoneos/XCFrameworkIntermediates/DocumentReader/DocumentReader.framework" "/Users/shariffahes/Library/Developer/Xcode/DerivedData/AriesBifold-axprsgyojerhxpassssdivbsshad/Build/Products/Release-iphoneos/AriesBifold.app/Frameworks"
building file list ... done
deleting DocumentReader.framework/_CodeSignature/CodeResources
deleting DocumentReader.framework/_CodeSignature/
DocumentReader.framework/

sent 2870 bytes  received 26 bytes  5792.00 bytes/sec
total size is 12204544  speedup is 4214.28
Code Signing /Users/shariffahes/Library/Developer/Xcode/DerivedData/AriesBifold-axprsgyojerhxpassssdivbsshad/Build/Products/Release-iphoneos/AriesBifold.app/Frameworks/DocumentReader.framework with Identity iPhone Distribution: SITA S.A.
/usr/bin/codesign --force --sign 087D2E94E3932426FA26C0E341396FA93F521E1E  --preserve-metadata=identifier,entitlements '/Users/shariffahes/Library/Developer/Xcode/DerivedData/AriesBifold-axprsgyojerhxpassssdivbsshad/Build/Products/Release-iphoneos/AriesBifold.app/Frameworks/DocumentReader.framework'
Warning: unable to build chain to self-signed root for signer "iPhone Distribution: SITA S.A."
/Users/shariffahes/Library/Developer/Xcode/DerivedData/AriesBifold-axprsgyojerhxpassssdivbsshad/Build/Products/Release-iphoneos/AriesBifold.app/Frameworks/DocumentReader.framework: errSecInternalComponent
Command PhaseScriptExecution failed with a nonzero exit code
DzmitrySmaliakou commented 2 years ago

Hello, could you describe the way how you build and export the application? Unfortunately, we can't reproduce the issue on our side even when enterprise provision profile has been used.

shariffahes commented 2 years ago

I'm adding the provisioning profile manually then I'm building the app the usual way.

shariffahes commented 2 years ago

Sorry for that. The issue was related to the keychain and certification (during code signing process). For anyone that might be facing similar issue. Go to keychain and make sure that:

Thanks for the support. Appreciated!