customerio / customerio-reactnative

MIT License
25 stars 11 forks source link

Build Fails with "useRichPush": true #172

Closed sergey-king closed 1 year ago

sergey-king commented 1 year ago

EAS build fails with useRichPush set to true. Only works with "useRichPush": false,

xCode log - xcode-build-dc17f042-d9e6-4363-9fc6-13b0562634d6.log

"expo": "~48.0.18", "react-native": "0.71.8", "customerio-expo-plugin": "^1.0.0-beta.12", "customerio-reactnative": "3.1.3",

Plugin

    "customerio-expo-plugin",
                {
                    "android": {
                        "googleServicesFile": "./google-services-staging.json"
                    },
                    "ios": {
                        "push notification": {
                            "useRichPush": true,
                            "env": {
                                "siteId": "{SECRET_ID}",
                                "apiKey": "{SECRET_KEY}",
                                "region": "US"
                            }
                        }
                    }
                }

iOS specifc

    [
                "expo-build-properties",
                {
                    "ios": {
                        "deploymentTarget": "13.0"
                    }
                }
            ]

iOS Rich Push

     "build": {
            "experimental": {
                "ios": {
                    "appExtensions": [
                        {
                            "targetName": "NotificationService",
                            "bundleIdentifier": "${appIdentifier}.richpush"
                        }
                    ]
                }
            }
        },

Init

const env = new CustomerIOEnv();
env.siteId = Constants.expoConfig?.extra?.CUSTOMER_IO_SITE_ID;
env.apiKey = Constants.expoConfig?.extra?.CUSTOMER_IO_API_KEY;
env.region = Region.US;

const data = new CustomerioConfig();
data.logLevel = __DEV__ ? CioLogLevel.debug : CioLogLevel.error;
data.autoTrackDeviceAttributes = true;
data.autoTrackPushEvents = true;
data.enableInApp = true;

CustomerIO.initialize(env, data);

Build fails at "Run Fastline" step. Log:

Creating Gymfile

Gymfile created

Successfully loaded '/Users/expo/workingdir/build/apps/native/ios/Gymfile' 📄

+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

|                                                                  Detected Values from './Gymfile'                                                                   |

+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

| suppress_xcode_output | true                                                                                                                                        |

| clean                 | false                                                                                                                                       |

| scheme                | JockMKTStaging                                                                                                                              |

| configuration         | Release                                                                                                                                     |

| export_options        |                                                                                                                                             |

| export_xcargs         | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/rp/_x4mwf8x2f52ml0n3qt65jw80000gn/T/turtle-v2-4719714f-aa9b-4a01-b9ee-5d991d1640ac.keychain" |

| disable_xcpretty      | true                                                                                                                                        |

| buildlog_path         | /Users/expo/workingdir/logs                                                                                                                 |

| output_directory      | ./build                                                                                                                                     |

+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

Resolving Swift Package Manager dependencies...

$ xcodebuild -resolvePackageDependencies -workspace ./JockMKTStaging.xcworkspace -scheme JockMKTStaging -configuration Release

▸ Command line invocation:

▸     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ./JockMKTStaging.xcworkspace -scheme JockMKTStaging -configuration Release

▸ User defaults from command line:

▸     IDEPackageSupportUseBuiltinSCM = YES

▸ --- xcodebuild: WARNING: Using the first of multiple matching destinations:

▸ { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-66D45333AEB93EDA }

▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

▸ { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }

▸ { platform:iOS Simulator, id:94EE5B62-6A73-4410-8C64-A56FBFD9C55D, OS:16.2, name:iPad (10th generation) }

▸ { platform:iOS Simulator, id:537FF0C8-8B14-4E2E-9828-0ED246BE9E38, OS:16.2, name:iPad Air (5th generation) }

▸ { platform:iOS Simulator, id:777A520C-1C1B-484A-99C6-35943FA97067, OS:16.2, name:iPad Pro (11-inch) (4th generation) }

▸ { platform:iOS Simulator, id:A5447295-3264-4816-9C78-50E5F35C1122, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }

▸ { platform:iOS Simulator, id:067F74D9-EEC3-4066-B8A8-B3EAD0EE5649, OS:16.2, name:iPad mini (6th generation) }

▸ { platform:iOS Simulator, id:3A1FD6BA-A84C-4728-A0AA-E7D9DF147BA7, OS:16.2, name:iPhone 14 }

