Skip to content

iOS development hints&tips

Wiktor Sieprawski edited this page Feb 6, 2023 · 8 revisions

Updating provisioning profile in GitHub actions

Get the provisioning profile from App Store Connect, then encrypt it with gpg (do not use public-key cryptography).

gpg --output CI.mobileprovision.gpg --symmetric CI.mobileprovision

Type in secure passphrase and set it to $IOS_PROFILE_KEY in repository's secrets. The last step is to replace old .gpg file with the new one under .github/secrets

Exporting deployment Certificate

Running without build

Really handy thing is to run an app without re-building it first.
Simply use command + control + R, or go Product -> Perform action -> Run without build.

Sometimes you may want to edit files directly in build folder to immediately see the result, without having to wait for a build to finish. You can locate them at /Users/apple/Library/Developer/Xcode/DerivedData/Quiet-BUILD_HASH/Build/Products/Debug-iphoneos/Quiet.app.

Building .framework

Create a new Xcode project choosing "framework" type. Then to build a .framework, run following commands

xcodebuild archive \                                                     
  -project FRAMEWORK_NAME.xcodeproj \
  -scheme FRAMEWORK_NAME \
  -destination generic/platform=iOS \
  -archivePath "archives/FRAMEWORK_NAME" \
  SKIP_INSTALL=NO \

then

cp -r archives/FRAMEWORK_NAME.xcarchive/Products/Library/Frameworks/. archives/ios
Clone this wiki locally