yukiarrr / ios-build-action

Build iOS project (.xcodeproj, .xcworkspace), and export ipa
MIT License
276 stars 133 forks source link

how to use multiple mobileprovision profiles? #75

Open B3ns44d opened 2 years ago

B3ns44d commented 2 years ago

so I've been trying to add multiple mobile provision profiles but I'm getting this error:

[11:03:11]: Installing provisioning profile...
[11:03:11]: Failure to decode /Users/runner/work/<PATH>/<APP_NAME>/ios-build-1.mobileprovision. Exit: 1: security: failed to add data to decoder: UNKNOWN (-8183(d)
security: problem decoding
[11:03:11]: Error parsing provisioning profile at path '/Users/runner/work/<PATH>/<APP_NAME>/ios-build-1.mobileprovision'
+------+------------------------------+-------------+
|                 fastlane summary                  |
+------+------------------------------+-------------+
| Step | Action                       | Time (in s) |
+------+------------------------------+-------------+
| 1    | default_platform             | 0           |
| 2    | create_keychain              | 0           |
| 3    | import_certificate           | 0           |
| 💥   | install_provisioning_profile | 0           |
+------+------------------------------+-------------+

[11:03:11]: fastlane finished with errors

this is the config I'm using:

    - name: Build The IOS App
        uses: yukiarrr/ios-build-action@v1.4.0
        with:
          project-path: ios/<APP_NAME>.xcodeproj
          p12-base64: ${{ secrets.IOS_CERTIFICATE_P12_BASE64 }}
          mobileprovision-base64: |
            ${{ secrets.APP_MOBILEPROVISION_BASE64 }}
            ${{ secrets.ONESIGNALNOTIFICATIONSERVICE_MOBILEPROVISION_BASE64 }}
          code-signing-identity: 'iPhone Distribution'
          team-id: ${{ secrets.APPSTORE_TEAM_ID }}
          certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
          workspace-path: ios/<APP_NAME>.xcworkspace
          scheme:<APP_NAME>

the issue here is that I don't quite understand how to use export-options

any help will be appreciated

minhchienwikipedia commented 2 years ago

You can use export-options like this

// put the path to the .plist file
export-options: ./ios/Options.plist 

The Options.plist should be like this

<?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>uploadBitcode</key>
    <true/>
    <key>compileBitcode</key>
    <true/>
    <key>uploadSymbols</key>
    <true/>
    <key>signingStyle</key>
    <string>manual</string>
    <key>signingCertificate</key>
    <string>Apple Development: Tony Duong</string>
    <key>provisioningProfiles</key>
    <dict>
        <key>com.example.dev</key>
                 <string>Demo Provisioning Development</string>
        <key>com.example.dev.ImageNotification</key>
                 <string>Demo Provisioning Development ImageNotification</string>
        <key>com.example</key>
                 <string>Demo Provisioning Production</string>
        <key>com.example.ImageNotification</key>
                 <string>Demo Provisioning Production ImageNotification</string>
    </dict>
</dict>
</plist>
CinGiu commented 2 years ago

hi @minhchienwikipedia

i've two provisioning too, but also with the export-options it can't get the right certificate how can i specify the provisioning? i tried with UUID or Name but it fails every time due to

[17:00:14]: ▸ ❌  error: No profile for team '***' matching 'EDC53DC2-456C-4FA1-B4DE-9634B34F2B78' found: Xcode couldn't find any provisioning profiles matching '***/EDC53DC2-456C-4FA1-B4DE-9634B34F2B78'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor
minhchienwikipedia commented 2 years ago

@CinGiu you must to defined correctly the name of Provisioning, it should be the same on Apple Developer

Screen Shot 2022-05-11 at 3 15 05 PM
crloeffler commented 1 year ago

@minhchienwikipedia @B3ns44d where you able to get the multiple profiles to work with mobileprovision-base64: | ${{ secrets.APP_MOBILEPROVISION_BASE64 }} ${{ secrets.ONESIGNALNOTIFICATIONSERVICE_MOBILEPROVISION_BASE64 }}

Would i need to do this and then also have the Options.plist? Or do you just need to do one or the other?