▸ { platform:iOS Simulator, id:5D252FD0-2816-4FAE-B85D-C29DC8D2C73C, OS:16.2, name:iPhone 14 Plus }

▸ { platform:iOS Simulator, id:AA475350-BBB4-4568-A722-4528CF187FA8, OS:16.2, name:iPhone 14 Pro }

▸ { platform:iOS Simulator, id:01B24393-FC59-4FEC-87FD-338E47BABDAE, OS:16.2, name:iPhone 14 Pro Max }

▸ { platform:iOS Simulator, id:88B2387A-FF6D-4979-9155-B06611A97148, OS:16.2, name:iPhone SE (3rd generation) }

▸ resolved source packages:

$ xcodebuild -showBuildSettings -workspace ./JockMKTStaging.xcworkspace -scheme JockMKTStaging -configuration Release

[stderr] 
--- xcodebuild: WARNING: Using the first of multiple matching destinations:

[stderr] 
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-66D45333AEB93EDA }

[stderr] 
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

[stderr] 
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }

[stderr] 
{ platform:iOS Simulator, id:94EE5B62-6A73-4410-8C64-A56FBFD9C55D, OS:16.2, name:iPad (10th generation) }

[stderr] 
{ platform:iOS Simulator, id:537FF0C8-8B14-4E2E-9828-0ED246BE9E38, OS:16.2, name:iPad Air (5th generation) }

[stderr] 
{ platform:iOS Simulator, id:777A520C-1C1B-484A-99C6-35943FA97067, OS:16.2, name:iPad Pro (11-inch) (4th generation) }

[stderr] 
{ platform:iOS Simulator, id:A5447295-3264-4816-9C78-50E5F35C1122, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }

[stderr] 
{ platform:iOS Simulator, id:067F74D9-EEC3-4066-B8A8-B3EAD0EE5649, OS:16.2, name:iPad mini (6th generation) }

[stderr] 
{ platform:iOS Simulator, id:3A1FD6BA-A84C-4728-A0AA-E7D9DF147BA7, OS:16.2, name:iPhone 14 }

[stderr] 
{ platform:iOS Simulator, id:5D252FD0-2816-4FAE-B85D-C29DC8D2C73C, OS:16.2, name:iPhone 14 Plus }

[stderr] 
{ platform:iOS Simulator, id:AA475350-BBB4-4568-A722-4528CF187FA8, OS:16.2, name:iPhone 14 Pro }

[stderr] 
{ platform:iOS Simulator, id:01B24393-FC59-4FEC-87FD-338E47BABDAE, OS:16.2, name:iPhone 14 Pro Max }

[stderr] 
{ platform:iOS Simulator, id:88B2387A-FF6D-4979-9155-B06611A97148, OS:16.2, name:iPhone SE (3rd generation) }

Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...

[stderr] 
2023-07-20 11:25:22.263 xcodebuild[11574:26861] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition

[stderr] 
--- xcodebuild: WARNING: Using the first of multiple matching destinations:

[stderr] 
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-66D45333AEB93EDA }

[stderr] 
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

[stderr] 
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }

[stderr] 
{ platform:iOS Simulator, id:94EE5B62-6A73-4410-8C64-A56FBFD9C55D, OS:16.2, name:iPad (10th generation) }

[stderr] 
{ platform:iOS Simulator, id:537FF0C8-8B14-4E2E-9828-0ED246BE9E38, OS:16.2, name:iPad Air (5th generation) }

[stderr] 
{ platform:iOS Simulator, id:777A520C-1C1B-484A-99C6-35943FA97067, OS:16.2, name:iPad Pro (11-inch) (4th generation) }

[stderr] 
{ platform:iOS Simulator, id:A5447295-3264-4816-9C78-50E5F35C1122, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }

[stderr] 
{ platform:iOS Simulator, id:067F74D9-EEC3-4066-B8A8-B3EAD0EE5649, OS:16.2, name:iPad mini (6th generation) }

[stderr] 
{ platform:iOS Simulator, id:3A1FD6BA-A84C-4728-A0AA-E7D9DF147BA7, OS:16.2, name:iPhone 14 }

[stderr] 
{ platform:iOS Simulator, id:5D252FD0-2816-4FAE-B85D-C29DC8D2C73C, OS:16.2, name:iPhone 14 Plus }

