DCloud_App_Array
DCloud_App_Array
  • 发布:2015-01-26 13:23
  • 更新:2021-09-17 11:39
  • 阅读:632933

iOS证书(.p12)和描述文件(.mobileprovision)申请

分类:HTML5+

iOS有两种证书和描述文件:

证书类型 使用场景
开发(Development)证书和描述文件 用于开发测试,在 HBuilderX 中打包后可在真机环境通过Safari调试
发布(Distribution)证书和描述文件 用于提交 AppStore,在 HBuilderX 中提交云打包后提交到 AppStore 审核发布

准备环境

  • 必需要有苹果开发者账号,并且加入了 “iOS Developer Program”
  • Mac OS 10.9以上系统(如果已经申请p12证书则不需要)

登录 iOS Dev Center

打开网站 iOS Dev Center
使用苹果开发者账号登录 iOS Dev Center:


登录成功后在页面左侧选择 “Certificates,IDs & Profiles” 进入证书管理页面:

在证书管理页面,可以看到所有已经申请的证书及描述文件:

下面我们从头开始学习一下如何申请开发证书、发布证书及相对应的描述文件。

首先需要申请苹果 App ID (App的唯一标识)

如果已经申请,可跳过此节

选择页面的 “Identifiers" 可查看到已申请的所有 App 应用标识,点击页面上的加号来创建一个新的应用标识:


选择标识类型为 “App IDs”,然后点击 “Continue”

平台选择 “iOS,tvOS,watchOS”,Bundle ID 选择 “Explicit”,在 Description 中填写描述,然后填写 Bundle ID,Bundle ID 要保持唯一性,建议填写反域名加应用标识的格式 如:“io.dcloud.hellouniapp”, 然后点击 “Continue”
注意:在 HBuilderX 中 App 提交云端打包时界面上的 AppID 栏填写的就是这个 Bundle ID

接下来需要选择应用需要使用的服务(如需要使用到消息推送功能,则选择“Push Notifications”),然后点击 “Continue”
注意:如果App用不到的服务一定不要勾选,以免响应审核


确认后选择提交,回到 identifiers 页面即可看到刚创建的App ID:

至此,App ID 已经创建完毕,接下来开始创建开发证书,在创建开发证书前,需要先生成证书请求文件

生成证书请求文件

不管是申请开发 (Development) 证书还是发布 (Distribution) 证书,都需要使用证书请求 (.certSigningRequest) 文件,证书请求文件需在Mac OS上使用 “钥匙串访问” 工具生成。

在“Spltlight Search”中搜索“钥匙串”并打开 “钥匙串访问” 工具:



打开菜单 “钥匙串访问”->“证书助理”,选择“从证书颁发机构请求证书...”:

打开创建请求证书页面,在页面中输入用户邮件地址、常用名称,选择存储到磁盘,点击 “继续” :

文件名称为“CertificateSigningRequest.certSigningRequest”,选择保存位置,点击 “存储” 将证书请求文件保存到指定路径下,后面申请开发(Development)证书和发布(Production)证书时需要用到

申请开发(Development)证书和描述文件

开发(Development)证书及对应的描述文件用于开发阶段使用,可以直接将 App 安装到手机上,一个描述文件最多绑定100台测试设备(开发证书不能用于发布应用到 App Store)。

申请开发(Development)证书

在证书管理页面选择 “Certificates" 可查看到已申请的所有证书(TYPE:Development 为开发证书,Distribution为发布证书),点击页面的加号来创建一个新的证书:


在 “Software” 栏下选中 “iOS App Development” 然后点击 “Continue”:

接下来需要用到刚刚生成的证书请求文件,点击“Choose File...”选择刚刚保存到本地的 “CertificateSigningRequest.certSigningRequest”文件,点击 “Continue” 生成证书文件:

生成证书后选择 “Download” 将证书下到本地 (ios_development.cer):

双击保存到本地的 ios_development.cer 文件,会自动打开 “钥匙串访问” 工具说明导入证书成功,可以在证书列表中看到刚刚导入的证书,接下来需要导出 .p12 证书文件,选中导入的证书,右键选择 “导出...”:

输入文件名、选择路径后点击 “存储”:

输入密码及确认密码后点击 “好”:

至此,我们已经完成了开发证书的制作(得到了 xxx.p12 证书文件),接下来,继续生成开发阶段所需的描述文件,在生成描述文件之前,需要先添加调试设备(iPhone 、iPad)

