Cocoapods: iTC Error: Invalid Bundle - iOS app, + extensions, + watchOS app.

Created on 22 Jan 2016  路  11Comments  路  Source: CocoaPods/CocoaPods

Hello,

I have some problems after uploading an app to iTunes Connect. The app has multiple targets; the main app, Today and Share extensions, and watchOS 2 app. All those targets have 2 common pods. I do pod install and I get the warning of duplicated UUIDs. Anyway, I can still run the app on devices and on simulator.

The problem is after I upload the app to iTunes Connect to send a beta for example; I use Fastlane to upload the app to iTunes Connect. And after a few minutes that the new build is on iTC, I receive an email saying this:

Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.

Any idea of what's going on? I've been playing with it for more than a day now, and still didn't find any solution.

This said, if I remove the WatchKit Extension target from the podfile so it doesn't add the pods to the watchOS app, it works!

Here's how the podfile looks.

source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!

def developmentPods
    pod 'Realm'
    pod 'Realm+JSON'
end

target 'TestApp' do
    platform :ios, '9.0'
    developmentPods
end

target 'TestAppToday' do
    platform :ios, '9.0'
    developmentPods
end

target 'TestAppShare' do
    platform :ios, '9.0'
    developmentPods
end

target 'TestAppWatchExtension' do
    platform :watchos, '2.0'
    developmentPods
end

Most helpful comment

@segiddins Ok, I've found the problem and solved it! The problem was that I had this Run Script also in the WatchKit Extension, and it shouldn't be there.

cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
if [[ -d "Frameworks" ]]; then
rm -fr Frameworks
fi

I removed it and now iTunes Connect processed the build properly! 馃憤

All 11 comments

@orta I can upload the build to iTC. The problem is after it's uploaded; I receive an email from iTC saying:

Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.

What version of CocoaPods is this with?

@segiddins Version 0.39.0. I tried to use 1.0.0 Beta 2 but Realm doesn't work with this version of CocoaPods.

Can you figure out which dylibs are missing, then? The copy frameworks script should handle everything...

@segiddins I don't know how... The error is sent with an email from iTunes Connect without any other information. Do you know anyway for me to try to figure out what's missing?

Can you look in the archive that got uploaded to iTunes Connect and see what's missing?

@segiddins Ok, I've found the problem and solved it! The problem was that I had this Run Script also in the WatchKit Extension, and it shouldn't be there.

cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
if [[ -d "Frameworks" ]]; then
rm -fr Frameworks
fi

I removed it and now iTunes Connect processed the build properly! 馃憤

@enricenrich Thank you very much! Save my day!

@enricenrich I love you :)

@gurhub @georgbachmann that build phase hack shouldn't be required anymore (as of CocoaPods 1.1.0). If you all are experiencing this issue using at least that CocoaPods version, we'd definitely appreciate a Github issue!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steffendsommer picture steffendsommer  路  3Comments

tlandsmancars picture tlandsmancars  路  3Comments

5SMNOONMS5 picture 5SMNOONMS5  路  3Comments

evermeer picture evermeer  路  3Comments

pronebird picture pronebird  路  3Comments