[stderr] 
{ platform:iOS Simulator, id:AA475350-BBB4-4568-A722-4528CF187FA8, OS:16.2, name:iPhone 14 Pro }

[stderr] 
{ platform:iOS Simulator, id:01B24393-FC59-4FEC-87FD-338E47BABDAE, OS:16.2, name:iPhone 14 Pro Max }

[stderr] 
{ platform:iOS Simulator, id:88B2387A-FF6D-4979-9155-B06611A97148, OS:16.2, name:iPhone SE (3rd generation) }

[stderr] 
2023-07-20 11:25:23.094 xcodebuild[11589:26971] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition

Detected provisioning profile mapping: {:"com.jockmkt.staging.eas"=>"57226549-1ffe-42c5-8a18-17667b4411b7"}

+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

|                                                                                          Summary for gym 2.211.0                                                                                          |

+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

| workspace                                                   | ./JockMKTStaging.xcworkspace                                                                                                                |

| scheme                                                      | JockMKTStaging                                                                                                                              |

| clean                                                       | false                                                                                                                                       |

| output_directory                                            | ./build                                                                                                                                     |

| output_name                                                 | JockMKTStaging                                                                                                                              |

| configuration                                               | Release                                                                                                                                     |

| silent                                                      | false                                                                                                                                       |

| skip_package_ipa                                            | false                                                                                                                                       |

| skip_package_pkg                                            | false                                                                                                                                       |

| export_options.method                                       | app-store                                                                                                                                   |

| export_options.provisioningProfiles.com.jockmkt.staging.eas | 57226549-1ffe-42c5-8a18-17667b4411b7                                                                                                        |

| export_xcargs                                               | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/rp/_x4mwf8x2f52ml0n3qt65jw80000gn/T/turtle-v2-4719714f-aa9b-4a01-b9ee-5d991d1640ac.keychain" |

| build_path                                                  | /Users/expo/Library/Developer/Xcode/Archives/2023-07-20                                                                                     |

| result_bundle                                               | false                                                                                                                                       |

| buildlog_path                                               | /Users/expo/workingdir/logs                                                                                                                 |

| destination                                                 | generic/platform=iOS                                                                                                                        |

| suppress_xcode_output                                       | true                                                                                                                                        |

| xcodebuild_formatter                                        | xcpretty                                                                                                                                    |

| disable_xcpretty                                            | true                                                                                                                                        |

| skip_profile_detection                                      | false                                                                                                                                       |

| xcodebuild_command                                          | xcodebuild                                                                                                                                  |

| skip_package_dependencies_resolution                        | false                                                                                                                                       |

| disable_package_automatic_updates                           | false                                                                                                                                       |

| use_system_scm                                              | false                                                                                                                                       |

| xcode_path                                                  | /Applications/Xcode.app                                                                                                                     |

+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

$ set -o pipefail && xcodebuild -workspace ./JockMKTStaging.xcworkspace -scheme JockMKTStaging -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/expo/Library/Developer/Xcode/Archives/2023-07-20/JockMKTStaging\ 2023-07-20\ 11.25.23.xcarchive archive | tee /Users/expo/workingdir/logs/JockMKTStaging-JockMKTStaging.log > /dev/null

    Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')

    Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXUpdates' from project 'Pods')

    Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'JockMKTStaging' from project 'JockMKTStaging')

    Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'JockMKTStaging' from project 'JockMKTStaging')

    Run script build phase 'Upload Debug Symbols to Sentry' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'JockMKTStaging' from project 'JockMKTStaging')

▸ ** ARCHIVE FAILED **

** ARCHIVE FAILED **

Exit status: 65

+-------------+-------------------------+

|           Build environment           |

+-------------+-------------------------+

| xcode_path  | /Applications/Xcode.app |

| gym_version | 2.211.0                 |

| sdk         | iPhoneOS16.2.sdk        |

+-------------+-------------------------+

Looks like fastlane ran into a build/archive error with your project

It's hard to tell what's causing the error, so we wrote some guides on how

to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/

Before submitting an issue on GitHub, please follow the guide above and make

sure your project is set up correctly.

fastlane uses `xcodebuild` commands to generate your binary, you can see the

the full commands printed out in yellow in the above log.

Make sure to inspect the output above, as usually you'll find more error information there

[stderr] 
[!] Error building the application - see the log above

