add testing code to iOS nightly jobs (#27784)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27784
## Summary
Since the nightly jobs are running without any testing code, we don't really have a way to verify the binary before uploading it to AWS. To make the work more solid, I came up with an approach to test our builds.
## How it works
The XCode tool chain offers a way to build your app without XCode app, which is the [xcodebuild](https://developer.apple.com/library/archive/technotes/tn2339/_index.html) command. So the approach is link our binaries to a testing app and run `xcodebuild` to see if there is any linking error. The PRs below have already done some of the preparation jobs
- [#26261](https://github.com/pytorch/pytorch/pull/26261) adds a dummy testing app
- [#26632](https://github.com/pytorch/pytorch/pull/26632) adds a ruby script that does all the XCode configuration.
The challenge comes when testing the arm64 build as we don't have a way to code-sign our TestApp. Circle CI has a [tutorial](https://circleci.com/docs/2.0/ios-codesigning/) but is too complicated to implement. Anyway, I figured out an easier way to do it
1. Disable automatically code sign in XCode (done #27591 )
2. Export the encoded developer certificate and provisioning profile to org-context in Circle CI (done)
3. Install the developer certificate to the key chain store on CI machines via Fastlane. (done #27593 )
4. Add the testing code to PR jobs and verify the result. (done #27594 )
5. Add the testing code to nightly jobs and verify the result.
## Test Plan
- Both PR jobs and nightly jobs can finish successfully.
- `xcodebuild` can finish successfully
Test Plan: Imported from OSS
Differential Revision: D17893271
Pulled By: xta0
fbshipit-source-id: cb7679224e062a4884615f625a2933cad8bd4c11