Update README.md

This commit is contained in:
naquilini 2026-11-30 15:15:16 +00:00
parent 779ca9a393
commit a5f3ab1f53
1 changed files with 6 additions and 152 deletions

158
README.md
View File

@ -9,7 +9,6 @@ This document describes how to integrate in your existing Xcode project the Tecn
- [System requirements](#system) - [System requirements](#system)
- [Installation](#installation) - [Installation](#installation)
- [Swift Package Manager](#spm) - [Swift Package Manager](#spm)
- [Cocoapods](#cocoapods)
- [Manual](#manual) - [Manual](#manual)
- [Package contents](#contents) - [Package contents](#contents)
- [Changes to the Info.plist](#changes) - [Changes to the Info.plist](#changes)
@ -37,7 +36,7 @@ This document describes how to integrate in your existing Xcode project the Tecn
## Installation ## 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)
<a name="spm"></a> <a name="spm"></a>
@ -49,58 +48,6 @@ If you are not using Cocoapods in your project, follow the instruction of the se
4. Click `Add Package`. 4. Click `Add Package`.
5. Go to `Project`-> `Build Settings`-> `Other Linker Flags` and add `-ObjC` if it's not already present. 5. Go to `Project`-> `Build Settings`-> `Other Linker Flags` and add `-ObjC` if it's not already present.
<a name="cocoapods"></a>
### 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 '<YOUR_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 '<YOUR_TARGET>' do
...
pod 'NewsmemorySDK', path: 'ta-newsmemory-sdk_34007'
...
end
```
3. Run `pod install`.
<a name="manual"></a> <a name="manual"></a>
### Manual ### Manual
@ -180,48 +127,6 @@ The unzipped folder named `ta-newsmemory-sdk_34007` has the following subfolders
## Changes to the Info.plist ## 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`
```
<key>UIAppFonts</key>
<array>
<string>Roboto_medium.ttf</string>
<string>Roboto.ttf</string>
<string>rubicon-icon-font.ttf</string>
<string>Merriweather-Bold.otf</string>
<string>Merriweather-Light.otf</string>
<string>Merriweather-Regular.otf</string>
<string>OpenSans-Bold.ttf</string>
<string>OpenSans-Light.ttf</string>
<string>OpenSans-Regular.ttf</string>
<string>DroidKufi-Bold.ttf</string>
<string>DroidKufi-Regular.ttf</string>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Fontisto.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
<string>Nunito-Bold.ttf</string>
<string>Nunito-Medium.ttf</string>
<string>Nunito-Regular.ttf</string>
<string>Nunito-Light.ttf</string>
</array>
```
### Other Info.plist values ### Other Info.plist values
The ePaper usually works with the key `UIViewControllerBasedStatusBarAppearance` set to `NO` 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; @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`). 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) ![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 ## Dependencies
This SDK has been tested with `Google-Mobile-Ads-SDK` versions >= `9.6` and < `12`. 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. 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. 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`
---
<a name="authors"></a> <a name="authors"></a>
## Authors ## Authors