Error: The "Run fastlane" step failed with an unknown error. Refer to "Xcode Logs" below for additional, more detailed logs.
ami-aman commented 1 year ago

Hi @sergey-king

Thank you for reaching out. I apologize for any inconvenience this may have caused.

To help resolve the issue, please confirm that you are able to run the expo prebuild --clean command when trying to prebuild locally. I am also trying to reproduce the issue so that I can assist you better.

Thank you for your patience.

sergey-king commented 1 year ago

Hi @ami-aman

Thank you for looking at this! Yes, I confirm I'm able to run expo prebuild --clean. I'm experiencing this build error after a successful prebuild

ami-aman commented 1 year ago

Thanks for confirming @sergey-king !

I haven't been able to reproduce the issue myself, but I think it might be related to the target name. Our plugin creates an extension named CIONotificationService, but you're setting the targetName property to NotificationService in the app extension configuration. Based on the logs you shared, it looks like the issue is with the target name.

   "build": {
            "experimental": {
                "ios": {
                    "appExtensions": [
                        {
                            "targetName": "NotificationService", // Change this to CIONotificationService
                            "bundleIdentifier": "${appIdentifier}.richpush"
                        }
                    ]
                }
            }
        },

Would you mind trying to change the target name to CIONotificationService and creating a build? This might resolve the issue.

Let me know if you have any other questions.

sergey-king commented 1 year ago

@ami-aman I've followed the official docs here - https://customer.io/docs/sdk/expo/getting-started/#ios-specific-instructions It does state "targetName": "NotificationService",.

I'll try to update it to CIONotificationService and report back. Thanks

Screenshot 2023-07-21 at 2 09 00 PM
sergey-king commented 1 year ago

iOS build failed with "targetName": "CIONotificationService", and "useRichPush": true, Xcode logs - xcode-build-ac24fbc3-4cef-46a9-a696-ed00617d98ce.log

FastLine log

Creating Gymfile

Gymfile created

Successfully loaded '/Users/expo/workingdir/build/apps/native/ios/Gymfile' 📄

+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

|                                                                  Detected Values from './Gymfile'                                                                   |

+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

| suppress_xcode_output | true                                                                                                                                        |

| clean                 | false                                                                                                                                       |

| scheme                | JockMKTStaging                                                                                                                              |

| configuration         | Release                                                                                                                                     |

| export_options        |                                                                                                                                             |

| export_xcargs         | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/rp/_x4mwf8x2f52ml0n3qt65jw80000gn/T/turtle-v2-54ce9a92-c4f8-4c08-bcc0-5a0bd1f51f56.keychain" |

| disable_xcpretty      | true                                                                                                                                        |

| buildlog_path         | /Users/expo/workingdir/logs                                                                                                                 |

| output_directory      | ./build                                                                                                                                     |

+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

Resolving Swift Package Manager dependencies...

$ xcodebuild -resolvePackageDependencies -workspace ./JockMKTStaging.xcworkspace -scheme JockMKTStaging -configuration Release

▸ Command line invocation:

▸     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ./JockMKTStaging.xcworkspace -scheme JockMKTStaging -configuration Release

▸ User defaults from command line:

▸     IDEPackageSupportUseBuiltinSCM = YES

▸ --- xcodebuild: WARNING: Using the first of multiple matching destinations:

▸ { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-66D45333AEB93EDA }

▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

▸ { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }

▸ { platform:iOS Simulator, id:94EE5B62-6A73-4410-8C64-A56FBFD9C55D, OS:16.2, name:iPad (10th generation) }

▸ { platform:iOS Simulator, id:537FF0C8-8B14-4E2E-9828-0ED246BE9E38, OS:16.2, name:iPad Air (5th generation) }

▸ { platform:iOS Simulator, id:777A520C-1C1B-484A-99C6-35943FA97067, OS:16.2, name:iPad Pro (11-inch) (4th generation) }

▸ { platform:iOS Simulator, id:A5447295-3264-4816-9C78-50E5F35C1122, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }

▸ { platform:iOS Simulator, id:067F74D9-EEC3-4066-B8A8-B3EAD0EE5649, OS:16.2, name:iPad mini (6th generation) }

▸ { platform:iOS Simulator, id:3A1FD6BA-A84C-4728-A0AA-E7D9DF147BA7, OS:16.2, name:iPhone 14 }

