{"id":11774,"date":"2023-12-11T16:11:10","date_gmt":"2023-12-11T08:11:10","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=11774"},"modified":"2023-12-11T16:11:10","modified_gmt":"2023-12-11T08:11:10","slug":"%e5%88%86%e5%8f%91%e7%b3%bb%e7%bb%9fapp%e6%ba%90%e7%a0%81%e6%9c%89%e5%95%a5%e4%bd%9c%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/11774\/","title":{"rendered":"\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u6709\u5565\u4f5c\u7528?"},"content":{"rendered":"

\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u662f\u4e00\u79cd\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5c06\u5e94\u7528\u7a0b\u5e8f\u5206\u53d1\u5230\u7528\u6237\u624b\u4e2d\u7684\u5de5\u5177\u3002\u5b83\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u8f7b\u677e\u5730\u5c06\u5e94\u7528\u7a0b\u5e8f\u4e0a\u4f20\u5230\u4e91\u7aef\uff0c\u7136\u540e\u901a\u8fc7\u6307\u5b9a\u7684\u94fe\u63a5\u6216\u4e8c\u7ef4\u7801\u7b49\u65b9\u5f0f\u5206\u4eab\u7ed9\u7528\u6237\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u7684\u539f\u7406\u548c\u5177\u4f53\u5b9e\u73b0\u3002<\/p>\n

\u4e00\u3001\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u7684\u539f\u7406<\/p>\n

\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u7684\u539f\u7406\u4e3b\u8981\u6d89\u53ca\u5230\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a<\/p>\n

1. \u4e0a\u4f20\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u5f00\u53d1\u8005\u9700\u8981\u5c06\u5e94\u7528\u7a0b\u5e8f\u4e0a\u4f20\u5230\u4e91\u7aef\uff0c\u4ee5\u4fbf\u5c06\u5e94\u7528\u7a0b\u5e8f\u5206\u4eab\u7ed9\u7528\u6237\u3002\u4e0a\u4f20\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u4e00\u4e9b\u7ec6\u8282\uff0c\u5982\u5e94\u7528\u7a0b\u5e8f\u7684\u7248\u672c\u53f7\u3001\u5e94\u7528\u7a0b\u5e8f\u7684\u5927\u5c0f\u7b49\u7b49\u3002<\/p>\n

2. \u751f\u6210\u4e0b\u8f7d\u94fe\u63a5\u6216\u4e8c\u7ef4\u7801<\/p>\n

\u4e0a\u4f20\u5e94\u7528\u7a0b\u5e8f\u540e\uff0c\u9700\u8981\u751f\u6210\u4e0b\u8f7d\u94fe\u63a5\u6216\u4e8c\u7ef4\u7801\uff0c\u4ee5\u4fbf\u8ba9\u7528\u6237\u4e0b\u8f7d\u5e94\u7528\u7a0b\u5e8f\u3002\u4e0b\u8f7d\u94fe\u63a5\u6216\u4e8c\u7ef4\u7801\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5de5\u5177\u751f\u6210\uff0c\u4e5f\u53ef\u4ee5\u81ea\u5df1\u7f16\u5199\u4ee3\u7801\u751f\u6210\u3002<\/p>\n

3. \u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u9700\u8981\u80fd\u591f\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\uff0c\u5305\u62ec\u5e94\u7528\u7a0b\u5e8f\u7684\u7248\u672c\u53f7\u3001\u5e94\u7528\u7a0b\u5e8f\u7684\u5927\u5c0f\u3001\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0b\u8f7d\u6b21\u6570\u7b49\u7b49\u3002\u8fd9\u4e9b\u4fe1\u606f\u53ef\u4ee5\u901a\u8fc7\u6570\u636e\u5e93\u5b58\u50a8\u548c\u7ba1\u7406\u3002<\/p>\n

4. \u7edf\u8ba1\u5e94\u7528\u7a0b\u5e8f\u4e0b\u8f7d\u60c5\u51b5<\/p>\n

\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u9700\u8981\u80fd\u591f\u7edf\u8ba1\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0b\u8f7d\u60c5\u51b5\uff0c\u5305\u62ec\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0b\u8f7d\u6b21\u6570\u3001\u4e0b\u8f7d\u6765\u6e90\u7b49\u7b49\u3002\u8fd9\u4e9b\u4fe1\u606f\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95ee\u65e5\u5fd7\u7b49\u65b9\u5f0f\u8fdb\u884c\u7edf\u8ba1\u3002<\/p>\n

\u4e8c\u3001\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u7684\u5b9e\u73b0<\/p>\n

\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u7684\u5b9e\u73b0\u9700\u8981\u6d89\u53ca\u5230\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a<\/p>\n

1. \u4e0a\u4f20\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7b2c\u4e09\u65b9\u4e91\u5b58\u50a8\u670d\u52a1\uff0c\u5982\u4e03\u725b\u4e91\u3001\u963f\u91cc\u4e91\u7b49\u7b49\uff0c\u5c06\u5e94\u7528\u7a0b\u5e8f\u4e0a\u4f20\u5230\u4e91\u7aef\u3002\u4e0a\u4f20\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u5e94\u7528\u7a0b\u5e8f\u7684\u7248\u672c\u53f7\u3001\u5e94\u7528\u7a0b\u5e8f\u7684\u5927\u5c0f\u7b49\u7ec6\u8282\u3002<\/p>\n

2. \u751f\u6210\u4e0b\u8f7d\u94fe\u63a5\u6216\u4e8c\u7ef4\u7801<\/p>\n

\u751f\u6210\u4e0b\u8f7d\u94fe\u63a5\u6216\u4e8c\u7ef4\u7801\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5de5\u5177\uff0c\u5982\u817e\u8baf\u4e91\u7684COS\u3001\u4e03\u725b\u4e91\u7684\u5bf9\u8c61\u5b58\u50a8\u7b49\u7b49\u3002\u4e5f\u53ef\u4ee5\u81ea\u5df1\u7f16\u5199\u4ee3\u7801\u751f\u6210\u4e0b\u8f7d\u94fe\u63a5\u6216\u4e8c\u7ef4\u7801\u3002\u5177\u4f53\u5b9e\u73b0\u65b9\u5f0f\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n

“`<\/p>\n

\/\/ \u751f\u6210\u4e0b\u8f7d\u94fe\u63a5<\/p>\n

$domain = ‘http:\/\/www.example.com’;<\/p>\n

$appName = ‘myapp’;<\/p>\n

$version = ‘1.0.0’;<\/p>\n

$url = $domain . ‘\/’ . $appName . ‘\/’ . $version . ‘\/’ . $appName . ‘.apk’;<\/p>\n

\/\/ \u751f\u6210\u4e8c\u7ef4\u7801<\/p>\n

$qrCode = new Endroid\\QrCode\\QrCode($url);<\/p>\n

$qrCode->setSize(300);<\/p>\n

$qrCode->setMargin(10);<\/p>\n

$qrCode->setWriterByName(‘png’);<\/p>\n

$qrCode->setEncoding(‘UTF-8’);<\/p>\n

$qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH());<\/p>\n

$qrCode->setForegroundColor([‘r’ => 0, ‘g’ => 0, ‘b’ => 0, ‘a’ => 0]);<\/p>\n

$qrCode->setBackgroundColor([‘r’ => 255, ‘g’ => 255, ‘b’ => 255, ‘a’ => 0]);<\/p>\n

$qrCode->setLabel(‘Download myapp’);<\/p>\n

$q\u600e\u6837\u5206\u53d1app<\/a>rCode->setLabelFontSize(16);<\/p>\n

$qrCode->setImageType(QrCode::IMAGE_TYPE_PNG);<\/p>\n

$qrCode->render();<\/p>\n

“`<\/p>\n

3. \u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7b2c\u4e09\u65b9\u6570\u636e\u5e93\uff0c\u5982MySQL\u3001MongoDB\u7b49\u7b49\uff0c\u4e5f\u53ef\u4ee5\u81ea\u5df1\u7f16\u5199\u4ee3\u7801\u8fdb\u884c\u7ba1\u7406\u3002\u5177\u4f53\u5b9e\u73b0\u65b9\u5f0f\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n

“`<\/p>\n

\/\/ \u8fde\u63a5\u6570\u636e\u5e93<\/p>\n

$dsn = ‘mysql:host=localhost;dbname=test’;<\/p>\n

$username = ‘root’;<\/p>\n

$password = ‘password’;<\/p>\n

$pdo<\/p>\n

<\/figure>\n<\/p>\n

= new PDO($dsn, $username, $password);<\/p>\n

\/\/ \u63d2\u5165\u5e94\u7528\u7a0b\u5e8f\u4fe1\u606f<\/p>\n

$appName = ‘myapp’;<\/p>\n

$version = ‘1.0.0’;<\/p>\n

$size = ’10M’;<\/p>\n

$downloadCount = 0;<\/p>\n

$sql = “INSERT INTO app (name, version, size, download_count) VALUES (‘$appName’, ‘$version’, ‘$size’, $downloadCount)”;<\/p>\n

$pdo->exec($sql);<\/p>\n

app\u5206\u53d1\u7f51\u7ad9\u6e90\u7801\u6587\u4ef6\u4e0b\u8f7d\u9875<\/a><\/p>\n

\/\/ \u67e5\u8be2\u5e94\u7528\u7a0b\u5e8f\u4fe1\u606f<\/p>\n

$sql = “SELECT * FROM app WHERE name=’$appName’ AND version=’$version'”;<\/p>\n

$result = $pdo->query($sql);<\/p>\n

$row<\/p>\n

\u4e00\u95e8APP\u8bc1\u4e66\u5236\u4f5c\u5de5\u5177(https:\/\/platform.yimenapp.com\/)\u63d0\u4f9bAPP\u8bc1\u4e66\u5728\u7ebf\u5236\u4f5c\uff0c\u652f\u6301\u82f9\u679c\u8bc1\u4e66\u3001\u5b89\u5353\u8bc1\u4e66\u5728\u7ebf\u4e00\u952e\u5feb\u6377\u5236\u4f5c\u3002\u5de5\u5177\u5b8c\u5168\u514d\u8d39\uff0c\u6ce8\u518c\u6210\u4e3a\u4e00\u95e8APP\u5f00\u53d1\u8005\u5373\u53ef\u4f7f\u7528\uff0c\u5168\u4e2d\u6587\u5316\u4e91\u7aefAPP\u8bc1\u4e66\u5de5\u5177\u3002
\n\u4e00\u952e\u5236\u4f5cIOS\u82f9\u679c\u8bc1\u4e66\uff0c\u5305\u542bappstore\u4e0a\u67b6\u8bc1\u4e66\u3001\u5f00\u53d1\u73af\u5883\u6d4b\u8bd5\u8bc1\u4e66\u3001ADhoc\u751f\u4ea7\u73af\u5883\u6d4b\u8bd5\u8bc1\u4e66\u3001\u5728\u7ebf\u751f\u6210P12\u5f00\u53d1\u8005\u8bc1\u4e66\u8bc1\u4e66\uff0cP12\u63a8\u9001\u8bc1\u4e66\u3001P8\u63a8\u9001\u8bc1\u4e66\uff0c\u5feb\u6377\u7ed1\u5b9aUDID\u3001\u81ea\u5b9a\u4e49\u5305\u540dBundle ID\u3001\u5728\u7ebf\u83b7\u53d6\u63cf\u8ff0\u6587\u4ef6\uff1b
\n\u4e00\u952e\u5236\u4f5c\u5b89\u5353\u8bc1\u4e66\uff0c\u652f\u6301\u81ea\u5b9a\u4e49\u5b89\u5353\u5305\u540d\u3001\u7b7e\u540d\u6587\u4ef6\u5bc6\u7801(storepass)\u3001\u522b\u540d(alias)\u3001\u522b\u540d\u5bc6\u7801(keypass)\u3001\u516c\u53f8\/\u673a\u6784\u540d\u79f0 (O)\u3001\u90e8\u95e8 (OU)\u3001\u56fd\u5bb6\/\u5730\u533a (C)\u3001\u7701\u4efd (ST)\u3001\u57ce\u5e02 (L)\u3001\u90ae\u7bb1 (E)\u3001\u4ee5\u53ca\u5b89\u5353\u8bc1\u4e66\u6709\u6548\u671f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5206\u53d1\u7cfb\u7edfapp\u6e90\u7801\u662f\u4e00\u79cd\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5c06\u5e94\u7528\u7a0b\u5e8f\u5206\u53d1\u5230\u7528\u6237\u624b\u4e2d\u7684\u5de5\u5177\u3002\u5b83\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u8f7b\u677e\u5730\u5c06\u5e94\u7528\u7a0b\u5e8f\u4e0a\u4f20\u5230\u4e91\u7aef\uff0c\u7136\u540e\u901a\u8fc7\u6307\u5b9a\u7684\u94fe\u63a5\u6216\u4e8c\u7ef4\u7801\u7b49\u65b9\u5f0f\u5206\u4eab\u7ed9\u7528\u6237\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5206\u53d1\u7cfb\u7edfapp<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[1562,646,12,1536,118],"topic":[],"class_list":["post-11774","post","type-post","status-publish","format-standard","hentry","category-appff","tag-ios","tag-646","tag-12","tag-1536","tag-118"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/11774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=11774"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/11774\/revisions"}],"predecessor-version":[{"id":11825,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/11774\/revisions\/11825"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=11774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=11774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=11774"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=11774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}