Xcode trying to match frameworks bundle ID when uploading iOS app to App Store
Asked Answered
A

8

24

After 4 months developing my first iOS app, it's time to submit it to the App Store. I created the app in iTunes Connect, filled in all the details, set up the correct Bundle ID in both Connect and Xcode. However, I've struggled the last 3 days trying to solve this weird problem. It seems like xcode is trying to upload Cocoapods frameworks, not my main app.

After archiving, I went to Window > Organizer > Validate.... I see the following screen:

enter image description here

The error:

enter image description here

(For googlers: No suitable application records were found. Verify your bundle identifier 'org.cocoapods.Alamofire' is correct).

The error message indicates that it's trying to match a Bundle ID according to a framework's name, not my own bundle (e.g com.organization.AppName). I can't find answers anywhere. I tried doing the following in my Podfile (which has use_frameworks!), as well as my different conf combinations but had no success.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|

      config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
      config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
      config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
    end
  end
end

enter image description here

All codesigning set to automatic

Questions:

  • Are the steps I'm making correct?
  • Why is Xcode trying to match a framework's bundle id instead of just my main application?
  • How can I get past this problem to finally submit my app?

EDIT 1: I was able to get past this problem, but that caused another problem later, so I still don't have a solution. Basically, Alamofire Pod (from Cocoapods) has a bundle id com.xxx.Alamofire. I changed it to com.xxx.myAppName. With that, I was able to send it to the App Store, however I can't install the app in my iPhone from TestFlight due to the following error:

4/22/16, 12:50:29 AM itunesstored[124]: [ApplicationWorkspace]: Failed to install application: com.xxx.myAppName; /var/mobile/Media/Downloads/5927832272594571027/-6969961974973998640; Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=DuplicateIdentifier, ErrorDescription=The parent bundle has the same identifier (com.xxx.myAppName) as sub-bundle at /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.IVHCuO/extracted/Payload/MyApp.app/Frameworks/Alamofire.framework}
Atkins answered 9/4, 2016 at 0:27 Comment(3)
Any updates on this? There's a discussion on CocoaPods github. https://github.com/CocoaPods/CocoaPods/issues/4331 However, No-one seems to care from CocoaPods team.Licorice
Bumping this, having the same issueBianchi
i am stuck with the same issue did any one found what was wrong?Microphotograph
A
5

After quite some time struggling with this, I was able to make it work. Basically, only Alamofire was presenting this issue. Here's what I did:

  1. In the Navigator, click in Pods.
  2. Under Targets you will see all the frameworks your app is using.
  3. Click on Alamofire (or the framework that is causing the issue).
  4. Edit the Bundle Identifier. If your app Bundle Id is com.company.appName, write com.company.appName.Alamofire in it.

I tried com.company.appName for the framework, com.company.Alamofire, nothing worked.

Atkins answered 22/4, 2016 at 21:48 Comment(4)
does this works ? because I am also facing the same issue while building the distribution build that is to be installed by OTAIntegument
@Integument didnt'work for you? It worked for me. Care to elaborate what didn't work for you?Atkins
Didn't worked for me! Do I need to add com.comany.appName.Alamofire in Bundle Id list of my apple developer accountFarleigh
is it in linked frameWork and library ?? i can't edit the bundle idBasilbasilar
A
7

It works perfectly for me. I just located Info.plist right-click open as "source code" and I changed <key>CFBundlePackageType</key> to string APPL

<key>CFBundlePackageType</key>
<string>APPL</string>
Atalee answered 14/10, 2016 at 21:54 Comment(1)
Worked! First time this has ever happened. Wonder why that property was missing for this project.Waldowaldon
P
6

I was receiving this exact error when trying to submit the app to iTunes Connect: "No suitable application records were found. Verify your bundle identifier 'org.cocoapods.Alamofire' is correct".

I finally fixed it by changing the Bundle OS Type code to APPL.

Practice answered 30/8, 2016 at 20:38 Comment(4)
I can confirm that this actually worked for me. I had bundle os type code set as a dictionary before. I changed it to a string and then set it to APPL. At the same time, I recreated my provisioning profiles, and made sure to clean the project build.Bianchi
@Practice : CFBundlePackageType and Bundle OS Type code both are same right?Farleigh
Thank you so so much. Been searching for solution from so much time and wasted my days on it. Your solution worked for me :) once again thanks and Lot... @PracticeHonan
Somehow we changed it while configuring the flutter app. Thus we were getting the same error. Despite setting the correct app id matched with the itunesconnect, app was picking up an app id from the pods, and this error was occuring. After trying this solution, problem is gone. Thanks.Fourlegged
A
5

After quite some time struggling with this, I was able to make it work. Basically, only Alamofire was presenting this issue. Here's what I did:

  1. In the Navigator, click in Pods.
  2. Under Targets you will see all the frameworks your app is using.
  3. Click on Alamofire (or the framework that is causing the issue).
  4. Edit the Bundle Identifier. If your app Bundle Id is com.company.appName, write com.company.appName.Alamofire in it.

I tried com.company.appName for the framework, com.company.Alamofire, nothing worked.