▸ { platform:iOS Simulator, id:5D252FD0-2816-4FAE-B85D-C29DC8D2C73C, OS:16.2, name:iPhone 14 Plus }

▸ { platform:iOS Simulator, id:AA475350-BBB4-4568-A722-4528CF187FA8, OS:16.2, name:iPhone 14 Pro }

▸ { platform:iOS Simulator, id:01B24393-FC59-4FEC-87FD-338E47BABDAE, OS:16.2, name:iPhone 14 Pro Max }

▸ { platform:iOS Simulator, id:88B2387A-FF6D-4979-9155-B06611A97148, OS:16.2, name:iPhone SE (3rd generation) }

▸ resolved source packages:

$ xcodebuild -showBuildSettings -workspace ./JockMKTStaging.xcworkspace -scheme JockMKTStaging -configuration Release

[stderr] 
--- xcodebuild: WARNING: Using the first of multiple matching destinations:

[stderr] 
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-66D45333AEB93EDA }

[stderr] 
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

[stderr] 
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }

[stderr] 
{ platform:iOS Simulator, id:94EE5B62-6A73-4410-8C64-A56FBFD9C55D, OS:16.2, name:iPad (10th generation) }

[stderr] 
{ platform:iOS Simulator, id:537FF0C8-8B14-4E2E-9828-0ED246BE9E38, OS:16.2, name:iPad Air (5th generation) }

[stderr] 
{ platform:iOS Simulator, id:777A520C-1C1B-484A-99C6-35943FA97067, OS:16.2, name:iPad Pro (11-inch) (4th generation) }

[stderr] 
{ platform:iOS Simulator, id:A5447295-3264-4816-9C78-50E5F35C1122, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }

[stderr] 
{ platform:iOS Simulator, id:067F74D9-EEC3-4066-B8A8-B3EAD0EE5649, OS:16.2, name:iPad mini (6th generation) }

[stderr] 
{ platform:iOS Simulator, id:3A1FD6BA-A84C-4728-A0AA-E7D9DF147BA7, OS:16.2, name:iPhone 14 }

[stderr] 
{ platform:iOS Simulator, id:5D252FD0-2816-4FAE-B85D-C29DC8D2C73C, OS:16.2, name:iPhone 14 Plus }

[stderr] 
{ platform:iOS Simulator, id:AA475350-BBB4-4568-A722-4528CF187FA8, OS:16.2, name:iPhone 14 Pro }

[stderr] 
{ platform:iOS Simulator, id:01B24393-FC59-4FEC-87FD-338E47BABDAE, OS:16.2, name:iPhone 14 Pro Max }

[stderr] 
{ platform:iOS Simulator, id:88B2387A-FF6D-4979-9155-B06611A97148, OS:16.2, name:iPhone SE (3rd generation) }

Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...

[stderr] 
2023-07-21 11:24:51.095 xcodebuild[11551:26789] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition

[stderr] 
--- xcodebuild: WARNING: Using the first of multiple matching destinations:

[stderr] 
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-66D45333AEB93EDA }

[stderr] 
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

[stderr] 
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }

[stderr] 
{ platform:iOS Simulator, id:94EE5B62-6A73-4410-8C64-A56FBFD9C55D, OS:16.2, name:iPad (10th generation) }

[stderr] 
{ platform:iOS Simulator, id:537FF0C8-8B14-4E2E-9828-0ED246BE9E38, OS:16.2, name:iPad Air (5th generation) }

[stderr] 
{ platform:iOS Simulator, id:777A520C-1C1B-484A-99C6-35943FA97067, OS:16.2, name:iPad Pro (11-inch) (4th generation) }

[stderr] 
{ platform:iOS Simulator, id:A5447295-3264-4816-9C78-50E5F35C1122, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }

[stderr] 
{ platform:iOS Simulator, id:067F74D9-EEC3-4066-B8A8-B3EAD0EE5649, OS:16.2, name:iPad mini (6th generation) }

[stderr] 
{ platform:iOS Simulator, id:3A1FD6BA-A84C-4728-A0AA-E7D9DF147BA7, OS:16.2, name:iPhone 14 }

[stderr] 
{ platform:iOS Simulator, id:5D252FD0-2816-4FAE-B85D-C29DC8D2C73C, OS:16.2, name:iPhone 14 Plus }

[stderr] 
{ platform:iOS Simulator, id:AA475350-BBB4-4568-A722-4528CF187FA8, OS:16.2, name:iPhone 14 Pro }

