# Fastlane Fastfile for automated deployment
default_platform(:ios)
platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
# Increment build number
increment_build_number(xcodeproj: "MyApp.xcodeproj")
# Build the app
build_app(
scheme: "MyApp",
export_method: "app-store",
export_options: {
provisioningProfiles: {
"com.myapp.MyApp" => "MyApp AppStore"
}
}
)
# Upload to TestFlight
upload_to_testflight(
skip_waiting_for_build_processing: true,
notify_external_testers: false
)
# Post to Slack
slack(
message: "Successfully uploaded new build to TestFlight",
success: true
)
end
desc "Deploy a new version to the App Store"
lane :release do
# Ensure clean git status
ensure_git_status_clean
# Run tests
run_tests(scheme: "MyApp")
# Increment version number
increment_version_number(
bump_type: "minor"
)
# Increment build number
increment_build_number(xcodeproj: "MyApp.xcodeproj")
# Build and upload
build_app(scheme: "MyApp", export_method: "app-store")
upload_to_app_store(
force: true,
submit_for_review: false,
automatic_release: false,
skip_metadata: false,
skip_screenshots: false
)
# Tag release
add_git_tag(
tag: "v#{get_version_number}"
)
push_to_git_remote
end
end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>My App</string>
<key>CFBundleIdentifier</key>
<string>com.myapp.MyApp</string>
<key>CFBundleVersion</key>
<string>1.2.3</string>
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<!-- Privacy Usage Descriptions -->
<key>NSCameraUsageDescription</key>
<string>We need camera access to let you upload photos to posts</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>We need photo library access to let you select images for your posts</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We use your location to show nearby posts</string>
<key>NSUserTrackingUsageDescription</key>
<string>We use tracking to provide personalized content and ads</string>
<!-- App Transport Security -->
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
</dict>
<!-- Supported interface orientations -->
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
Submitting to the App Store requires careful preparation and compliance with Apple's guidelines. I configure app metadata in App Store Connect—screenshots, descriptions, keywords, categories. The build must be archived with a distribution certificate and provisioning profile. Code signing ensures authenticity. TestFlight enables beta testing before public release—I invite internal and external testers, collect feedback, and iterate. Build versioning follows semantic versioning: major.minor.patch. Release notes describe changes clearly. Review guidelines prohibit certain content and functionality—I audit apps for compliance. Privacy policies are mandatory. Processing time varies, but typically 24-48 hours. Rejections require addressing specific issues and resubmission.