The project uses CocoaPods to manage its dependencies:
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 72 thousand libraries and is used in over 3 million apps. CocoaPods can help you scale your projects elegantly.
The CocoaPods file is
Podfile, which describes the iOS version
(7.0) to use, and the dependencies name, version and source:
platform :ios, '7.0'
The first step to build it is installing the dependencies. After installing CocoaPods, I ran
pod install and got some errors:
$ pod install
There are some bugs to fix 😃
[!] Could not automatically select an Xcode workspace. Specify one in your Podfile like so:
In this project, the
.xcworkspace file is
kdeconnect-ios.xcworkspace. So, I add
workspace 'kdeconnect-ios' into the file.
[!] The platform of the target `Pods` (iOS 7.0) may not be compatible with `InAppSettingsKit (2.15)` which has a minimum requirement of iOS 8.0.
It’s obvious that the target OS version should be updated. I directly update it to
platform :ios, '12.0'.
[!] The abstract target Pods is not inherited by a concrete target, so the following dependencies won't make it into any targets in your project:
This message indicates that the
pods(dependencies) don’t have a target, according to the CocoaPod doc, I should add
target "kdeconnect-ios" and wrap all the pods with a
do ... end body.
As a result, the
Podfile should be:
After fixing, the output seems normal:
$ pod install
Without error in installing dependencies, it’s possible to open and build it with XCode (though it could be the worst IDE in the world).
The first issue occured while I click
Failed to register bundle identifier.
Apple wants to generate a self-signed certificate for my Apple account and for the application. But it cannot handle the identifier. I change it to
org.kde.kdeconnect.ios and click
Try again. It works.
Then, rebuild and another one came out:
Multiple commands produce '/Users/inoki/Library/Developer/Xcode/DerivedData/kdeconnect-ios-hhcvmcgjatxxdugxbjbrwgotfgna/Build/Products/Debug-iphoneos/kdeconnect-ios.app/zh-Hans.lproj/Localizable.strings':
To fix it, I refer this GitHub issue and change the build system to the legacy one:
After that, another error occurs:
kdeconnect-ios/AppSettingViewController.m:27:9: 'IASKPSTitleValueSpecifierViewCell.h' file not found
This may be an update of one dependency, just remove this import line:
I rebuilt it, but another one came…
ld: '/Users/inoki/Projects/kdeconnect-ios-test/Pods/XbICalendar/libical/lib/libical.a(icalcomponent.c.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
Bitcode may be a feature, but I just want to get it build as soon as possible. So, I disable it in
Build Settings->Build Options:
Another link error occurs. It’s about the WebView stuff:
Undefined symbols for architecture arm64: "_OBJC_CLASS_$_WKWebView"
It seems that the WebKit framework is not included in the project. So, add it in
Build Phases->Link Binary with Libraries:
File(Pods-acknowledgements.plist, Pods-resources.sh) not found
Finally, at the end of building phases, the error came out:
Pods/Pods-acknowledgements.plist:0: Reading data: The file “Pods-acknowledgements.plist” couldn’t be opened because there is no such file.
This could be an error caused by CocoaPod version. To fix it, just copy the files in
Pods/Target Support Files/Pods-kdeconnect-ios to
cp Pods-kdeconnect-ios-acknowledgements.plist ../../Pods-acknowledgements.plist
Finally, it works 😃