[stderr] 
{ platform:iOS Simulator, id:01B24393-FC59-4FEC-87FD-338E47BABDAE, OS:16.2, name:iPhone 14 Pro Max }

[stderr] 
{ platform:iOS Simulator, id:88B2387A-FF6D-4979-9155-B06611A97148, OS:16.2, name:iPhone SE (3rd generation) }

[stderr] 
2023-07-21 11:24:51.814 xcodebuild[11569:26906] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition

Detected provisioning profile mapping: {:"com.jockmkt.staging.eas"=>"ba5edd92-63eb-4da1-852c-305ba0bd7219"}

+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

|                                                                                          Summary for gym 2.211.0                                                                                          |

+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

| workspace                                                   | ./JockMKTStaging.xcworkspace                                                                                                                |

| scheme                                                      | JockMKTStaging                                                                                                                              |

| clean                                                       | false                                                                                                                                       |

| output_directory                                            | ./build                                                                                                                                     |

| output_name                                                 | JockMKTStaging                                                                                                                              |

| configuration                                               | Release                                                                                                                                     |

| silent                                                      | false                                                                                                                                       |

| skip_package_ipa                                            | false                                                                                                                                       |

| skip_package_pkg                                            | false                                                                                                                                       |

| export_options.method                                       | app-store                                                                                                                                   |

| export_options.provisioningProfiles.com.jockmkt.staging.eas | ba5edd92-63eb-4da1-852c-305ba0bd7219                                                                                                        |

| export_xcargs                                               | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/rp/_x4mwf8x2f52ml0n3qt65jw80000gn/T/turtle-v2-54ce9a92-c4f8-4c08-bcc0-5a0bd1f51f56.keychain" |

| build_path                                                  | /Users/expo/Library/Developer/Xcode/Archives/2023-07-21                                                                                     |

| result_bundle                                               | false                                                                                                                                       |

| buildlog_path                                               | /Users/expo/workingdir/logs                                                                                                                 |

| destination                                                 | generic/platform=iOS                                                                                                                        |

| suppress_xcode_output                                       | true                                                                                                                                        |

| xcodebuild_formatter                                        | xcpretty                                                                                                                                    |

| disable_xcpretty                                            | true                                                                                                                                        |

| skip_profile_detection                                      | false                                                                                                                                       |

| xcodebuild_command                                          | xcodebuild                                                                                                                                  |

| skip_package_dependencies_resolution                        | false                                                                                                                                       |

| disable_package_automatic_updates                           | false                                                                                                                                       |

| use_system_scm                                              | false                                                                                                                                       |

| xcode_path                                                  | /Applications/Xcode.app                                                                                                                     |

+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+

$ set -o pipefail && xcodebuild -workspace ./JockMKTStaging.xcworkspace -scheme JockMKTStaging -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/expo/Library/Developer/Xcode/Archives/2023-07-21/JockMKTStaging\ 2023-07-21\ 11.24.51.xcarchive archive | tee /Users/expo/workingdir/logs/JockMKTStaging-JockMKTStaging.log > /dev/null

    Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')

    Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXUpdates' from project 'Pods')

    Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'JockMKTStaging' from project 'JockMKTStaging')

    Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'JockMKTStaging' from project 'JockMKTStaging')

    Run script build phase 'Upload Debug Symbols to Sentry' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'JockMKTStaging' from project 'JockMKTStaging')

▸ ** ARCHIVE FAILED **

** ARCHIVE FAILED **

Exit status: 65

+-------------+-------------------------+

|           Build environment           |

+-------------+-------------------------+

| xcode_path  | /Applications/Xcode.app |

| gym_version | 2.211.0                 |

| sdk         | iPhoneOS16.2.sdk        |

+-------------+-------------------------+

Looks like fastlane ran into a build/archive error with your project

It's hard to tell what's causing the error, so we wrote some guides on how

to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/

Before submitting an issue on GitHub, please follow the guide above and make

sure your project is set up correctly.

fastlane uses `xcodebuild` commands to generate your binary, you can see the

the full commands printed out in yellow in the above log.

Make sure to inspect the output above, as usually you'll find more error information there

[stderr] 
[!] Error building the application - see the log above

Error: The "Run fastlane" step failed with an unknown error. Refer to "Xcode Logs" below for additional, more detailed logs.

cc: @szt217