添加调试设备

开发描述文件必须绑定调试设备,只有授权的设备才可以直接安装 App,所以在申请开发描述文件之前,先添加调试的设备。
(如果已经添加设备,可跳过此节)

在证书管理页面选择 “Devices”,可查看到已添加的所有设备信息,点击页面上的加号来添加一个新设备:


填写设备名称 和 UDID(设备标识):

获取设备UDID方法,将设备连接到电脑,启动 iTunes,点击此区域可切换显示设备的 UDID,右键选择复制

输入完成后,点击“Continue” 继续完成添加即可;
接下来继续申请描述文件

申请开发 (Development) 描述文件

在证书管理页面选择 “Profiles”,可查看到已申请的所有描述文件,点击页面上的加号来添加一个新的描述文件:


在 “Development” 栏下选中 “iOS App Development”,点击“Continue”按钮:

这里要选择之前创建的 “App ID” (这里是“io.dcloud.hellouniapp”),点击“Continue”:

接下来选择需要绑定的证书,这里建议直接勾选 “Select All”,点击“Continue”:

选择授权调试设备,这里建议直接勾选 “Select All”,点击 “Continue”:

输入描述文件的名称(如“HelloUniAppProfile”), 点击 “Generate” 生成描述文件:

点击“Download”下载保存开发描述文件(文件后缀为 .mobileprovision)

至此,我们已经得到了开发证书(.p12)及对应的描述文件(.mobileprovision),接下看一下如何制作发布证书及发布描述文件

申请发布(Distribution)证书和描述文件

发布 (Production) 证书用于正式发布环境下使用,用于提交到Appstore审核发布。发布证书打包的 ipa,不可以直接安装到手机上

申请发布(Production)证书

在证书管理页面选择 “Certificates" 可查看到已申请的所有证书(TYPE:Development 为开发证书,Distribution为发布证书),点击页面的加号来创建一个新的证书:


在 “Software” 栏下选中 “App Store and Ad Hoc”,点击 “Continue”:

接下来同样需要用到之前生成的证书请求文件,点击“Choose File...”选择刚刚保存到本地的 “CertificateSigningRequest.certSigningRequest”文件,点击 “Continue” 生成证书文件:

生成证书成功,选择“Download” 将证书下载到本地 (ios_production.cer):

同样双击保存到本地的 ios_production.cer 文件将证书导入到 “钥匙串访问”工具中,可以在证书列表中看到刚刚导入的证书,接下来需要导出 .p12 证书文件,选中导入的证书,右键选择 “导出...”:

输入文件名、选择路径后点击 “存储”:

输入密码及确认密码后点击 “好”:

至此,我们已经完成了发布证书的制作(得到了 xxx.p12 证书文件),接下来,继续生成发布描述文件

申请发布 (Distribution) 描述文件

在证书管理页面选择 “Profiles”,可查看到已申请的所有描述文件,点击页面上的加号来添加一个新的描述文件:


在 “Distribution” 栏下选中 “App Store”,点击“Continue”按钮:

这里要选择之前创建的 “App ID” (这里是“io.dcloud.hellouniapp”),点击“Continue”:

接下来选择需要绑定的发布证书(iOS Distribution),这里勾选刚刚生成的发布证书”,点击“Continue”:

接下来输入描述文件的名称(如“HelloUniAppProfileDistribution”), 点击 “Generate” 生成描述文件:

然后点击 “Download” 将描述文件下载到本地(文件后缀为 .mobileprovision)

至此,我们已经得到了发布证书(.p12)及对应的发布描述文件(.mobileprovision)

64 关注 分享
多串君 MrLoading 风君 蔡繁荣 ztingjian jackzlz 我勒个去 BruceAn 雨一直下天黑了 Gunter doubleWei netstone 5***@qq.com Trust 1***@qq.com y***@163.com 乌龙球 c***@163.com 3***@qq.com huyuanyuan 3***@qq.com 8***@qq.com m***@qq.com 3***@qq.com 魔法祭师 1***@163.com Apopo jtshushu 活泉 BankSnow 4***@qq.com m***@sina.com hkt 1***@qq.com 龙且 如月王子 一个神秘的童话 j***@aijitech.com Lysander686 8***@qq.com x***@163.com 罗马队长 1***@qq.com 1***@qq.com 老哥教教我 3***@qq.com shiyue 5***@qq.com 9***@qq.com 3***@qq.com

