# Packaging process and upload to Apple Store
###### tags: `iOS`
# Preparation Needed
Must have Set up iOS Certification first, if not done checkout [this tutorial](/1tCzOB3yTvC3BzVM6DGy6A)
# What websites do we need?
Apple developer : https://developer.apple.com/
Apple store connect: https://appstoreconnect.apple.com/
PS: Keep them opened and signed in.
# Step to Archive Project (Either build or upload to Apple Store)
## Open your project in xCode

## Set your project to **build in Any iOS Device**

## Click Parent Folder
### General Tab
You will get to a file called **XX.xcodeproj**, this is used to set up general settings for this project.
In **General** tab you can control:
1. Name of App
2. Bundle Identifier
3. Version
4. Which Build are you in (How many times this project was build, this one will be increasing as long as you are on same version)
Note:
Where do we get **Bundle Identifier**?
Answer: Go to [Apple store connect](https://appstoreconnect.apple.com/), look up for your app and check App Info. There you will get Bundle Identifier(套件識別碼)
>**Project Setting:** [color=orange]
> 
### Signing & Capabilities
Remember to select your team or you will encounter problems when doing archive to your project. Also check out that the bundle identifier is correct.

## Build And Upload to Testflight
### Go to **Product** > **Archive**
**Problems that you may encounter:**
1. Archive is in grey condition
Note: Probably means that you did not set your project to be build in Any iOS Device.
1. Error Msg: Signing for "ProjectName" requires a development team. Select a development team in the Signing & Capabilities editor.
Note: This means you did not change the **Signing & Capabilities team** (For this check out previous step)

### Press Distribute App

### Press App Store Connect

### Click distribution options and Next

### Check up app content and upload

### Go to [App Store Connect](https://appstoreconnect.apple.com/ ) App > TestFlight Tab
You will see the upload there, and it usually takes 5~10mins to finish uploading.

## Upload to Apple Store
**Pending**
# Problems you may encounter:
**Apple Developer Program Issue:**
> Team "XXX (Personal Team)" is not enrolled in the Apple Developer Program.
> We need to enroll to developer program to upload to testflight. Note: you need to pay in order to enroll. [color=lightgreen]
**Upload to Testflight, but status shows "Export compliance information"(缺少出口合規資訊):**
1. Click Management
>
2. Choose No and click to start internal testing.
>