ami-aman commented 1 year ago

Thanks for confirming @sergey-king and sharing logs with us. I am not able to reproduce the issue on my end that makes it hard to debug but I will still try to help you solve this issue.

Before I proceed with assistance, could you kindly respond to a few additional inquiries:

  1. Have you attempted to run the command expo prebuild --clean without using any experimental configurations? If so, did the error still occur in this scenario?
  2. Have you checked the related Github issue to see if there are any solutions or insights provided there?
  3. Could you specify the file in which you added the appExtension configuration? It seems that we are not mentioning in our documentation that these configurations should be added to either app.json or app.plugin.js.
  4. Lastly, could you confirm whether the "push notification" referring to your initial description, is pushNotification in your file and not "push notification" ?
    "customerio-expo-plugin",
                {
                    "android": {
                        "googleServicesFile": "./google-services-staging.json"
                    },
                    "ios": {
                        "push notification": {
                            "useRichPush": true,
                            "env": {
                                "siteId": "{SECRET_ID}",
                                "apiKey": "{SECRET_KEY}",
                                "region": "US"
                            }
                        }
                    }
                }
sergey-king commented 1 year ago

Hi @ami-aman, 3 & 4 - the "push notification" is just a typo here sorry. This is the actual config we have in our app.json with pushNotification as a single word

"ios": {
                        "pushNotification": {
                            "useRichPush": true,
                            "env": {
                                "siteId": "{SECRET_ID}",
                                "apiKey": "{SECRET_KEY}",
                                "region": "US"
                            }
                        }
                    }

prebuild command finishes regardless of the changes, it's the build step we have issues with.

Let me check the related issue and I will get back to you later today. Thanks!

sergey-king commented 1 year ago

Confirming the same issue on

"customerio-expo-plugin": "^1.0.0-beta.12",
"customerio-reactnative": "3.1.7",

I believe the issue is that even with "useRichPush": true, EAS is not adding richpush target while generating new provisioning profile for the build. It does invalidate provisioning profile & generates a new one after switching useRichPush to true/false, but it just not adding the richpush target/service on true

useRichPush: false - ✔ Push Notifications setup for jockmkt_staging_eas: com.jockmkt.staging.eas useRichPush: true - ✔ Push Notifications setup for jockmkt_staging_eas: com.jockmkt.staging.eas - I would expect to see something like com.jockmkt.staging.eas.richpush here @ami-aman

I confirm we run npx expo prebuild --clean each time after updating "useRichPush": true/false" prebuild succeeds in both cases but the eas build --platform all succeeds only with "useRichPush": false"

sergey-king commented 1 year ago

Build error with "useRichPush": true" @ami-aman

Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace ./JockMKTStaging.xcworkspace -scheme JockMKTStaging -configuration Release -destination generic/platform=iOS -archivePath "/Users/expo/Library/Developer/Xcode/Archives/2023-07-31/JockMKTStaging 2023-07-31 12.45.48.xcarchive" archive

User defaults from command line:
    IDEArchivePathOverride = /Users/expo/Library/Developer/Xcode/Archives/2023-07-31/JockMKTStaging 2023-07-31 12.45.48.xcarchive
    IDEPackageSupportUseBuiltinSCM = YES

Prepare packages

Computing target dependency graph and provisioning inputs

Create build description
Build description signature: 47ebdf43e2881cf76673e97229faaa2a
Build description path: /Users/expo/Library/Developer/Xcode/DerivedData/JockMKTStaging-dkrrutkpgqohdjfwuerrbwzpyvym/Build/Intermediates.noindex/ArchiveIntermediates/JockMKTStaging/IntermediateBuildFilesPath/XCBuildData/47ebdf43e2881cf76673e97229faaa2a-desc.xcbuild

note: Building targets in dependency order
/Users/expo/workingdir/build/apps/native/ios/JockMKTStaging.xcodeproj: error: No profiles for 'com.jockmkt.staging.eas.richpush' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.jockmkt.staging.eas.richpush'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'NotificationService' from project 'JockMKTStaging')
warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'JockMKTStaging' from project 'JockMKTStaging')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'JockMKTStaging' from project 'JockMKTStaging')
warning: Run script build phase 'Upload Debug Symbols to Sentry' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'JockMKTStaging' from project 'JockMKTStaging')
warning: Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
warning: Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXUpdates' from project 'Pods')
sergey-king commented 1 year ago

