☎️ NextcloudKit Apple library

Overview

NextcloudKit

Installation

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

To integrate NextcloudKit into your Xcode project using Carthage, specify it in your Cartfile:

github "nextcloud/NextcloudKit" "main"

Run carthage update to build the framework and drag the built NextcloudKit.framework into your Xcode project.

Manual

To add ** NextcloudKit** to your app without Carthage, clone this repo and place it somewhere in your project folder. Then, add NextcloudKit.xcodeproj to your project, select your app target and add the NextcloudKit framework as an embedded binary under General and as a target dependency under Build Phases.

You might also like...
Provides some Apple Wallet functionality, like adding passes, removing passes and checking passises for existing.
Provides some Apple Wallet functionality, like adding passes, removing passes and checking passises for existing.

react-native-wallet-manager Provides some Apple Wallet's functionality, like adding passes, removing passes and checking passises for existing. Instal

Apple Developer Academy @ POSTECH Afternoon Session Team 13 MC2
Apple Developer Academy @ POSTECH Afternoon Session Team 13 MC2

📱 Project Title A brief description of what this project does and who it's for 📌 Features Light/dark mode toggle Live previews Fullscreen mode Cross

SwiftPizza App for Apple ActivityKit & WidgetKit
SwiftPizza App for Apple ActivityKit & WidgetKit

iOS16 Live Activities ( ActivityKit Demo) SwiftPizza 🍕 👨🏻‍🍳 App for Apple ActivityKit & WidgetKit This is the first project example referring to

React Native library that implements PayPal Checkout flow using purely native code (swift).
React Native library that implements PayPal Checkout flow using purely native code (swift).

react-native-paypal-swift React Native library that implements PayPal Checkout flow using purely native code (swift). Installation npm install react-n

A Swift library for Panasonic AMG88 Grid-EYE thermopile sensors.

AMG88xx A Swift library for the Panasonic AMG88 family of sensors. Summary This library can read temperature data from the AMG88 thermopile sensor. Us

Swift library for parsing Extended Backus–Naur Form (EBNF) notation

