Contact Us

Use the form on the right to contact us.

You can edit the text in this area, and change where the contact form on the right submits to, by entering edit mode using the modes on the bottom right. 


Oak Ridge, TN, 37830
United States

Swift-Snips

The files libswiftCoreLocation.dylib, etc... don’t match

Wade Cantley

The ongoing struggle to build under a new IDE, Language, and iOS version at the same damn time.

Like anyone else who had to jump into the pool, I have had to clean up code that was no longer in compliance with the way things are to be done.

On submitting I ran into this issue where library files don't match when submitting to apple.  

Here is some background:

  1. I am using Cocoa Pods
  2. I have installed Google Analytics framework.
  3. I have installed Henake image cacheing framework. 
  4. I have installed SwiftyJSON data management and conversion framework.

These frameworks by the way are Great!

But now there is this... error.

How I felt getting this response from Apple

Dear developer,
We have discovered one or more issues with your recent delivery for “MyMobi Home Finder”. To process your delivery, the following issues must be corrected:

Invalid Swift Support - The files libswiftCoreData.dylib, libswiftCoreLocation.dylib don’t match

/Payload/MyMobi.app/Frameworks/libswiftCoreData.dylib, /Payload/MyMobi.app/Frameworks/libswiftCoreLocation.dylib. Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to /Payload/MyMobi.app/Frameworks/libswiftCoreData.dylib, /Payload/MyMobi.app/Frameworks/libswiftCoreLocation.dylib.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,
The App Store team

After I embraced the situation, I did a search to hunt for a solution.  

Solution

  1. In XCode, Do a search for "local swift_runtime_libs" across your project.  It should bring up a single result in a file called "Pods-[yourProjectHere]-frameworks.sh"
  2. You want to silence the following code because it appears to be embedding the Swift runtime libraries , libraries that don't currently match what Apple expects. (see picture)
  3. Save it and resubmit.

The code looks like this...

  # Embed linked Swift runtime libraries
#local basename
#  basename="$(basename "$1" | sed -E s/\\..+// && exit ${PIPESTATUS[0]})"
#  local swift_runtime_libs
#  swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/${basename}.framework/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u  && exit ${PIPESTATUS[0]})
#  for lib in $swift_runtime_libs; do
#    echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
#    rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
#    code_sign_if_enabled "${destination}/${lib}"
#  done

Thanks to the people who answered at this link.
 

That should do it but we will see what Apple says.