@ami-aman any updates on this?

ami-aman commented 1 year ago

Hey @sergey-king Thank you for your patience as our team works on this issue. We have not been able to reproduce the issue yet, so it is taking us longer to debug. We are still actively working on it and will keep you updated on our progress.

ami-aman commented 1 year ago

@sergey-king I want to do a quick check. Is the bundle identifier for the NotificationService target set to com.jockmkt.staging.eas.richpush match the identifier you've established in your Apple Developer account?

It appears that when useRichPush is set to true, our plugin generates a default bundle identifier labeled as bundle_identifer_of_parent_target.richpush and EAS is not able to find a matching Bundle id in the Apple Developer account. Your confirmation will help us make sure that we are on the right track.

We will do our best to help you.

sergey-king commented 1 year ago

Hey @ami-aman thanks for getting back to me!

Per our app.json the ios bundleIdentifier is set to "bundleIdentifier": "com.jockmkt.staging.eas". At developer.apple.com in Certificates, Identifiers & Profiles I can see both identifiers com.jockmkt.staging.eas and com.jockmkt.staging.eas.richpush

sergey-king commented 1 year ago

I've been seing com.jockmkt.staging.eas.richpush notification target generated and added by EAS build while using the older 2.4.X customerio-reactnative package. However, once we updated to the latest customerio-reactnative.3.1.7 - I've stopped seeing com.jockmkt.staging.eas.richpush notification tagert being added by EAS build process anymore

ami-aman commented 1 year ago

Hi @sergey-king

Thank you for sharing the details; they are indeed quite valuable!

We've investigated the issue and believe it may be caused by an outdated eas-cli version. We're not sure yet, but I wanted to give you a heads up as we continue to investigate. The latest eas-cli version is 3.18.3. Can you check on your end to see if whether you have updated version of eas-cli and make an attempt with latest eas-cli? Note that we haven't been able to reproduce the issue yet, which makes it difficult to debug.

The issue may also be related to EAS not being able to fetch the required provisioning profiles and certificates for NotificationServiceExtension from your Apple account. If that's the case, you could try creating eas build with local credentials as mentioned in Expo docs.

Rest assured, we're actively investigating this issue and will keep you well-informed of any developments.

I sincerely apologize for any inconvenience, and I greatly appreciate you for your understanding and patience. Do let us know if you have any queries with the update.

sergey-king commented 1 year ago

@ami-aman after updating to the latest eas-cli eas-cli/3.18.3 darwin-arm64 node-v18.16.1 the prebuild command fails with the following error

✔ Config synced
⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: 
[!] Invalid `customerio-reactnative.podspec` file: [!] Unsupported version requirements. [nil] is not valid..

 #  from /Users/king.sergey/Documents/GitHub/ts-frontend/node_modules/customerio-reactnative/customerio-reactnative.podspec:23
 #  -------------------------------------------
 #    # Reference: https://guides.cocoapods.org/syntax/podfile.html#pod
 >    s.dependency "CustomerIO/Tracking", package["cioNativeiOSSdkVersion"]
 #    s.dependency "CustomerIO/MessagingInApp", package["cioNativeiOSSdkVersion"]
 #  -------------------------------------------
.

 #  from /Users/king.sergey/Documents/GitHub/ts-frontend/apps/native/ios/Podfile:46
 #  -------------------------------------------
 #    use_expo_modules!
 >    config = use_native_modules!
 #  
 #  -------------------------------------------
sergey-king commented 1 year ago

I would also like to confirm that we're using M1/M2 Macs running both prebuild and build commands

ami-aman commented 1 year ago

This error is related to customerio-reactnative version. Are you using the latest version ?

@sergey-king I sincerely apologise for the inconvenience this is causing you. I am checking with the team how we can support you further in fixing this issue. Again, since we have not been able to reproduce the issue so it becomes hard to debug & fix the problem. I highly appreciate your patience.

Is there anything you'd like to add that could help us reproduce the issue ? Please feel free to put in more detail, in case that helps.

ami-aman commented 1 year ago

@sergey-king

After discussing the issue further with the team, I have a few suggestions for you. Please check the following:

I hope this is helpful! Let me know if you have any other questions. Credentials-—-customerio-testiosapp-—-Expo

ami-aman commented 1 year ago

Closing due to inactivity. Feel free to reopen if needed.