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
Related
If I try to archive my project, I get many compiler errors with Kingfisher for SwiftUI.
I can run code on my device and on the simulator without any problems.
Xcode Version 13.0 (13A233)
SPM
KingFisher 6.3.1
Have anyone got an idea?
enter image description here
You need Kingfisher 7.x for Xcode 13.
It's also good practice to clean the build folder after the package update, before rebuilding.
Kingfisher's GitHub page has additional explanations:
If you need to support from iOS 10 (UIKit/AppKit) or iOS 13 (SwiftUI),
use Kingfisher version 6.x. But it won't work with Xcode 13.
If you need to use Xcode 13 but cannot upgrade to v7, use the
version6-xcode13 branch. However, you have to drop iOS 10 support due
to an Xcode 13 bug.
In Xcode 10.1 whenever I build my app I get the warning
Swift 3 mode has been deprecated and will be removed in a later
version of Xcode. Please migrate "My Appp" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'My App')
How can I suppress the warning?
I tried to convert but conversion fails and besides that my app depends on some Pods / libraries that I can not convert any way.
Is there a way to stop seeing the warning?
Unfortunately, there's no way to remove this. You'll need to manually update your Pods / libraries to Swift 4.x or wait until someone does the job for you. Otherwise, you won't be able to build your project with a newer Xcode version at some point in the future.
From https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes:
Xcode 10 is the last release that will support Swift 3. Migrate your projects from Swift 3 code to Swift 4.2 syntax by opening the project and choosing Edit > Convert > To Current Swift Syntax… (43101816)
Download Xcode 10.1 to be able to compile your code with Swift 3 or Pod decencies:
https://developer.apple.com/download/more/?name=Xcode
I've recently upgraded to xcode 8 and did a conversion for my xcode project. While every other swift files checks out fine, there seems to be issues with this particular swift file.
I suspect it could be a result of cocoapods not being updated and thus I did a repo update to the latest pre version before doing a pod install on the project again but still to no avail.
Hmmm ok I found a way to fix this, apparently just going to product>clean will solve most of the problems. This is for anyone out there converting to swift 3. Now on to solve some other problems...
I have saved a version of my app code that runs on XCode 6.4 and made a copy and converted it to work with the latest XCode 7 beta.
The problem is Xcode_6.4.dmg was auto-installed using the App Store and I don't have that file available and I can't download it because it is installed from the App Store. I have some the beta versions but not the released.
Will I be able to run my Swift 1.2 code somehow as a baseline to whether a bug existed before the transition to Swift 2.0?
Download Xcode 6.4 at http://adcdownload.apple.com/Developer_Tools/Xcode_6.4/Xcode_6.4.dmg
You can manually keep any number of Xcode versions in /Applications. Just name each one uniquely before opening them.
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.