Alamofire Swift 2 - cannot submit for beta testing (Xcode 7 GM) - cocoapods

I have followed the instructions on installing the swift2 branch of Alamofire with cocoa pods. The app works well in the simulator, however, when I archive it for submission with Xcode 7 GM I receive an email with an error:
"The bundle contains an invalid implementation of Swift. The app may have been built or signed with non-compliant or pre-release tools"
This issue definitely relates to the framework as without it I am able to submit for beta testing with the same version of Xcode. I have tried turning bit code OFF in the build settings for Alamofire but it does not help.
Does anyone know how to fix this?
My podfile links only against Alamofire framework:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift-2.0'
One of the things that I found rather strange is that when I try to submit an archive I have the following screen:
Maybe this can be helpful in identifying the issue. The extra two targets are notification centre widgets. Disabling them doesn't resolve the issue. And without Alamofire I am able to submit for beta testing with both widgets attached.
Update
For those who are suggesting that "Swift 2.0 is in beta so you cannot submit" I want to clarify once more - I am trying to submit for beta testing. And YES, it is possible!
As I have indicated, I am able to submit for beta testing if I remove Alamofire and my own app is written in Swift 2.0. And if someone still thinks that "it is not possible" here is some info for you. Please read it first before posting comments or down voting question.
Update 2
This issue is still there with Xcode 7 GM...

OK, this issue is now fixed. I have tried the 2.0.1 version of Alamofire and I am able to submit with Xcode 7 GM and Bit Code turned ON for both Alamofire and my app.

Related

Does anyone know where to get RxSwift Pod for xcode 10 and swift 4.2?

I tried a couple of variations in podfile to no avail...I assumed it was pod 'RxSwft', '-> 4.2' but get an error that is less than descriptive.
This works fine for me:
maybe you have another problem, can you add the error description?
And also I would recommend to always follow the page documentation:
there it still says to use 4.0, and even when i used in my podfile 4.0 it still installed (4.2.0) and i use the Xcode 10 beta, working fine.

Alamofire and Reachability.swift not working on xCode8-beta5

I have a custom CocoaPod created in swift2.3 and it has Alamofire and Reachability libraries inside the project. I mean I did integrate Alamofire and Reachability into the project manually.
It still works perfectly on xCode7.3.1 and I am going to update it to swift3 on xCode8-Beta5. I tried to update it but I couldn't get it done successfully.
Here is how I did for the update.
Replaced Alamofire and Reachability in the project folder for swift3 from
https://github.com/Alamofire/Alamofire/tree/swift3
Opened xCode8-Beta5 and converted all files to Swift3 syntax(actually xCode asks it when opening the old version project). So the converting was done automatically by xCode.
And I tried to build the Cocoapod but it gives a the bunch of error.
How can I solve this problem and update the Cocoapod successfully?
I tried to update two Cocoapods on xCode8-beta6 but Alamofire is still not working. Here is a screenshot.
https://www.dropbox.com/s/gm8ud67qc1ixffb/Screen%20Shot%202016-08-20%20at%2011.06.31%20AM.png?dl=0
If you plan to convert your code into swift 3, and to develop in the latest XCode 8 Beta 6 (forget to use Beta 5, I was trying to success round a clock and finally in Beta 6 it is possible to use Alamofire without rewriting all their code):
You need to update the Alamofire to its 4.0 version. I was waiting for this version neverending weeks between beta 2 and beta 6, as it wasn't able to use Alamofire at all. Apple ischanging SDK version by version during summer, but now the latest branch of this framework is on github.
In your Podfile you need to set more parameters to be able to use update stuff in these beta times. They are hardworking on swift3 branch.
If you don't use 4.0 version, there are many issues that XCode is not able to resolve in its convertor for its previous versions of Alamofire.
Huge amount of code they had to change.
They announced they will produce official 4.0 version after Apple releases GM seed. So until we get XCode GM Seed, put this to your Podfile before its install:
I could build Alamofire and Reachability frameworks successfully on xCode8-beta6 without any problem from the following branches.
https://github.com/Alamofire/Alamofire/tree/swift3
https://github.com/ashleymills/Reachability.swift/tree/feature/ios10

