Skip to content

Register your app via XCode Post-action script

  • An Apple Developer Program account
  • Your app’s source code
  • XCode 13+
  • macOS 11.3+
  1. Open your iOS app project in Xcode.

Open app in Xcode

Expected result: Project loads successfully and you can build/run normally.


  1. From the top menu, follow: Product > Scheme > Edit Scheme…

Edit Scheme

Expected result: The Scheme editor window opens.


  1. In the left panel, select Archive.
  2. Click Post-actions.

Post-actions

Expected result: You should see the Post-actions panel for the Archive action.


  1. Click the ”+” icon (bottom-left).
  2. Select New Run Script Action.
  3. Set Shell to /bin/bash.
  4. Check “Provide build settings from” and select your app target.

New Run Script Action

Important: “Provide build settings from” must be set to your app target. The script relies on build settings such as ARCHIVE_PATH; without this, the post-action exits without registering the build.

Expected result: A new run script action appears, with the shell set to /bin/bash and build settings provided by your app target.


Step 5: Paste the Post-Action Script and Set Your API Key

Section titled “Step 5: Paste the Post-Action Script and Set Your API Key”
  1. Paste the provided post_action_script into the script editor.
  2. Near the top of the script, replace the API key placeholder with your actual key:
  • Replace: alphyn_xxx (the value of AUTH_TOKEN)
  • With: your real API key from the Portal (it starts with alphyn_)

Important

  • Do not remove the quote marks.
  • Paste the key exactly as provided.
  • The key must belong to your iOS app registration (the app whose Platform is iOS and whose package name is this app’s bundle identifier). In a cross-platform (React Native/Flutter/Unity) project the Android app’s key is a different key and is not accepted here.

Paste post_action_script and set API key

Expected result: Script is saved under Archive > Post-actions and contains your API key.


Step 6: Open Frameworks, Libraries, and Embedded Content

Section titled “Step 6: Open Frameworks, Libraries, and Embedded Content”
  1. In Xcode, open: General > Your App Target > Frameworks, Libraries, and Embedded Content
  2. Click the ”+” icon at the bottom.

Frameworks, Libraries, and Embedded Content

Expected result: The “Add frameworks and libraries” modal opens.


  1. Click Add Other.
  2. Select Add Files…

Add Other > Add Files

Expected result: File picker opens.


  1. Select Alphyn.xcframework
  2. Click Open

Select Alphyn.xcframework

Expected result: Alphyn.xcframework is added to your target.

Tip If Xcode asks about embedding:

  • Prefer Embed & Sign for app targets.

  1. From the top menu, select: Product > Archive

Product > Archive

Expected result: Xcode starts archiving your app (you’ll see build progress).


  1. After archive finishes, Xcode Organizer opens automatically.
  2. You should see your archived build listed, indicating the integration and post-action executed.

Product > Archive

Expected result: Organizer shows your app archive and the app is considered registered/ready. Now you can safely close organizer.