緗戝弸鍒嗕韓 iPhone涓嶈秺鐙卞紑鍙戣嚜宸辯殑鎵嬫満App鏁欑▼

銆€銆€瀵逛簬鏋滅矇鏉ヨ錛屽湪鑻規灉浜у搧涓婃帰绱竴浜涘彲鐜╂€ф瀬寮虹殑鐜╂硶鏄竴浠墮潪甯告湁瓚g殑浜嬨€傛棩鍓嶏紝緗戝弸lizhengru鍒嗕韓浜嗕竴涓笉闇€瑕佽秺鐙卞氨鑳藉紑鍙戝睘浜庤嚜宸辯殑鎵嬫満App鐨勫靉闂ㄧ駭鏁欑▼錛屼竴璧鋒潵鐪嬬湅鍚с€?/p>

銆€銆€鍦ㄦ寮忓紑濮嬩箣鍓嶏紝璇ョ綉鍙嬫墍鍋氱殑鍑嗗宸ヤ綔濡備笅錛?/p>

銆€銆€- Mac 璁懼(OS X 鐗堟湰涓?10.11.3)

銆€銆€- iPhone6(iOS 鐗堟湰涓?9.2.1)



銆€銆€- Xcode 鐗堟湰涓?7.2.1

銆€銆€鎺ヤ笅鏉ヨ繘鍏ユ寮忕殑鎿嶄綔姝ラ錛?/strong>

銆€銆€1銆佺敤鑷繁鐨?Apple ID 鐧誨綍寮€鍙戣€呬腑蹇?銆?a href=”https://developer.apple.com/programs/cn/” target=”_blank” title=”https://developer.apple.com/programs/cn/”>鐐瑰嚮榪欓噷銆戝嵆鍙繘鍏?銆?/p>

銆€銆€2銆佺敤鏁版嵁綰垮皢浣犵殑 iPhone 鎵嬫満榪炴帴鍒?Mac 璁懼(瑙i攣鎵嬫満騫舵坊鍔犱俊浠?錛岀劧鍚庢墦寮€ Xcode銆?/p>

銆€銆€3銆侀€夋嫨鈥淐reate a new Xcode project鈥濆垱寤轟竴涓柊鐨勯」鐩紝鐒跺悗閫夋嫨鍗曡鍥撅紝鐐瑰嚮涓嬩竴姝ャ€?/p>

銆€銆€4銆佽緭鍏ラ」鐩悕縐?Product Name)銆佸叕鍙告爣璇嗗墠緙€鍚?Organization identifier)銆佸紑鍙戣璦€(Language)鍜岃澶?Devices)錛屽茍鐐瑰嚮涓嬩竴姝ワ紝鐒跺悗閫夋嫨宸ョ▼淇濆瓨鐨勫湴鏂癸紝鐐瑰嚮 Create銆?/p>

銆€銆€5銆佷慨澶嶄唬鐮佺鍚嶉棶棰橈紝娣誨姞 Apple ID錛屽凡緇忓紑鍚袱姝ラ獙璇佺殑閿嬪弸闇€瑕侀獙璇佷竴涓嬶紝娣誨姞瀹屾垚鍚庡涓嬪浘錛屽叧闂?Accounts 紿楀彛錛屾彁紺?Reset 鐨勶紝璇風偣鍑?Reset錛屼笉鎻愮ず鐨勮蹇界暐姝ゆ錛岃嚦姝わ紝浠g爜絳懼悕闂宸蹭慨澶嶃€?/p>

銆€銆€6銆佹坊鍔?App 鐨勫浘鏍囧拰 App 鐨勫姞杞界敾闈€?/p>

銆€銆€7銆佷慨鏀?View Controller 灞炴€э紝娣誨姞鍥懼儚瑙嗗浘錛屾嫋鍏?Label 鍜?Button 鎺т歡騫墮€傚綋淇敼鍏跺瑙傚睘鎬с€?/p>

銆€銆€8銆佷慨鏀?ViewController.m 鏂囦歡錛岃祴浜堟寜閽姛鑳姐€?/p>

銆€銆€鍔熻兘瀹炵幇浠g爜濡備笅錛?/strong>

銆€銆€//鍒濆鍖栨彁紺烘;

銆€銆€UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"娑堟伅璀﹀憡" message:@"XXXX" preferredStyle: UIAlertControllerStyleAlert];

銆€銆€[alert addAction:[UIAlertAction actionWithTitle:@"XX" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

銆€銆€//鐐瑰嚮鎸夐挳鐨勫搷搴斾簨浠?

銆€銆€}]

銆€銆€];

銆€銆€//寮瑰嚭鎻愮ず妗?

銆€銆€[self presentViewController:alert animated:true completion:nil];

銆€銆€9銆佺▼搴忓凡緇忔敼鍐欏畬姣曪紝鍦ㄦā鎷熷櫒閲屽彲浠ヨ繍琛岋紝鐜板湪鎴戜滑瑕佸仛鐨勬槸璁╁叾鍦?iPhone 鎵嬫満涓婁篃鍙互榪愯銆?/p>

銆€銆€10銆佹鏃剁▼搴忓凡緇忓畨瑁呭湪鎵嬫満閲岄潰浜嗭紝浣嗘槸寰椾笉鍒扮郴緇熺殑淇′換錛岀幇鍦ㄨ鍋氱殑灝辨槸鍦?iPhone 鎵嬫満涓婅В閿佸睆騫曪紝鍓嶅線璁劇疆 – 閫氱敤 – 璁懼綆$悊 – 寮€鍙戝晢搴旂敤錛屼俊浠諱綘鐨?Apple ID錛岀劧鍚庡啀嬈$偣鍑?Xcode 閲岀殑 Running銆傝繖鏍蜂竴鏉ワ紝鎴戜滑灝卞凡緇忔垚鍔熺殑瀹屾垚浜嗗紑鍙戜竴涓畬鏁寸殑紼嬪簭錛岃瘯鐫€鐐瑰嚮瀹冨惂銆?/p>

銆€銆€閭d箞錛屾垜浠埗浣滅殑 App 搴旇濡備綍淇濆瓨鍛?鎺ヤ笅鏉ユ垜浠鍋氱殑灝辨槸鐢熸垚 ipa 鏂囦歡錛屾柟渚誇互鍚庤繘琛屽畨瑁呫€?/p>

銆€銆€- Xcode 宸︿晶搴曢儴鎵懼埌 Products錛屽湪 XXXX.app 涓婇潰鍙抽敭錛岄€夋嫨 Show in Finder錛岃繖鏍峰氨鎵懼埌浜?XXXX.app 鐨勫師濮嬫枃浠躲€?/p>

65.jpg

銆€銆€- 灝嗘壘鍒扮殑 XXXX.app 鏂囦歡鎷栨嫿鍒版墦寮€鐨?iTunes 鐨勨€滄垜鐨勫簲鐢ㄩ〉闈⑩€濈┖鐧藉錛岃繖鏍峰氨鐢熸垚浜嗘渶緇堢殑 XXXX.ipa 鏂囦歡銆?/p>

銆€銆€- 灝嗘 XXXX.ipa 鏂囦歡鐢ㄥ叾瀹冪殑絎笁鏂矽蔣浠跺畨瑁呭湪鎵嬫満閲屽氨鍙互浜嗐€傚綋鐒訛紝瀹夎瀹屾瘯鎵撳紑鐨勮瘽浼氭彁紺洪渶瑕佷俊浠誨畠錛岄偅涔堝彧瑕佹坊鍔犱俊浠誨氨鍙互浜嗐€?/p>

Comments are closed.