CLASSFUNC BLOG
We Share Our Knowledge
Hình ảnh thực tế khi build iOS app bằng Expo
Expo
Lê Thành
29 Th01 2021 10:57

Dưới đây là một số hình ảnh thực tế mà ClassFunc deploy Ví Của Tui iOS lên AppStore bằng Expo, hi vọng giúp ích cho ae nào đấy đang muốn làm App kiếm thêm vitamin T 😀

build ios-expo.svg

Bỏ qua bước đăng ký Apple các thể loại thì tóm tắt các bước như sau:

  1. Build bằng lệnh ở local
  2. Download file .ipa
  3. Chuyển giao .ipa lên StoreConnect bằng Transporter
  4. TestFlight
  5. Submit phiên bản mới.

1. Build bằng lệnh ở local

Chạy lệnh dưới trong thư mục project.

expo bi -t archive

Điền thông tin tài khoản Apple nếu được hỏi. Quá trình có log tương tự như:

Checking if there is a build in progress... Accessing credentials for classfunc in project vicuatui ✔ Do you have access to the Apple account that will be used for submitting this app to the App Store? … yes › Log in to your Apple Developer account to continue ✔ Apple ID: … thanh@classfunc.com › Using password for thanh@classfunc.com from your local Keychain Learn more: https://docs.expo.io/distribution/security#keychain ✔ Logged in, verify your Apple account to continue Two-factor Authentication (6 digit code) is enabled for thanh@classfunc.com. Learn more: https://support.apple.com/en-us/HT204915 ✔ How do you want to validate your account? … device / sms ✔ Please enter the 6 digit code … 860138 ✔ Valid code ✔ Logged in and verified › Team CLASSFUNC SOFTWARES JOINT STOCK COMPANY (98VU36Q5CS) › Provider CLASSFUNC SOFTWARES JOINT STOCK COMPANY (122472306) ✔ Bundle identifier registered com.classfunc.vicuatui ✔ Synced capabilities ✔ Fetched Apple distribution certificates ✔ Successfully validated Distribution Certificate against Apple Servers ✔ Fetched Apple push keys ✔ Successfully validated Push Key against Apple Servers The provisioning profile we have on file cannot be validated on Apple's servers. ✔ Successfully performed best effort validation of Provisioning Profile. Project Credential Configuration: Experience: @classfunc/vicuatui, bundle identifier: com.classfunc.vicuatui Provisioning profile (ID: ---------) Apple Team ID: 98VU36Q5CS, Apple Team Name: --------- Distribution Certificate - Certificate ID: ----- Apple Team ID: 98VU36Q5CS, Apple Team Name: --------- Push Notifications Key - Key ID: 73U3797KNT Apple Team ID: 98VU36Q5CS, Apple Team Name: --------- - Expo SDK: 40.0.0 - Release channel: default - Workflow: Managed Building optimized bundles and generating sourcemaps... Starting Metro Bundler Finished building JavaScript bundle in 118908ms. Bundle Size ┌ index.ios.js 4.94 MB ├ index.android.js 4.93 MB ├ index.ios.js.map 15.8 MB └ index.android.js.map 15.8 MB 💡 JavaScript bundle sizes affect startup time. Learn more: https://expo.fyi/javascript-bundle-sizes Analyzing assets Saving assets No assets changed, skipped. Processing asset bundle patterns: - /Users/thanh/WebstormProjects/vicuatui/assets/**/* Uploading JavaScript bundles {"name":"xdl-detach","hostname":"thanh-2.local”,…. Running postPublish hook: expo-postpublish-slack-notify Running postPublish hook: sentry-expo/upload-sourcemaps Publish complete 📝 Manifest: https://exp.host/@classfunc/vicuatui/index.exp?sdkVersion=40.0.0 Learn more: https://expo.fyi/manifest-url ⚙️ Project page: https://expo.io/@classfunc/vicuatui Learn more: https://expo.fyi/project-page Checking if this build already exists... Posted notification to Slack! Build started, it may take a few minutes to complete. You can check the queue length at https://expo.io/turtle-status You can monitor the build at https://expo.io/accounts/classfunc/builds/808d4da1-e789-4783-add8-76705fbfc182 Waiting for build to complete. You can press Ctrl+C to exit. It won't cancel the build, you'll be able to monitor it at the printed URL. ⠴ Created release 4.4-r.GgOmdU9WS. ⠋ Build in progress...> Found 4 release files > Analyzing 4 sources > Rewriting sources > Adding source map references > Bundled 4 files for upload > Uploaded release files to Sentry > File upload complete Source Map Upload Report Minified Scripts ~/index.android.bundle (sourcemap at index.android.bundle.map) ~/main.jsbundle (sourcemap at main.jsbundle.map) Source Maps ~/index.android.bundle.map ~/main.jsbundle.map ⠇ Build in progress...Finalized release 4.4-r.GgOmdU9WS. ✔ Build finished. Successfully built standalone app: https://expo.io/artifacts/640ddfe7-5d78-4d10-9f8b-d230eae6c41f You can now publish to the App Store with Transporter.app (​https://apps.apple.com/us/app/transporter/id1450874784​) or expo upload:ios. Learn more: https://docs.expo.io/distribution/uploading-apps/ Process finished with exit code 0

Chạy xong lệnh này ông Expo sẽ build file .ipa cho mình luôn, chờ tầm 5~phút gì đấy tuỳ độ to của dự án 😁

2. Download file .ipa

Lấy file .ipa đã được build ở Expo (nút màu xanh xanh)

0 ipa-download.png

3. Chuyển giao .ipa lên StoreConnect bằng Transporter

Mở Transporter và kéo thả file .ipa đã download về vào đó.

1 transport-ipa.png

4. TestFlight

5~10 phút sau ta sẽ nhận đc email từ Apple bảo là ông có thể test bằng TestFlight rồi đấy

2 after 5min receive-email.png

Sau đó mình kiểm tra trong Apple Store Connect thôi.

3 test-flight.png

5. Submit phiên bản mới.

Trong Connect mình tạo thêm phiên bản trùng với phiên bản mình đã build, xong điền một số thông tin update, mấy cái khác để nguyên nếu ko có thay đổi gì. Xong Save. Đợi 1,2 ngày cho ông Apple review, kết quả sẽ được Apple báo về email 😀

4 submit new version.png

Kết luận

Phát triển App là một nghề hot trước đây, bây giờ và tương lai rồi, ae nào chưa có việc thì học code đi, vừa dễ kiếm công ăn việc làm, ổn định lương cao mà còn thông não, ứng dụng vào cuộc sống nhiều nhiều.

ClassFunc release Ví Của Tui cả 3 platform iOS, Android, Web. Bạn nào có hứng thú với code thì vào ClassFunc cống hiến nhé 👍