Continuous integration for iOS: CI as a service -Akos Birmacher
===
{%hackmd FGRWt1UuTFKk0wSbGgg-SA %}
> 請從這裡開始
## YouTube
{%youtube QSyfMbIYBcU %}







### Bitrise use virtual environment
- make sure it is clean
### Provisioning
- iOS Automatic provisioning, automatically download
- Export codesigning [codesigndoc]((https://github.com/bitrise-io/codesigndoc)
- codesigndoc scan xcode
- select your scheme
- select [development, app-store, adhoc]
- upload certs/provisioning to bitrise
## Best Pratices for iOS CI
### Disable spotlight on the build machine
it costs your resource, close it to save some
### Disable indexing during build
Indexing is for autocomplete, jump to definition
Xcode 10 -> `Enable Index-While-Building Functionality`
or
COMPILER_INDEX_STORE_ENABLE = NO
Flag to xcode command line
### Schedule at night
### Rolling builds
打開一些機制節約資源(如果有圖片支援可以幫我刪掉這段)
## Typical issues during CI run
### Missing development provisioning profile during IPA export
IPA export starts with an archive generation. Xcode will search for development profiles.
- Upload your certs and provisioning profiles to your CI service.
### Works locally but not on CI
If you're debugging an iOS test issue, always reset the iOS Simulator.
### UI test on a real device
- Registered appid on apple developer portal
- Code signing files
## Q&A
### How Bitrise works UITest on real device?
Bitrise use Firebase Test Lab, you don't have to subscribe Firebase Test Lab if you subscribe to bitrise.
###### tags:`iPlayground2019`