Xcode will build/run but archive fails with "No such module Google" - Swift iOS

My app has been working fine until Xcode 7.1. In fact, it still runs on both the simulator and iPhone, but when I archive it, I get the error "No such module Google." I have cocoa pods updated to 0.39 and have tried for hours with tweaking the options, from reinstalling cocoa pods to removing the Google Analytics cocoa pod and adding it manually, etc. However, nothing has worked, and whenever I archive the app, I receive an error, yet it still runs fine.
Any thoughts?
Thanks!
Turns out the issue was with Google Analytics for cocoa pods. I completely removed the cocoapod and switched to Flurry.
For me it turned out, that I had forgotten to put
use_frameworks!
into the Podfile. After adding this line and updating the pods it worked. Just make sure to import all modules in all depending classes.
Edit:
Official blog resource from cocoapods

iOS 9 - Distorted UI built with Xcode6 and Swift1.2

My app UI is completely distorted on iOS 9. App is built with xcode6 and Swift1.2. I am using xib's for UI. Minimum iOS sdk is iOS7. everything works well on iOS7 and iOS8. Does anyone know what could be possible issue? I can't post app UI as its for some client.
The best way for you is that you download the Xcode 7 and rebuild your app and deal with the building problem.
One problem I have met now days is that "Some deprecated API were removed from iOS 9,which make app crashed!" I think the same is happening at your side also.
You can find all the latest change here:
https://developer.apple.com/library/ios/releasenotes/General/iOS90APIDiffs/index.html
Build you app with xcode 7 and swift 2.0.
To Add new Alamofire library to your current project go with the pod installation. below is the code you have to integrate in your pod file for fresh installatoin of Alamofire.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 2.0'
With the latest release of Alamofire 2.0 request method get change.
I am posting some sample steps which will help you most
Here is my sample code,
// Step : 1
var manager = Manager.sharedInstance
// Specifying the Headers we need
manager.session.configuration.HTTPAdditionalHeaders = [
"Content-Type": "application/graphql",
"Accept": "application/json" //Optional
]
// Step : 3 then call the Alamofire request method.
Alamofire.request(.GET, url2).responseJSON { request, response, result in
print(result.value)
}
Try this or you can check the latest update from alamofire on xcode 7:
https://github.com/Alamofire/Alamofire
In previous version of Alamofire there is one more parameter for handle in request method, now that was removed. Check Git for more information. I think this will help you more.

Getting "Missing SDK in target picChoice: iphoneos4.0" error when building a test release of my app in Xcode 4, pvw 5

I have opened a functioning Xcode 3x project in Xcode 4.0 pvw 5 and am getting the following error whei I try to build a debug version of the app: "Missing SDK in target picChoice: iphoneos4.0"
I am trying to find where and how to remedy this, and I am coming up with bupkus.
I apologize if this is not very clear, but I am rather flummoxed by Xcode 4 so far....
Your problem was probably that Xcode 4 only came with SDK 4.2, and the project pointed to 4.0.
It's pretty common!
The solution is to go to the project info | Build settings | Base SDK and setting it to "Latest iOS" so that you don't have to touch it for future updates.
When you close the window, you'll have to switch config from debug to release or distribution and back so that it updates and Xcode removes the "Missing SDK" problem.
I just wanted to put the full answer up here to help others who have the same problem ;)
Ok...I resolved this, but I did not properly track HOW I resolved it....
I think my Target's Base SDK was not set, and I set it to: Latest iOS (iOS 4.2)....
I think that's how I did it....
But, now it builds with no errors and loads onto my iPhone as expected.
That is exactly what you needed to do. Xcode 4 introduced the Latest iOS. If you wish to test the app for older versions, select target > summary > deployment target and set that to an older iOS version and then in simulator you will see more version options available to you.

Resources