Gramophone Swift library for parsing Extended Backus–Naur Form (EBNF) notation Integration Swift Package Manager dependencies: [ .package(url: "ht

A testing MQTT react native library

react-native-awesome-testing abc Installation npm install react-native-awesome-testing Usage import { multiply } from "react-native-awesome-testing";

Personal plug-in library

PPILibrary Personal plug-in library 功能介绍 Core 核心基础扩展, 不依赖于任何三方库 使用 根据subspec指定 pod 'PPILibrary', :subspecs = ['Core'], :git = 'https://github.com/Sh

🐦 An asynchronous Twitter library based on the Twitter v2 API

Twift Twift is an asynchronous Swift library for the Twitter v2 API. No external dependencies Only one callback-based method (requestUserCredentials)

Comments
  • Implement caching for UTI and DateFormatters

    Implement caching for UTI and DateFormatters

    While looking into https://github.com/nextcloud/talk-ios/issues/946 I noticed 2 areas where performance can be improved: image One is date handling and one is UTI handling.

    This PR adds caching in places where it made sense, after the PR the profiling looks like this: image

    I did run several tests to determine what makes sense. My test folder consists of 1021 files, 2 folders and around 1,4 GB of files ("/Talk"). Tests were done like this (so just the converting, no network activity):

    diff --git a/NextcloudKit/WebDAV/NextcloudKit+WebDAV.swift b/NextcloudKit/WebDAV/NextcloudKit+WebDAV.swift
    index ce5e65c..53b6588 100644
    --- a/NextcloudKit/WebDAV/NextcloudKit+WebDAV.swift
    +++ b/NextcloudKit/WebDAV/NextcloudKit+WebDAV.swift
    @@ -239,8 +239,11 @@ extension NextcloudKit {
                     options.queue.async { completion(account, files, nil, error) }
                 case .success( _):
                     if let xmlData = response.data {
    +                    let startTime = CFAbsoluteTimeGetCurrent()
                         files = NKDataFileXML().convertDataFile(xmlData: xmlData, dav: dav, urlBase: urlBase, user: user, userId: userId, showHiddenFiles: showHiddenFiles)
                         options.queue.async { completion(account, files, xmlData, .success) }
    +                    let timeElapsed = CFAbsoluteTimeGetCurrent() - startTime
    +                    print("Elapsed: \(timeElapsed) s")
                     } else {
                         options.queue.async { completion(account, files, nil, .xmlError) }
                     }
    

    Results:

    Original
    Elapsed: 20.474599957466125 s
    Elapsed: 21.04942297935486 s
    Elapsed: 21.118688941001892 s
    
    Cached DateFormatter:
    Elapsed: 19.68568205833435 s
    Elapsed: 20.38596498966217 s
    Elapsed: 20.67156493663788 s
    
    Lazy Date:
    Elapsed: 18.591894030570984 s
    Elapsed: 18.96753704547882 s
    Elapsed: 18.888224005699158 s
    
    Cached UTI
    Elapsed: 13.251657962799072 s
    Elapsed: 13.313650012016296 s
    Elapsed: 13.511384010314941 s
    
    Cached MimeType
    Elapsed: 13.352138042449951 s
    Elapsed: 12.624964952468872 s
    Elapsed: 12.715412020683289 s
    
    Cached FileProperties
    Elapsed: 5.698162078857422 s
    Elapsed: 5.549528002738953 s
    Elapsed: 5.532379984855652 s
    

    If I also add the changes in https://github.com/nextcloud/talk-ios/issues/946 (because we don't need most of the properties) I'm now down to:

    With talk changes
    Elapsed: 2.637057065963745 s
    Elapsed: 2.553444027900696 s
    Elapsed: 2.5751129388809204 s
    
    opened by SystemKeeper 3
  • Use NSCache to fix concurrency issue

    Use NSCache to fix concurrency issue

    Fix the concurrency issue introduced in #7 (as swift dictionaries are not thread safe...). This one uses NSCache now, according to the docs:

    You can add, remove, and query items in the cache from different threads without having to lock the cache yourself.

    This one also adds NKFileProperty, because we need a class to store in NSCache. As swifts String is not supported by NSCache, we now bridge to NSString where needed.

    opened by SystemKeeper 2
  • Double quotes not correctly escaped?

    Double quotes not correctly escaped?

    https://github.com/nextcloud/NextcloudKit/blob/e6650c7c5c40b2ac6f87571cb793cfe16279d6d0/NextcloudKit/NKModel.swift#L609

    should be

    <lock-owner-type xmlns=\"http://nextcloud.org/ns\"/> 
    

    I think?

    opened by SystemKeeper 0
  • Fix NextcloudKit on macOS

    Fix NextcloudKit on macOS

    There are a few small errors when trying to use NCKit on a macOS project due to imports of iOS frameworks

    This PR fixes them by preventing their inclusion in a macOS build. It also adds normal macOS (non Catalyst/Designed for iPad) as a supported destination

    opened by claucambra 0
Releases(1.5.0)
Owner
Nextcloud
📱☁️💻 A safe home for all your data – community-driven, free & open source 👏
Nextcloud
SwiftyXPC - a wrapper for Apple’s XPC interprocess communication library that gives it an easy-to-use, idiomatic Swift interface.

SwiftyXPC is a wrapper for Apple’s XPC interprocess communication library that gives it an easy-to-use, idiomatic Swift interface.

null 36 Jan 1, 2023
A Swift cross-platform (Apple and Linux) networking library.

KippleNetworking A Swift library that offers cross-platform (Apple and Linux) networking support, intended for the creation of cross-platform SDKs to

Kipple 11 Sep 20, 2022
Mimicrated views and controls to native Apple appearance.

Mimicrated views and controls to native Apple appearance. If you have any ideas of what elements can be added, let me know. Below you will see previews of all the elements and how to use them.

Ivan Vorobei 85 Dec 3, 2022
A apple search ads attribution plugin for flutter

A apple search ads attribution plugin for flutter

liam 0 Oct 27, 2021
A collection of Swift Tutorials built with Apple's DocC.

Swift Tutorials This is not a package, it's just a bunch of tutorials This project uses Apple's DocC (Documentation Compiler) to create a set of Swift

Swift Innovators Network 11 Aug 9, 2022
An Apple Watch remake of the Poketch from Pokemon Diamond and Pearl made with SwiftUI

Apple Watch Poketch What is it? It's an Apple Watch remake of the "Poketch" from Pokemon Diamond and Pearl made with SwiftUI! Check out the YouTube vi

André Arko 1 Nov 19, 2021
Home Assistant for Apple Platforms

Home Assistant for Apple Platforms Getting Started Home Assistant uses Bundler, Homebrew and Cocoapods to manage build dependencies. You'll need Xcode

null 0 Nov 23, 2021
Open-source implementation of Apple's Combine for processing values over time

CombineX 简体中文 Open-source implementation of Apple's Combine for processing values over time. Though CombineX have implemented all the Combine interfac

Luo Xiu 1 Dec 30, 2021
Restaurant - Educational application from the Apple Mobile Development Course for MDA

Restaurant Educational application from the Apple Mobile Development Course for

NIKOLAY NIKITIN 0 Aug 8, 2022
Appwrite playground - a simple way to explore the Appwrite API & Appwrite Apple SDK

Appwrite's Apple Playground ?? Appwrite playground is a simple way to explore the Appwrite API & Appwrite Apple SDK. Use the source code of this repos

Appwrite 24 Nov 22, 2022