การตั้งค่าบัญชี Apple Developer และใบรับรอง
ลงทะเบียนบัญชี Apple Developer สร้าง App ID สร้างใบรับรองการเผยแพร่ใน Keychain Access และดาวน์โหลดโปรไฟล์การจัดสรรจากพอร์ทัลนักพัฒนา
การตั้งค่าบัญชี Apple Developer และใบรับรอง เป็นบทเรียน React Native Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน React Native Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส React Native Academy มีบทเรียนทั้งหมด 4 บทเรียน
บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ
The Apple Developer Program
To distribute an iOS app on the App Store, you need an Apple Developer Program membership, which costs $99 per year. This grants you access to App Store Connect (to manage your listings and builds), the Developer Portal (to manage certificates and devices), and the ability to distribute apps to the public. Without membership, you can only run apps on your own registered devices.
Creating an App ID
An App ID (also called a Bundle ID) uniquely identifies your app in Apple's ecosystem. It follows reverse-domain notation: com.yourcompany.appname. You register it in the Developer Portal under Certificates, Identifiers and Profiles > Identifiers. The Bundle ID must match the ios.bundleIdentifier value in your app.json exactly — a mismatch prevents the app from being signed and submitted.
// app.json
{
'expo': {
'ios': {
'bundleIdentifier': 'com.yourcompany.myapp',
'buildNumber': '1'
}
}
}
// This must exactly match the App ID registered in
// developer.apple.com/account/resources/identifiersDevelopment vs Distribution Certificates
Apple uses two types of signing certificates: a Development certificate for running apps on test devices during development, and a Distribution certificate for builds submitted to TestFlight and the App Store. Each developer can have one distribution certificate at a time. The certificate proves the code came from you and was not tampered with. Certificates are linked to your Apple ID and stored in macOS Keychain.
Generating a Certificate Signing Request
To get a distribution certificate, you first generate a Certificate Signing Request (CSR) using Keychain Access on your Mac. Open Keychain Access, choose Certificate Assistant > Request a Certificate From a Certificate Authority, fill in your email and Common Name, save the CSR file to disk. Then upload this CSR in the Developer Portal to receive your signed certificate.
# Alternative: generate CSR via OpenSSL (no Mac needed)
openssl genrsa -out private.key 2048
openssl req -new -key private.key \
-out CertificateSigningRequest.certSigningRequest \
-subj '/emailAddress=you@example.com,CN=Your Name,C=US'
# Upload CertificateSigningRequest.certSigningRequest
# to developer.apple.com > Certificates > + iconDownloading and Installing the Certificate
After Apple approves your CSR, download the .cer file and double-click it on macOS to install it into your Keychain. Verify it appears under My Certificates in Keychain Access. The certificate is only valid on the machine that generated the original CSR (because the private key pair lives in that Keychain). To sign on a different machine, export the certificate with its private key as a .p12 file.
# Export certificate and private key as .p12 for CI or team sharing:
# 1. In Keychain Access, find your distribution certificate
# 2. Expand it, select both the cert AND the private key
# 3. Right-click > Export 2 items...
# 4. Save as .p12 and set a password
# 5. Store securely — anyone with the .p12 can sign as youProvisioning Profiles
A provisioning profile links your App ID, your distribution certificate, and (for development profiles) specific device UDIDs. Apple requires a valid provisioning profile for every build. For App Store distribution use an App Store Distribution provisioning profile. Create it in the Developer Portal under Profiles, select your App ID and certificate, and download the .mobileprovision file.
# There are three types of distribution provisioning profiles:
# 1. App Store
# Purpose: Submit to TestFlight and App Store
# Device restriction: None (any device via store)
# 2. Ad Hoc
# Purpose: Install on specific registered devices (up to 100)
# Use case: QA testers without TestFlight
# 3. Enterprise
# Purpose: Internal distribution within a company
# Requires: Apple Developer Enterprise Program ($299/yr)Automated Credential Management with EAS
Managing certificates and provisioning profiles manually is error-prone. EAS Build (Expo Application Services) can handle this automatically. Run eas credentials and EAS generates the CSR, creates the certificate through the Apple API, generates a provisioning profile, and stores everything securely in its credentials store. You never need to touch Keychain or the Developer Portal manually.
# Install EAS CLI
npm install -g eas-cli
# Log in
eas login
# Manage credentials interactively
eas credentials
# EAS will ask:
# - Platform: iOS
# - Which build profile: production
# - Auto-setup: Yes
# Then it creates/stores certs and profiles for youConfiguring eas.json for Production
The eas.json file at the project root configures EAS Build profiles. The production profile is what you use for App Store builds. Set distribution to 'store' so EAS uses App Store distribution signing. The credentialsSource of 'remote' means EAS fetches certs from its secure cloud storage automatically.
// eas.json
{
'cli': {
'version': '>= 5.0.0'
},
'build': {
'development': {
'developmentClient': true,
'distribution': 'internal'
},
'preview': {
'distribution': 'internal'
},
'production': {
'distribution': 'store',
'credentialsSource': 'remote',
'ios': {
'image': 'latest'
}
}
}
}Two-Factor Authentication Requirement
Apple requires two-factor authentication (2FA) on all Apple Developer accounts. When EAS needs to perform credential operations, it authenticates with Apple's API on your behalf. You must provide your Apple ID and password plus an app-specific password (generated at appleid.apple.com) for automated tools, because Apple does not allow your main account password in CI environments.
# Environment variables for CI / EAS non-interactive mode
export EXPO_APPLE_ID='you@example.com'
# App-specific password from appleid.apple.com:
export EXPO_APPLE_APP_SPECIFIC_PASSWORD='abcd-efgh-ijkl-mnop'
# EAS will use these when running in CI:
eas build --platform ios --profile production --non-interactiveManaging Multiple Team Members
In a company, typically one person (the Account Holder) owns the Apple Developer account. Other developers are invited as Admin or App Manager roles in App Store Connect. Distribution certificates are tied to the Account Holder or an Admin. Using EAS Build means the certificate is stored in EAS's secure store and all team members can trigger builds without needing the private key on their personal Mac.
Certificate Expiry and Renewal
Apple distribution certificates are valid for one year. When a certificate expires, you cannot create new App Store builds until you renew it — but existing builds in the store continue to work fine. EAS Build notifies you before expiry and can auto-renew. If you manage certificates manually, set a calendar reminder 30 days before expiry. Revoking a certificate invalidates all provisioning profiles that reference it.
# Check certificate expiry via EAS
eas credentials --platform ios
# Shows:
# Distribution Certificate
# Expiration: Dec 15, 2026 (285 days remaining)
# Certificate ID: XXXXXXXXXX
# Renew before expiry to avoid build downtime:
# eas credentials --platform ios
# Select: Update Distribution CertificateQuick Check
Test your understanding of React Native Mobile Development concepts from this lesson.
Lesson Recap
In this lesson you learned: how to register an App ID in the Apple Developer Portal, how to generate a CSR and obtain a distribution certificate, and how provisioning profiles link the App ID and certificate for App Store builds. You also saw how EAS Build automates credential management so you rarely need to handle certificates manually. Next up we configure signing specifically with EAS Build.
คำถามที่พบบ่อย
บทเรียน “การตั้งค่าบัญชี Apple Developer และใบรับรอง” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “การตั้งค่าบัญชี Apple Developer และใบรับรอง” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส React Native Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส React Native Academy มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “การตั้งค่าบัญชี Apple Developer และใบรับรอง”
ลงทะเบียนบัญชี Apple Developer สร้าง App ID สร้างใบรับรองการเผยแพร่ใน Keychain Access และดาวน์โหลดโปรไฟล์การจัดสรรจากพอร์ทัลนักพัฒนา คุณปฏิบัติ React Native Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน React Native Academy หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน React Native Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน
บทเรียน “การตั้งค่าบัญชี Apple Developer และใบรับรอง” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน React Native Academy นี้ได้ไหม
ได้ บทเรียน React Native Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- การตั้งค่าบัญชี Apple Developer และใบรับรอง
- การกำหนดค่าการลงนามด้วย EAS Build
- การเตรียมข้อมูลเมตา App Store ใน App Store Connect
- การส่งตรวจสอบและการตอบสนองต่อการปฏิเสธ