Archive validation failed with errors during app store distribution process - ios

I have been trying to send my application to apple for submission and it is my first experience about it. I have searched the errors and applied all suggested solutions. However none of the solutions didn't work for me. I got the error below.
I set the ios deployment target as ios 7.0 and later versions for both of the project target and Alamofire framework. Also, my Xcode version is 6.1.1 . However, I could not understand that why not working.
Could you help me please ?
Thank you for your answers
Best regards

Unfortunately, iOS 7 does not support frameworks. Here is some additional information about it. The known workaround is to add Alamofire to your project by dragging the Alamofire.swift file directly into your project.
A good way to track this type of usage in your project is to use Git submodules. You could also download a version and copy the file into your project, but then it gets more difficult to track what version you have compiled into your project.
This will build Alamofire into your project as though it was just another Swift file associated with your project.
This is also why most Swift CocoaPods are iOS 8 only.

Related

Cannot archive an iOS 5.0 era project with RestKit v0.10.3 using Xcode 7.2

I have got an old iOS project which is of iOS 5.0 era. I need to archive it using latest iOS SDK and submit it to App Store.
It consists of an .pbxproj main project which uses RestKit as sub-subproject. Cocoapods is not being used at that era and RestKit is being included as git submodule.
Under Xcode 7.2, it builds and runs perfectly fine, but when it comes to archive, it keeps prompting error message like this:
#import <RestKit/RestKit.h> fails
I have already search RestKit's old documentation and tried using the suggested method, but still not working for me.
I wonder if the Header Search Paths is set wrongly in build settings, it is set as "$(BUILT_PRODUCTS_DIR)/../../Headers" originally.
P.S. I do not wish to upgrade the RestKit version. Minimum support iOS version should be iOS 7.
Please try to archiving using old Xcode like 5.0 or prior. Since Xcode 7.2 does not support 5.
I finally managed to fix my problem by setting Header Search Paths of targets in all xcodeprojs (along the chain, including the parent and child) in Release build configuration. I have set the value to "${BUILT_PRODUCTS_DIR}/../../IntermediateBuildFilesPath/Headers". I found that the RestKit header files are being copied to IntermediateBuildFilesPath/Headers during the archive phase.

Errors while compiling an old project in newer version of Xcode

I've an old project to start work on it. Client told that it was completed in 2012, and may be with v.4.3 or some older version of Xcode. It was only targeted for iOS v.6 and previous versions. Now client wants to make some upgrades and make it compatible for all iOS devices having iOS v.7 and/or above.
I'm running Xcode v.6.3 with iOS v.8
When I firstly open up the project and run – I got too many error (actually those should be come as warnings and not errors) from GPUImage framework. I solved it one-by-one. After solved those errors, when I run it again, I failed-up with few more error of SDKs not found. I can confirm that all SDKs are added properly. And its never changed, after the project was created. However its giving me errors.
Is there something that we've to setup when we run an old project (in latest Xcode and current iOS target)? Do we need to change architectures? Header search paths?
Note, all SDKs and app source code was on Github and added as submodules to the app. I have successfully cloned it in my Mac.
Please ask me if you want more information on this.
The following steps could solve your problem. I am not 100% sure but it worked for me once. Worth a shot.
1) Go to Build Phases and remove the FacebookSDK.framework
2) Clean
3) Link back the FacebookSDK.framework to your project
4) Clean and Run

Xcode fails to archive app with Alamofire

I can run my app in the simulator and on my device just fine. However, as soon as I try to archive the app (in order to upload it to iTunes Connect) the process fails.
Could not build Objective-C module 'Alamofire'
I have included Alamofire as a git submodule in my app. I have already submitted various betas to iTunes Connect and never encountered this problem before.
I did not change any build settings though. Any other idea what could be wrong ? The problem seems related to this issue in github but no solution was provided.
Thanks in advance for any help.
Do You use other modules with Alamofire in Your project?
If so the solution is adding a dependencies of Alamofire to other modules to, same as in main project.
Another solution could be Derived data from xCode. Go to your xCode project and clean all Derived data.

Could not build module 'Foundation' in Xcode 6

I have searched Stack Overflow, Google and fellow peers for a current workaround in Xcode 6 for this error but have failed in doing so.
Note that this error occurs ONLY when attempting to run my app ON A DEVICE USING XCODE 6.
(This is not an issue when using the simulators, and I can build my app on a device using Xcode 5)
It seems to be a framework or library issue, but since it is able to work in almost every other possible way, I am not sure where the solution resides. I was using Xcode 6.0.
Here is the error:
I have checked my architecture settings, my frameworks and project files. Everything that needs to be included seems to be there.
This looks like it might be a silly error to do with Cocos2d and/or Xcode6. I have used SpriteBuilder to create the app. If you have a fix or have this error, any insight would be appreciated, thank you!
Found a fix. Downloaded the new Xcode6 version from the App Store. Xcode 6.0.1 (6A317) and it runs on all devices and simulators.
(There was no notification to update Xcode, you must search for it and download the new version)

Testflight SDK version not updating in project

I recently downloaded Testflight SDK version 3.0 and added header files in the project as shown in https://www.testflightapp.com/sdk/ios/doc/3.0.0/. Previously I was using SDK 2.1.4
But when I archive the app and try to upload it to Testflight it still shows me my previous SDK version 2.1.4. I dont know whats the issue, i tried so many times but the sdk is still not updating to 3.0 in my project.
Just ran into and fixed this problem. In my case, the library search paths were pointing to the wrong place (with an older version of the library). Search for "Tetflight" in your Build Settings and delete or change any incorrect paths.
Only adding the header files is not enough. You also need to update libTestFlight.a to the latest version. Replace the older static library with the new one. Also make sure it is properly linked (Project, Build Phases, Link Binary With Libraries). Then clean the project, rebuild, and you should be fine.
If you already did that, you should say so in your question. Now you only mention header files. But based on your description it could be that you are still linking an older version of the TestFlight static library.
I ran into this issue first from the question, but then immediately couldn't upload my ipa into TF because it contained the SDK. TestFlight appears to be purchased by Apple and also TF has since removed support for Android.
TestFlight does not accept builds with TestFlight SDK

Resources