Archive and export ipa: Save for Enterprise Deployment

Archive and export ipa successfully

IDEDistribution.critical.log
2016-12-02 07:49:08 +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-12-02 07:49:08 +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-12-02 07:49:06 +0000 [MT] Beginning distribution assistant for archive: DoingPaper_LS, task: Export
2016-12-02 07:49:08 +0000 [MT] Proceeding to distribution step IDEDistributionSigningAssetsStepViewController, context: <IDEDistributionContext: 0x7fcd171be6e0; archive(resolved)='<IDEArchive: 0x7fcd195c7c40>', distributionTask(resolved)='2', distributionMethod(resolved)='<IDEDistributionMethodEnterprise: 0x7fcd188cb160>', teamID(resolved)='(null)'>
Chain (2, self inclusive):
<IDEDistributionContext: 0x7fcd171be6e0; archive = '(null)', distributionMethod='(null)', teamID='(null)'>
<IDEDistributionContext: 0x7fccf9f9bb00; archive = '<IDEArchive: 0x7fcd195c7c40>', distributionMethod='<IDEDistributionMethodEnterprise: 0x7fcd188cb160>', teamID='(null)'>
</IDEDistributionContext: 0x7fcd171be6e0>
2016-12-02 07:49:08 +0000 [MT] [OPTIONAL] Didn't find archived user entitlements for <DVTFilePath:0x7fccf54db860:'/Users/zhuxuhong/Library/Developer/Xcode/Archives/2016-12-02/DoingPaper_LS 2016-12-2 15.41.xcarchive/Products/Applications/DoingPaper_LS.app/Frameworks/MBProgressHUD.framework'>: Error Domain=NSCocoaErrorDomain Code=4 "Item at "/Users/zhuxuhong/Library/Developer/Xcode/Archives/2016-12-02/DoingPaper_LS 2016-12-2 15.41.xcarchive/Products/Applications/DoingPaper_LS.app/Frameworks/MBProgressHUD.framework" did not contain a "archived-expanded-entitlements.xcent" resource." UserInfo={NSLocalizedDescription=Item at "/Users/zhuxuhong/Library/Developer/Xcode/Archives/2016-12-02/DoingPaper_LS 2016-12-2 15.41.xcarchive/Products/Applications/DoingPaper_LS.app/Frameworks/MBProgressHUD.framework" did not contain a "archived-expanded-entitlements.xcent" resource.}
2016-12-02 07:49:08 +0000 [MT] [OPTIONAL] Didn't find archived user entitlements for <DVTFilePath:0x7fccf8daf8f0:'/Users/zhuxuhong/Library/Developer/Xcode/Archives/2016-12-02/DoingPaper_LS 2016-12-2 15.41.xcarchive/Products/Applications/DoingPaper_LS.app/Frameworks/Realm.framework'>: Error Domain=NSCocoaErrorDomain Code=4 "Item at "/Users/zhuxuhong/Library/Developer/Xcode/Archives/2016-12-02/DoingPaper_LS 2016-12-2 15.41.xcarchive/Products/Applications/DoingPaper_LS.app/Frameworks/Realm.framework" did not contain a "archived-expanded-entitlements.xcent" resource." UserInfo={NSLocalizedDescription=Item at "/Users/zhuxuhong/Library/Developer/Xcode/Archives/2016-12-02/DoingPaper_LS 2016-12-2 15.41.xcarchive/Products/Applications/DoingPaper_LS.app/Frameworks/Realm.framework" did not contain a "archived-expanded-entitlements.xcent" resource.}
2016-12-02 07:49:09 +0000 [MT] Canceled distribution assistant
IDEDistribution.verbose.log
2016-12-02 07:49:06 +0000 [MT] Available distribution methods: (
"<IDEDistributionMethodiOSAppStoreExport: 0x7fccf5420fa0>",
"<IDEDistributionMethodAdHoc: 0x7fcd1cd97390>",
"<IDEDistributionMethodEnterprise: 0x7fcd188cb160>",
"<IDEDistributionMethodDevelopmentSigned: 0x7fcd1d05e520>"
)
2016-12-02 07:49:08 +0000 [MT] IDEDistributionItem init <DVTFilePath:0x7fccf54db860:'/Users/zhuxuhong/Library/Developer/Xcode/Archives/2016-12-02/DoingPaper_LS 2016-12-2 15.41.xcarchive/Products/Applications/DoingPaper_LS.app/Frameworks/MBProgressHUD.framework'>
2016-12-02 07:49:08 +0000 [MT] IDEDistributionItem init <DVTFilePath:0x7fccf8daf8f0:'/Users/zhuxuhong/Library/Developer/Xcode/Archives/2016-12-02/DoingPaper_LS 2016-12-2 15.41.xcarchive/Products/Applications/DoingPaper_LS.app/Frameworks/Realm.framework'>
Realm version: 2.0.3
Xcode version: 7.3.1
iOS/OSX version: iOS7.0
Dependency manager + version: No
Try to clean the Xcode's Derived Data directory and rebuild your project. Could you also try to use the latest version (2.1.0)? Also please make sure you follow all the steps in Installation instructions.
I've been resolved that problem, it's all my fault: I Link Binary Realm.framework[static library] and also Embed Frameworks Realm.framework[static library], so it is just because of duplicate reference with STATICRealm.framework.
So I think you should make the static library be named with 'xxx.a' NOT 'xxx.framework', it just misled us used it incorrectly.
Thanks a lot.
Happy to hear that you resolved your problem, @BackWorld!
Static Realm framework is distributed as a framework because it also includes headers, it's a convenient way of distributing static libraries, please check this Stack Overflow Question for more info about static frameworks.
Most helpful comment
I've been resolved that problem, it's all my fault: I
Link BinaryRealm.framework[static library] and alsoEmbed FrameworksRealm.framework[static library], so it is just because of duplicate reference withSTATICRealm.framework.So I think you should make the
staticlibrary be named with 'xxx.a' NOT 'xxx.framework', it just misled us used it incorrectly.Thanks a lot.