GithubHelp home page GithubHelp logo

iOS 7 support about snapkit HOT 18 CLOSED

snapkit avatar snapkit commented on May 3, 2024
iOS 7 support

from snapkit.

Comments (18)

iartem avatar iartem commented on May 3, 2024

+1

from snapkit.

iblacksun avatar iblacksun commented on May 3, 2024

@eikebartels You can use git submodule, then import Snap classes into project.

from snapkit.

eikebartels avatar eikebartels commented on May 3, 2024

Yea sure you can do this but does it not make more sense to set the dependency version for cocoa pods to 7 instead of iOS 8?

from snapkit.

robertjpayne avatar robertjpayne commented on May 3, 2024

Cocoapods cannot build Swift libraries for iOS 7 (app store releases) so unfortunately it's not just as simple as making it available for iOS 7 in the Podspec.

from snapkit.

eikebartels avatar eikebartels commented on May 3, 2024

Ah I see... didn't know that. Thanks for the info

from snapkit.

Heisenbean avatar Heisenbean commented on May 3, 2024

@robertjpayne
so it means we need to drag the sources files into the project?

from snapkit.

robertjpayne avatar robertjpayne commented on May 3, 2024

@Heisenbean pretty much yea, I internally have a build script that can create a static lib from a pure Swift library and while it holds up well in my production apps it's not something I have in a state to release publicly.

It's a safe bet just to include the source files.

from snapkit.

thedamfr avatar thedamfr commented on May 3, 2024

Cocoapods builds on iOS 7.
I do it right now with Cocoapods 0.37.0
There is a few warning but it goes smoothly.

from snapkit.

robertjpayne avatar robertjpayne commented on May 3, 2024

@thedamfr could you elaborate? AFAIK Cocoapods does not support iOS 7 for projects that include Swift code unless that has changed recently?

from snapkit.

JunqiangTan avatar JunqiangTan commented on May 3, 2024

I think it's time for us to pay close attention to the problem. We need stronger cocoapods, come on

from snapkit.

robertjpayne avatar robertjpayne commented on May 3, 2024

@JunqiangTan the problem is that Xcode does not support building static libraries for Swift code and that Dynamic Frameworks are not supported via the App Store on iOS 7.0.

from snapkit.

JunqiangTan avatar JunqiangTan commented on May 3, 2024

@robertjpayne If you wrap the SWIFT, the OC, in the final compile time to mix, how? I'm just a beginner and cocoapods lovers, I thought may be a bit silly, but this is my best answer, hoping to help.

from snapkit.

robertjpayne avatar robertjpayne commented on May 3, 2024

@JunqiangTan You indeed can mush the Object Code files together after Compile to generate a static lib, it's very messy though and very much not supported by Cocoapods or Apple. It's really just not worth the effort.

If you still need to target iOS 7.0 and want to use Swift I strongly recommend you just use submodules and include the source, it's just too unreliable to go another route.

from snapkit.

thedamfr avatar thedamfr commented on May 3, 2024

@robertjpayne

This is my current Podfile

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '7.0'

xcodeproj 'Tripndrive'

use_frameworks!

pod "CNPGridMenu"
pod "NGAParallaxMotion"
pod "Alamofire", '~> 1.2'
pod "CryptoSwift"
pod 'SwiftyJSON'
pod 'MagicalRecord'
pod 'GoogleAnalytics'
pod 'KeychainAccess'
pod 'Facebook-iOS-SDK', '~> 3.23.0'
pod 'JGActionSheet'
pod 'JGProgressHUD'
pod 'SnapKit', '~> 0.12.0'
pod 'SHSPhoneComponent'
pod 'SDWebImage', '~>3.7'
pod 'Fabric'
pod 'Crashlytics'

Output for pod install with 0.37.~

pod install
Analyzing dependencies

CocoaPods 0.38.2 is available.
To update use: `sudo gem install cocoapods`

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Downloading dependencies
Using Alamofire (1.2.3)
Using Bolts (1.2.0)
Using CNPGridMenu (0.2.1)
Installing Crashlytics 3.1.0 (was 3.1.0)
Using CryptoSwift (0.0.10)
Using Fabric (1.2.8)
Using Facebook-iOS-SDK (3.23.2)
Using GoogleAnalytics (3.12.0)
Using JGActionSheet (1.0.4)
Using JGProgressHUD (1.2.7)
Using KeychainAccess (1.2.1)
Using MagicalRecord (2.3.0)
Using NGAParallaxMotion (1.1.0)
Using SDWebImage (3.7.3)
Using SHSPhoneComponent (2.15)
Using SnapKit (0.12.0)
Using SwiftyJSON (2.2.0)
Generating Pods project
Integrating client project

[!] The platform of the target `Pods` (iOS 7.0) may not be compatible with `Alamofire (1.2.3)` which has a minimum requirement of iOS 8.0 - OS X 10.9.

[!] The platform of the target `Pods` (iOS 7.0) may not be compatible with `CryptoSwift (0.0.10)` which has a minimum requirement of iOS 8.0 - OS X 10.9.

[!] The platform of the target `Pods` (iOS 7.0) may not be compatible with `KeychainAccess (1.2.1)` which has a minimum requirement of iOS 8.0 - OS X 10.9.

[!] The platform of the target `Pods` (iOS 7.0) may not be compatible with `SnapKit (0.12.0)` which has a minimum requirement of iOS 8.0 - OS X 10.9.

[!] The platform of the target `Pods` (iOS 7.0) may not be compatible with `SwiftyJSON (2.2.0)` which has a minimum requirement of OS X 10.9 - iOS 8.0.

This is indeed going to build with SDK 8.4
But you are going to hit validation errors when submission to AppStore (not for Crashlytics).
So when I release for AppStore, I bind directly swift files in my project. This makes the build time comes to 40min which is totally not acceptable for Dev, but is okay for Release.
Cocoapods is okay for dev.
Indeed, if I upgrade Cocoapods to 0.38.2, I have an error because platform :ios, '7.0' break your dependency minimumSDK which is explicitly set at 8.0.

But all in all, if your Lib support 7.0, there is no reason that you don't set minSDK to 7.0
Your lib is not responsible of Cocoapods way of building. Your lib support 7.0. The fact that Cocoapods does not support 7.0 for frameworks is not your problem. You ship code, they build.

So my recommandation would be to set minSDK to 7.0 in next PodSpec.

from snapkit.

robertjpayne avatar robertjpayne commented on May 3, 2024

@thedamfr unfortunately the amount of support requests we were getting from users submitting to app store when the deployment step was step to 7.0 just doesn't make it worthwhile.

Likewise with the rest of the libraries you've listed there they are all in the same boat. I'm also not mindful of iOS 7 vs iOS 8 API's anymore so it's best you maintain a sync'd fork of the Podspec and likely the repo as well.

from snapkit.

thedamfr avatar thedamfr commented on May 3, 2024

:(

from snapkit.

robertjpayne avatar robertjpayne commented on May 3, 2024

@thedamfr I know it's unfortunate but like all the other repo's the tradeoffs are simply not worth it.

from snapkit.

thedamfr avatar thedamfr commented on May 3, 2024

Yeah ! But like all the other repos, I'm sending gifs of sad cat hoping they fix it :-(
Giphy

from snapkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.