要回复文章请先登录注册

shijun

shijun

可以使用在线工具来生成证书:

https://www.yunedit.com/createcert
2021-09-17 11:39
mrxu_

mrxu_

ios云打包总是失败,下面是错误日志,不知道什么错误


Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk iphoneos14.5 -project [PackagePath]/HBuilder.xcodeproj

User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:
SDKROOT = iphoneos14.5

note: Using new build system
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
CreateBuildDirectory [PackagePath]/build
cd [PackagePath]/HBuilder.xcodeproj
builtin-create-build-directory [PackagePath]/build

CreateBuildDirectory [PackagePath]/build/Release-iphoneos
cd [PackagePath]/HBuilder.xcodeproj
builtin-create-build-directory [PackagePath]/build/Release-iphoneos

MkDir [PackagePath]/build/Release-iphoneos/HBuilder.app (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
/bin/mkdir -p [PackagePath]/build/Release-iphoneos/HBuilder.app

ProcessProductPackaging /Users/[Name]/Library/MobileDevice/Provisioning\\ Profiles/5ebefbed-2b5f-4b60-baa1-3110659d4ed9.mobileprovision [PackagePath]/build/Release-iphoneos/HBuilder.app/embedded.mobileprovision (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
builtin-productPackagingUtility /Users/[Name]/Library/MobileDevice/Provisioning\\ Profiles/5ebefbed-2b5f-4b60-baa1-3110659d4ed9.mobileprovision -o [PackagePath]/build/Release-iphoneos/HBuilder.app/embedded.mobileprovision

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources/Entitlements.plist (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources/Entitlements.plist

ProcessProductPackaging \"\" [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder.app.xcent (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]

Entitlements:

{
\"application-identifier\" = \"MYPTXJ9VBT.com.boyaxun.xufan\";
\"com.apple.developer.team-identifier\" = MYPTXJ9VBT;
\"get-task-allow\" = 1;
}

builtin-productPackagingUtility -entitlements -format xml -o [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder.app.xcent

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-project-headers.hmap (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-project-headers.hmap

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-own-target-headers.hmap (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-own-target-headers.hmap

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/all-product-headers.yaml (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/all-product-headers.yaml

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder.hmap (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder.hmap

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-generated-files.hmap (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-generated-files.hmap

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-all-target-headers.hmap (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-all-target-headers.hmap

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-all-non-framework-target-headers.hmap (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-all-non-framework-target-headers.hmap

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/HBuilder.LinkFileList (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/HBuilder.LinkFileList

CompileC [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/main.o [PackagePath]/HBuilder/source/main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
export LANG\\=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target armv7-apple-ios9.0 -fmessage-length\\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\\=0 -std\\=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-prune-interval\\=86400 -fmodules-prune-after\\=345600 -fbuild-session-file\\=/var/folders/3m/cbyx6vbn3193q46245nvnfbh0000gn/C/org.llvm.clang/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\\=return-type -Wdocumentation -Wunreachable-code -Wquoted-include-in-framework-header -Wno-implicit-atomic-properties -Werror\\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DNS_BLOCK_ASSERTIONS\\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\\=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility\\=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -iquote [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-generated-files.hmap -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-own-target-headers.hmap -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-all-target-headers.hmap -iquote [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-project-headers.hmap -I[PackagePath]/build/Release-iphoneos/include -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources-normal/armv7 -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources/armv7 -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources -F[PackagePath]/build/Release-iphoneos -F[SourcePath]/libs/Universal -F[SourcePath]/libs/Universal -MMD -MT dependencies -MF [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/main.d --serialize-diagnostics [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/main.dia -c [PackagePath]/HBuilder/source/main.m -o [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/main.o

WriteAuxiliaryFile [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/HBuilder.LinkFileList (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
write-file [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/HBuilder.LinkFileList

CompileC [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/main.o [PackagePath]/HBuilder/source/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
export LANG\\=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target arm64-apple-ios9.0 -fmessage-length\\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\\=0 -std\\=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-prune-interval\\=86400 -fmodules-prune-after\\=345600 -fbuild-session-file\\=/var/folders/3m/cbyx6vbn3193q46245nvnfbh0000gn/C/org.llvm.clang/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\\=return-type -Wdocumentation -Wunreachable-code -Wquoted-include-in-framework-header -Wno-implicit-atomic-properties -Werror\\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DNS_BLOCK_ASSERTIONS\\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\\=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility\\=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -iquote [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-generated-files.hmap -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-own-target-headers.hmap -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-all-target-headers.hmap -iquote [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder-project-headers.hmap -I[PackagePath]/build/Release-iphoneos/include -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources-normal/arm64 -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources/arm64 -I[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources -F[PackagePath]/build/Release-iphoneos -F[SourcePath]/libs/Universal -F[SourcePath]/libs/Universal -MMD -MT dependencies -MF [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/main.d --serialize-diagnostics [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/main.dia -c [PackagePath]/HBuilder/source/main.m -o [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/main.o

Ld [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/Binary/HBuilder normal armv7 (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target armv7-apple-ios9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk -L[PackagePath]/build/Release-iphoneos -L[SourcePath]/libs/Universal -F[PackagePath]/build/Release-iphoneos -F[SourcePath]/libs/Universal -F[SourcePath]/libs/Universal -filelist [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/HBuilder.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/HBuilder_lto.o -fobjc-arc -fobjc-link-runtime -ObjC -llibAdSupport -llibLoader -llibPDRCore -lcoreSupport -llibAccelerometer -lopencore-amrnb -lmp3lame -llibMedia -llibCache -llibLog -llibIO -llibPGInvocation -llibNativeObj -llibNativeUI -llibNavigator -llibOrientation -llibPGProximity -llibStorage -llibUI -llibXHR -llibZip -llibBarcode -lDCUniZXing -luchardet -llibCamera -llibGeolocation -lDCUniBarcode -llibWeex -lSDWebImage -weak_framework AdSupport -weak_framework AppTrackingTransparency -weak_framework Accelerate -weak_framework AssetsLibrary -weak_framework AddressBook -weak_framework AddressBookUI -weak_framework AudioToolbox -weak_framework AVFoundation -weak_framework CFNetwork -weak_framework CoreFoundation -weak_framework CoreMotion -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework CoreMedia -weak_framework CoreTelephony -weak_framework CoreText -weak_framework CoreVideo -weak_framework Foundation -weak_framework ImageIO -weak_framework JavaScriptCore -weak_framework MobileCoreServices -weak_framework MediaPlayer -weak_framework Photos -weak_framework QuartzCore -weak_framework QuickLook -weak_framework Security -weak_framework storage -weak_framework SystemConfiguration -weak_framework UIKit -weak_framework UserNotifications -weak_framework WebKit -lc++ -lz -lxml2 -lsqlite3 -weak_framework PhotosUI -weak_framework MetalKit -weak_framework GLKit -licucore -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/HBuilder_dependency_info.dat -o [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/Binary/HBuilder
ld: warning: method '-setVideoOrientation:' in category from [SourcePath]/libs/Universal/libDCUniBarcode.a(PGWXBarcodeCapture.o) conflicts with same method from another category
ld: warning: method '+performBlockOnBridgeThread:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+performBlockOnMainThread:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+execute:to:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+factor' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+getPanGestureForSource:callback:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+addScrollDelegate:source:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+removeScrollDelegate:source:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+getViewByRef:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '-isDirectionRTL' in category from [SourcePath]/libs/Universal/liblibWeex.a(WXComponent+Layout.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(WXComponent.o)

Ld [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/Binary/HBuilder normal arm64 (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk -L[PackagePath]/build/Release-iphoneos -L[SourcePath]/libs/Universal -F[PackagePath]/build/Release-iphoneos -F[SourcePath]/libs/Universal -F[SourcePath]/libs/Universal -filelist [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/HBuilder.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/HBuilder_lto.o -fobjc-arc -fobjc-link-runtime -ObjC -llibAdSupport -llibLoader -llibPDRCore -lcoreSupport -llibAccelerometer -lopencore-amrnb -lmp3lame -llibMedia -llibCache -llibLog -llibIO -llibPGInvocation -llibNativeObj -llibNativeUI -llibNavigator -llibOrientation -llibPGProximity -llibStorage -llibUI -llibXHR -llibZip -llibBarcode -lDCUniZXing -luchardet -llibCamera -llibGeolocation -lDCUniBarcode -llibWeex -lSDWebImage -weak_framework AdSupport -weak_framework AppTrackingTransparency -weak_framework Accelerate -weak_framework AssetsLibrary -weak_framework AddressBook -weak_framework AddressBookUI -weak_framework AudioToolbox -weak_framework AVFoundation -weak_framework CFNetwork -weak_framework CoreFoundation -weak_framework CoreMotion -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework CoreMedia -weak_framework CoreTelephony -weak_framework CoreText -weak_framework CoreVideo -weak_framework Foundation -weak_framework ImageIO -weak_framework JavaScriptCore -weak_framework MobileCoreServices -weak_framework MediaPlayer -weak_framework Photos -weak_framework QuartzCore -weak_framework QuickLook -weak_framework Security -weak_framework storage -weak_framework SystemConfiguration -weak_framework UIKit -weak_framework UserNotifications -weak_framework WebKit -lc++ -lz -lxml2 -lsqlite3 -weak_framework PhotosUI -weak_framework MetalKit -weak_framework GLKit -licucore -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/HBuilder_dependency_info.dat -o [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/Binary/HBuilder
ld: warning: arm64 function not 4-byte aligned: _ffi_call_SYSV from [SourcePath]/libs/Universal/liblibPGInvocation.a(sysv_arm64.o)
ld: warning: arm64 function not 4-byte aligned: _ffi_closure_SYSV from [SourcePath]/libs/Universal/liblibPGInvocation.a(sysv_arm64.o)
ld: warning: method '-setVideoOrientation:' in category from [SourcePath]/libs/Universal/libDCUniBarcode.a(PGWXBarcodeCapture.o) conflicts with same method from another category
ld: warning: method '+performBlockOnBridgeThread:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+performBlockOnMainThread:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+execute:to:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+factor' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+getPanGestureForSource:callback:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+addScrollDelegate:source:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+removeScrollDelegate:source:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '+getViewByRef:' in category from [SourcePath]/libs/Universal/liblibWeex.a(EBUtility+WX.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(EBUtility.o)
ld: warning: method '-isDirectionRTL' in category from [SourcePath]/libs/Universal/liblibWeex.a(WXComponent+Layout.o) overrides method from class in [SourcePath]/libs/Universal/liblibWeex.a(WXComponent.o)

CreateUniversalBinary [PackagePath]/build/Release-iphoneos/HBuilder.app/HBuilder normal arm64\\ armv7 (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/arm64/Binary/HBuilder [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Objects-normal/armv7/Binary/HBuilder -output [PackagePath]/build/Release-iphoneos/HBuilder.app/HBuilder

CpResource [PackagePath]/HBuilder/Pandora [PackagePath]/build/Release-iphoneos/HBuilder.app/Pandora (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks [PackagePath]/HBuilder/Pandora [PackagePath]/build/Release-iphoneos/HBuilder.app

CopyStringsFile [PackagePath]/build/Release-iphoneos/HBuilder.app/zh-Hans.lproj/InfoPlist.strings [PackagePath]/HBuilder/zh-Hans.lproj/InfoPlist.strings (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
builtin-copyStrings --validate --outputencoding binary --outfilename InfoPlist.strings --outdir [PackagePath]/build/Release-iphoneos/HBuilder.app/zh-Hans.lproj -- [PackagePath]/HBuilder/zh-Hans.lproj/InfoPlist.strings
[PackagePath]/HBuilder/zh-Hans.lproj/InfoPlist.strings:1:1: note: detected encoding of input file as Unicode (UTF-8) (in target 'HBuilder' from project 'HBuilder')

CpResource [PackagePath]/HBuilder/control.xml [PackagePath]/build/Release-iphoneos/HBuilder.app/control.xml (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks [PackagePath]/HBuilder/control.xml [PackagePath]/build/Release-iphoneos/HBuilder.app

CopyStringsFile [PackagePath]/build/Release-iphoneos/HBuilder.app/zh-Hans.lproj/Localizable.strings [PackagePath]/HBuilder/zh-Hans.lproj/Localizable.strings (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
builtin-copyStrings --validate --outputencoding binary --outfilename Localizable.strings --outdir [PackagePath]/build/Release-iphoneos/HBuilder.app/zh-Hans.lproj -- [PackagePath]/HBuilder/zh-Hans.lproj/Localizable.strings
[PackagePath]/HBuilder/zh-Hans.lproj/Localizable.strings:1:1: note: detected encoding of input file as Unicode (UTF-8) (in target 'HBuilder' from project 'HBuilder')

CopyPNGFile [PackagePath]/build/Release-iphoneos/HBuilder.app/dcloud_logo@3x.png [PackagePath]/HBuilder/dcloud_logo@3x.png (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
export DEVELOPER_DIR\\=/Applications/Xcode.app/Contents/Developer
export SDKROOT\\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk
export TOOLCHAINS\\=
/Applications/Xcode.app/Contents/Developer/usr/bin/copypng -compress -strip-PNG-text [PackagePath]/HBuilder/dcloud_logo@3x.png [PackagePath]/build/Release-iphoneos/HBuilder.app/dcloud_logo@3x.png

CopyPNGFile [PackagePath]/build/Release-iphoneos/HBuilder.app/dcloud_logo@2x.png [PackagePath]/HBuilder/dcloud_logo@2x.png (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
export DEVELOPER_DIR\\=/Applications/Xcode.app/Contents/Developer
export SDKROOT\\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk
export TOOLCHAINS\\=
/Applications/Xcode.app/Contents/Developer/usr/bin/copypng -compress -strip-PNG-text [PackagePath]/HBuilder/dcloud_logo@2x.png [PackagePath]/build/Release-iphoneos/HBuilder.app/dcloud_logo@2x.png

CopyStringsFile [PackagePath]/build/Release-iphoneos/HBuilder.app/en.lproj/InfoPlist.strings [PackagePath]/HBuilder/en.lproj/InfoPlist.strings (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
builtin-copyStrings --validate --outputencoding binary --outfilename InfoPlist.strings --outdir [PackagePath]/build/Release-iphoneos/HBuilder.app/en.lproj -- [PackagePath]/HBuilder/en.lproj/InfoPlist.strings
[PackagePath]/HBuilder/en.lproj/InfoPlist.strings:1:1: note: detected encoding of input file as Unicode (UTF-8) (in target 'HBuilder' from project 'HBuilder')

CopyStringsFile [PackagePath]/build/Release-iphoneos/HBuilder.app/en.lproj/Localizable.strings [PackagePath]/HBuilder/en.lproj/Localizable.strings (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
builtin-copyStrings --validate --outputencoding binary --outfilename Localizable.strings --outdir [PackagePath]/build/Release-iphoneos/HBuilder.app/en.lproj -- [PackagePath]/HBuilder/en.lproj/Localizable.strings
[PackagePath]/HBuilder/en.lproj/Localizable.strings:1:1: note: detected encoding of input file as Unicode (UTF-8) (in target 'HBuilder' from project 'HBuilder')

CompileStoryboard [PackagePath]/HBuilder/Base.lproj/LaunchScreenAD.storyboard (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
export XCODE_DEVELOPER_USR_PATH\\=/Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module HBuilder --output-partial-info-plist [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Base.lproj/LaunchScreenAD-SBPartialInfo.plist --auto-activate-custom-fonts --target-device iphone --minimum-deployment-target 9.0 --output-format human-readable-text --compilation-directory [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Base.lproj [PackagePath]/HBuilder/Base.lproj/LaunchScreenAD.storyboard

CompileStoryboard [PackagePath]/HBuilder/Base.lproj/LaunchScreen.storyboard (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
export XCODE_DEVELOPER_USR_PATH\\=/Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module HBuilder --output-partial-info-plist [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Base.lproj/LaunchScreen-SBPartialInfo.plist --auto-activate-custom-fonts --target-device iphone --minimum-deployment-target 9.0 --output-format human-readable-text --compilation-directory [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Base.lproj [PackagePath]/HBuilder/Base.lproj/LaunchScreen.storyboard

CompileAssetCatalog [PackagePath]/build/Release-iphoneos/HBuilder.app [PackagePath]/HBuilder/Assets.xcassets (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
/Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/assetcatalog_dependencies --output-partial-info-plist [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/assetcatalog_generated_info.plist --app-icon AppIcon --compress-pngs --enable-on-demand-resources YES --development-region en --target-device iphone --minimum-deployment-target 9.0 --platform iphoneos --compile [PackagePath]/build/Release-iphoneos/HBuilder.app [PackagePath]/HBuilder/Assets.xcassets
/* com.apple.actool.errors */
[PackagePath]/HBuilder/Assets.xcassets: error: The stickers icon set or app icon set named \"AppIcon\" did not have any applicable content.
/* com.apple.actool.document.warnings */
[PackagePath]/HBuilder/Assets.xcassets:./AppIcon.appiconset/[][iphone][29x29][][][2x][][]: warning: AppIcon.appiconset/icon58-settings@2x.png is 166x166 but should be 58x58.
[PackagePath]/HBuilder/Assets.xcassets:./AppIcon.appiconset/[][iphone][60x60][][][3x][][]: warning: AppIcon.appiconset/icon180-app@3x.png is 166x166 but should be 180x180.
[PackagePath]/HBuilder/Assets.xcassets:./AppIcon.appiconset/[][iphone][20x20][][][2x][][]: warning: AppIcon.appiconset/icon40-notification@2x.png is 166x166 but should be 40x40.
[PackagePath]/HBuilder/Assets.xcassets:./AppIcon.appiconset/[][iphone][60x60][][][2x][][]: warning: AppIcon.appiconset/icon120-app@2x.png is 166x166 but should be 120x120.
[PackagePath]/HBuilder/Assets.xcassets:./AppIcon.appiconset/[][iphone][40x40][][][3x][][]: warning: AppIcon.appiconset/icon120-spotlight@3x.png is 166x166 but should be 120x120.
[PackagePath]/HBuilder/Assets.xcassets:./AppIcon.appiconset/[][iphone][29x29][][][3x][][]: warning: AppIcon.appiconset/icon87-settings@3x.png is 166x166 but should be 87x87.
[PackagePath]/HBuilder/Assets.xcassets:./AppIcon.appiconset/[][ios-marketing][1024x1024][][][1x][][]: warning: AppIcon.appiconset/icon1024.png is 166x166 but should be 1024x1024.
[PackagePath]/HBuilder/Assets.xcassets:./AppIcon.appiconset/[][iphone][20x20][][][3x][][]: warning: AppIcon.appiconset/icon60-notification@3x.png is 166x166 but should be 60x60.
[PackagePath]/HBuilder/Assets.xcassets:./AppIcon.appiconset/[][iphone][40x40][][][2x][][]: warning: AppIcon.appiconset/icon80-spotlight@2x.png is 166x166 but should be 80x80.
/* com.apple.actool.compilation-results */
[PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/assetcatalog_generated_info.plistLinkStoryboards (in target 'HBuilder' from project 'HBuilder')
cd [PackagePath]
export XCODE_DEVELOPER_USR_PATH\\=/Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module HBuilder --target-device iphone --minimum-deployment-target 9.0 --output-format human-readable-text --link [PackagePath]/build/Release-iphoneos/HBuilder.app [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Base.lproj/LaunchScreen.storyboardc [PackagePath]/build/HBuilder.build/Release-iphoneos/HBuilder.build/Base.lproj/LaunchScreenAD.storyboardc
** BUILD FAILED **The following build commands failed:
CompileAssetCatalog [PackagePath]/build/Release-iphoneos/HBuilder.app [PackagePath]/HBuilder/Assets.xcassets
(1 failure)
Appid: __UNI__BC88D1D
2021-09-09 17:36
1***@qq.com

1***@qq.com

文档写的非常好,就是逻辑有点绕,大家严格按照这个顺序操作基本没啥问题。
2021-09-02 11:09
tradesns

tradesns

回复 IVAn灬 :
请关注:https://www.apple.com/certificateauthority/
目前下载到2030年的就可以解决问题 Worldwide Developer Relations - G3 (Expiring 02/20/2030 00:00:00 UTC)
https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
2021-08-25 11:57
IVAn灬

IVAn灬

回复 初学者123 :
您好 能提供一下 下载链接吗? 我在网上找到了一个 安装了 然后照着文档来 生成的证书还是不受信任..
2021-08-19 10:30
1***@qq.com

1***@qq.com

回复 圣名科技 :
好的,非常感谢
2021-08-18 17:46
圣名科技

圣名科技

回复 1***@qq.com :
不需要,随便一台苹果电脑就行了
2021-08-18 17:15
1***@qq.com

1***@qq.com

请问申请证书用的苹果电脑设备的appleID必须和注册开发者的appleID账号一致吗?
2021-08-18 17:10
初学者123

初学者123

很详细,非常感谢。
补充一下,使用过程中出现两个小问题:
1.证书导入后,显示证书不受信任。解决方案:下载并安装:Apple Worldwide Developer Relations Certification Authority。注意,是两个证书!
2.导出证书时,无法显示.p12证书。解决方案:在「证书」分类下,导出文件就可以正常显示
2021-06-11 01:24
前端TF企业签

前端TF企业签

回复 a***@outlook.com :
先打包,之后重签名,你得先在有开发者账户,生成证书打包
2021-05-14 13:58