5

Here is my Podfile:

# Uncomment this line to define a global platform for your project
platform :ios, '9.2'
# Uncomment this line if you're using Swift
use_frameworks!

target 'My_App_Name' do

pod 'LocationKit','~>3.0'

pod 'Bolts'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'

pod 'Parse'

end

I installed 6 dependencies in total. The app is working just fine on the simulator and on the device. However, when I install it on iTunes Connect, it does not accept my built by saying:

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

I searched a lot on the internet and tried a lot of things, but they all concluded with a frustration.

I'd be very glad if anyone having this issue once and achieved it somehow just tell me how s/he did it?

Burak
  • 525
  • 4
  • 24
  • Just a wild guess, culprit here may be Facebook libraries. – Arpit Dongre Jan 09 '16 at 16:46
  • [link](http://stackoverflow.com/questions/33147558/issue-after-submitting-my-app-to-testflight) – Arpit Dongre Jan 09 '16 at 16:51
  • [link 2](https://github.com/CocoaPods/CocoaPods/issues/3816) – Arpit Dongre Jan 09 '16 at 16:51
  • 1
    @Arpit Thanks for the links. I had already tried the first link, and just tried the second, the same problem still occurs. I want to add some observation here though. Under Project Navigator of MyApp, Pods_MyApp.framework is written in red. Also under Pods in Project Navigator, all the Frameworks are in red. I do not know whether this means these frameworks are not properly linked to the project, and causes this problem. – Burak Jan 09 '16 at 18:50
  • 1
    Yes, if they are in red that means they are not linked properly. Try removing all the dependencies and add them again. Take a good backup first. – Arpit Dongre Jan 09 '16 at 19:02
  • 1
    @Arpit But when they are not linked properly, wouldn't it be NOT working on device or on the simulator? I thought Xcode should have given a warning about the linking issue. – Burak Jan 09 '16 at 19:48
  • 1
    Yes, when you run it on device or simulator you have all libraries in your system. But when you send it on test flight, they need proper connection. Though I can not say it for sure but something there is broken like proper bundle link. Just remove all dependencies & add them, if that doesn't work try updating cocoa pods. And if even it doesn't work, try installing libraries manually without pods(Facebook ones). – Arpit Dongre Jan 10 '16 at 14:16

2 Answers2

1

I installed several frameworks simultaneously without trying them one at a time, and see if that framework is OK with iTunes Connect. Well, I should have installed them one by one and try to upload to iTunes Connect.

So, I found that the culprit here is LocationKit. I tried to integrate it manually as well, but did not work. So I removed the framework and installed the remaining manually, and it worked like a charm.

Note that these kinds of errors can possibly be caused by the SDKs' bit-code related issues. Some SDKs are written without a careful coding and forgotten to include necessary settings needed for them to be included in an app release, so sometimes that's because you cannot send your app to AppStore, or even if you could send, your app is rejected by AppStore Connect's auto-processing, or might not run on the device or on Simulator, so on and so forth. There are some ways however to overcome this issue. One of them is to ask your SDK service provider to fix the issue in the SDK, but in the meantime you can also set

Enable Bitcode = false

in your project's Build Settings, but remember this is NOT a preferred way of solving this issue.

Burak
  • 525
  • 4
  • 24
0

Uncheck the option to "include bitcode". This will resolve the problem.

John Fontaine
  • 1,019
  • 9
  • 14
  • 2
    Not a valid option if your app works with apple watch or tvOS, or if you want app-thinning, or a bunch of other options. Turning off bitcode is bad. – xaphod Sep 13 '16 at 23:35