Atkins answered 22/4, 2016 at 21:48 Comment(4)
does this works ? because I am also facing the same issue while building the distribution build that is to be installed by OTAIntegument
@Integument didnt'work for you? It worked for me. Care to elaborate what didn't work for you?Atkins
Didn't worked for me! Do I need to add com.comany.appName.Alamofire in Bundle Id list of my apple developer accountFarleigh
is it in linked frameWork and library ?? i can't edit the bundle idBasilbasilar
P
4

Just experienced this issue with the following error displayed when attempting to upload to the App Store.

iTunes Store operation failed.

No suitable application records were found. Verify your bundle identifier 'org.cocoapods.Alamofire' is correct

We encountered this when attempting to upload (whilst using Cocoapods) and failing to find a fix, took the drastic action of removing Cocoapods from our project entirely and instead manually added each pod as a framework.

And...... the upload to the App Store still failed with basically the same error! 🤔

iTunes Store operation failed.

No suitable application records were found. Verify your bundle identifier 'org.alamofire.Alamofire' is correct

So this looks like it is possibly an error relating to framework usage within Xcode itself.

Finding that this wasn't being necessarily caused by Cocoapods, we decided to keep using Cocoapods and came up with the following steps to fix this.

The fix:

Our project contains 2 targets (ignoring unit test targets etc). 1 for the application (let's call it MyApp) and another that contains the network layer and other non app specific functionality (let's call this MyAppKit).

  1. Add CFBundlePackageType (also known as Bundle OS Type code) to MyApp's Info.plist and set it to APPL.
  2. Make sure that both the project MyApp and the target MyApp have the build setting Always Embed Swift Standard Libraires to Yes.
  3. Make sure that the target MyAppKit has the build setting Always Embed Swift Standard Libraires to No.

Still looking into exactly what's going on here, but thought this may be useful to anyone who's currently experiencing this.

Philippeville answered 11/11, 2016 at 15:0 Comment(0)
B
1

Recently, I had also same issue while I publish the app using cocoapods. It was Objective-C project and has been integrating pods as dynamic frameworks.

This is already reported bug.

So I recommends following 2 alternatives to work around this issue:

  • Use static library instead of dynamic framework. For that, you can comment # use_frameworks! line in your pod file.

  • If you need to use framework, you could try below steps:

    1. Add your framework as embedded binary in Xcode target.

    2. In build phases of your target, add a Run Script:

Example Script:

# Stripping framework only for archive
if [ "$ACTION" = "install" ]; then

    FRAMEWORK_NAME="Framework name"
    SCRIPT_FILE_NAME="strip-framework.sh"

    # Set working directory to product’s embedded frameworks
    cd  "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/${FRAMEWORK_NAME}.framework"

    # Get architectures for current file
    ARCHS="$(lipo -info "${FRAMEWORK_NAME}" | rev | cut -d ':' -f1 | rev)"
    for ARCH in $ARCHS; do
        if ! [[ "${VALID_ARCHS}" == *"$ARCH"* ]]; then
        # Strip non-valid architectures in-place
        lipo -remove "$ARCH" -output "$FRAMEWORK_NAME" "$FRAMEWORK_NAME" || exit 1
        fi
    done

    echo "Framework was successfully stripped with unsupported architectures"

fi

# Removing script from framework folder
if [ -f ${SCRIPT_FILE_NAME} ]; then
    rm -rf "${SCRIPT_FILE_NAME}"
fi

Note: please replace your framework name in this script!, you ensure to put this script file named as "strip-framework.sh" into the top level of framework directory.

3rd party frameworks never signed by providers and its duty of consumers. So when you archive, it signs your frameworks together with your app bundle. But after doing that, Application loader consider your bundle identifier as one of framework. Its weird thing yet.

After 2 days working around, I could publish my app finally.

Even if you could submit by doing this tricky, it will never been installed on the devices.

Finally, I got a perfect solution and found out the reason. This is happening because your 3rd party frameworks have some issues in it. For example, in my case Quickblox framework has never supported bitcode yet. So I had to disable bitcode in build settings for the main target and frameworks totally. This will fix your issue for sure.

Please review this screenshot: Disable Bitcode I hope this will help you guys. Cheers!

Bioclimatology answered 29/9, 2016 at 15:4 Comment(2)
How can we determine that framework supports bitcode or not? My project contains 13 pod filesFarleigh
You can check it in Xcode build settings, just search bitcode in search field :)Bioclimatology
C
0

If your apptitle has usual slash "/", then xcode failed to sign it, and thinks that I'm uploading first framework org.cocoapods.***

What I did - changed slash to similar symbol ∕

(first slash, next one - other unicode symbol : ∕/)

Chordate answered 8/2, 2017 at 13:48 Comment(0)
C
0

In my case I had to remove Provisioning profile setting from Pods sub-project enter image description here

Circumambulate answered 29/3, 2017 at 20:47 Comment(0)
F
0

First please check your bundle identifier. Next please make sure your app is created in-app store connect, which might be one of the reasons not able to upload the app to the store.

Faithless answered 16/3, 2020 at 8:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.