diff --git a/README.md b/README.md index 15b5724..a6d64da 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ This document describes how to integrate in your existing Xcode project the Tecn - [System requirements](#system) - [Installation](#installation) - [Swift Package Manager](#spm) - - [Cocoapods](#cocoapods) - [Manual](#manual) - [Package contents](#contents) - [Changes to the Info.plist](#changes) @@ -37,7 +36,7 @@ This document describes how to integrate in your existing Xcode project the Tecn ## Installation -If you are not using Cocoapods in your project, follow the instruction of the section [`'Manual'`](#manual) +If you are not using `Swift Package Manager` in your project, follow the instruction of the section [`'Manual'`](#manual) @@ -49,58 +48,6 @@ If you are not using Cocoapods in your project, follow the instruction of the se 4. Click `Add Package`. 5. Go to `Project`-> `Build Settings`-> `Other Linker Flags` and add `-ObjC` if it's not already present. - - -### Cocoapods - -#### Get the SDK via public repo - -1. Add the following lines inside your target declaration in your `Podfile`. - - Remember to add the source to our specs repo - -``` -... -source 'https://pubgit.newsmemory.com/tecnavia/newsmemory-ios-sdk-specs.git' -... - -target '' do - -... - -pod 'NewsmemorySDK', '3.40.07' - -... - -end -``` - -2. If you are building locally, run `pod install`. If you upgrade from a previous version of NewsmemorySDK run `pod install --repo-update` - -#### Get the SDK thru zip file - -Tecnavia provides you a zip package named `ta-newsmemory-sdk_34007` (i.e. 34007, means that the SDK version is 3.40.07). - -1. Unzip the package and copy the `ta-newsmemory-sdk_34007` folder in the folder containing your project's `Podfile` file. - -2. Add the following lines inside your target declaration in your `Podfile`. - -``` -... - -target '' do - -... - -pod 'NewsmemorySDK', path: 'ta-newsmemory-sdk_34007' - -... - -end -``` - -3. Run `pod install`. - ### Manual @@ -180,48 +127,6 @@ The unzipped folder named `ta-newsmemory-sdk_34007` has the following subfolders ## Changes to the Info.plist -### Fonts (Cocoapods only) - -If you are importing the ePaper SDK via Cocoapods, in order to make ePaper fonts available inside your app you'll need to add the font file name lines to your app's `Info.plist`. -The key were to add the font names is `UIAppFonts` - -``` - UIAppFonts - - Roboto_medium.ttf - Roboto.ttf - rubicon-icon-font.ttf - Merriweather-Bold.otf - Merriweather-Light.otf - Merriweather-Regular.otf - OpenSans-Bold.ttf - OpenSans-Light.ttf - OpenSans-Regular.ttf - DroidKufi-Bold.ttf - DroidKufi-Regular.ttf - AntDesign.ttf - Entypo.ttf - EvilIcons.ttf - Feather.ttf - FontAwesome.ttf - FontAwesome5_Brands.ttf - FontAwesome5_Regular.ttf - FontAwesome5_Solid.ttf - Fontisto.ttf - Foundation.ttf - Ionicons.ttf - MaterialCommunityIcons.ttf - MaterialIcons.ttf - Octicons.ttf - SimpleLineIcons.ttf - Zocial.ttf - Nunito-Bold.ttf - Nunito-Medium.ttf - Nunito-Regular.ttf - Nunito-Light.ttf - -``` - ### Other Info.plist values The ePaper usually works with the key `UIViewControllerBasedStatusBarAppearance` set to `NO` @@ -271,6 +176,11 @@ Before displaying the ePaper View Controller (ex. during the your app setup), ca @import Newsmemory; ... ``` +or add the import of the `Newsmemory` framework in your `.swift` files + +``` +import Newsmemory +``` 2. Make the class that will control the ePaper implement the `NewsmemoryDelegate` interface (the below code shows how you could do it in the `AppDelegate.h`). @@ -307,43 +217,6 @@ If you are using Storyboards you could simply create a `ViewController` element ![Storyboard setup](img/storyboard.png) -## Swift integration - -If you are using Swift in your app and you are using the `use_frameworks!` attribute you need to take additional steps: - -1. add the following lines to your `Podfile`: - -``` -... -### PODS ### -... - -static_libraries = ['NewsmemorySDK'] # <- static libraries names -# Make frameworks in the list static frameworks by overriding the static_framework?function to return true -pre_install do |installer| - installer.pod_targets.each do |pod| - if static_libraries.include?(pod.name) - puts "Overriding the static_framework? method for #{pod.name}" - def pod.static_framework?; - true - end - def pod.build_type; - Pod::BuildType.static_library - end - end - end -end - -``` - -2. run again `pod install` - -3. Add the import of the `Newsmemory` framework in your `.swift` files - -``` -import Newsmemory -``` - ## Dependencies This SDK has been tested with `Google-Mobile-Ads-SDK` versions >= `9.6` and < `12`. @@ -611,25 +484,6 @@ Ensure that the you imported the file `Newsmemory.js` within the SDK resources ( This might mean that xCode is not including the required Swift packages. To fix simply add a blank .swift file and let xCode generate the corresponding bridging header. -#### - `CocoaPods could not find compatible versions for pod "NewsmemorySDK"` when running `pod install` - -``` -[!] CocoaPods could not find compatible versions for pod "NewsmemorySDK": - In Podfile: - NewsmemorySDK (= 3.40.07) - -None of your spec sources contain a spec satisfying the dependency: `NewsmemorySDK (= 3.40.07)`. - -You have either: - * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`. - * mistyped the name or version. - * not added the source repo that hosts the Podspec to your Podfile. -``` - -Simply run `pod install --repo-update` - ---- - ## Authors