Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2.16.0 #96

Merged
merged 38 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e6fa498
added cloning instructions (#56)
standa-dev Jul 24, 2023
0f2304b
encryption declaration (#55)
standa-dev Jul 24, 2023
118e35e
added width/height constraints to fix the click action for manually r…
standa-dev Jul 24, 2023
3df3a8f
Merge branch 'main' into develop
brugg Jul 24, 2023
75f9832
Landscape improvements (#54)
standa-dev Jul 24, 2023
4315e4f
Update Info.plist for DP rewarded id (#61) (#62)
brugg Jul 25, 2023
f25f148
Update Nimbus SDK to v2.13.0 (#63)
brugg Jul 26, 2023
5433d0c
Merge branch 'main' into develop
brugg Aug 2, 2023
917bf05
Admob changes develop (#66)
inderdhir Aug 2, 2023
d0cfbe5
updated test renderer to trim white spaces and newlines, always rende…
standa-dev Aug 2, 2023
27b5987
replaced test renderer's textField with a textView to allow scrolling…
standa-dev Aug 3, 2023
7eadb39
Update Sample App to Nimbus v2.14.0 (#69)
brugg Aug 3, 2023
80307d9
added keyboard management to correctly scroll inside the text view (#71)
standa-dev Aug 7, 2023
63e5018
Rename "Dynamic Price" to "Dynamic" (#72)
inderdhir Aug 9, 2023
d1f83b1
fixed video with/out UI settings (#73)
standa-dev Aug 9, 2023
2a73c61
AdManagerViewController memory leak fix (#74)
standa-dev Aug 14, 2023
f4f62bd
Update to 2.15.0 (#76)
inderdhir Aug 17, 2023
b7f11a8
fixes memory leaks - CustomAdContainerView doesn't need to hold a str…
standa-dev Aug 17, 2023
c8cdbee
passing optional header offset to fix use cases where container uses …
standa-dev Aug 25, 2023
e529464
Updated Sample App to v2.15.1 (#78)
brugg Aug 25, 2023
32efd17
Merge branch 'main' into develop
brugg Aug 25, 2023
2608186
Removed pods from the project
brugg Aug 25, 2023
31b5763
Revert wrong change
brugg Aug 25, 2023
ff1ab4b
Updated sample app to v2.15.2 (#80)
brugg Sep 5, 2023
b73cdc5
Merge branch 'main' into develop
brugg Sep 5, 2023
3bf4595
Fix GAM bannerVideo unit not showing Nimbus banner (#83)
inderdhir Sep 11, 2023
828d359
Updated to v2.15.3
brugg Sep 12, 2023
384f09b
Merge branch 'main' into develop
brugg Sep 12, 2023
d9dc21c
added a guide of how to switch between GAM and AdMob (#82)
standa-dev Sep 12, 2023
4afc7e1
Merge branch 'main' into develop
brugg Sep 12, 2023
1e5c3b2
updated text for UI tests parity with android (#86)
standa-dev Sep 19, 2023
c33a36d
added accessibility ID to test render textView (#88)
standa-dev Sep 26, 2023
753c36c
Add accessibility ID for video companion ad (#89)
inderdhir Sep 27, 2023
ec4f80f
internal unityGameId for reuse, added rawValue member to NavigationIt…
standa-dev Sep 27, 2023
be14e44
Updated to v2.15.4 (#90)
brugg Sep 27, 2023
0cb26c2
Replaced all references to timehop by adsbynimbus (#85)
brugg Sep 29, 2023
05d0566
added a troubleshooting section, updated NimbusSDK dependencies so we…
standa-dev Oct 18, 2023
119c258
resolved repo migration conflicts
standa-dev Oct 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Application/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let package = Package(
targets: ["Application"]),
],
dependencies: [
.package(url: "https://github.com/timehop/nimbus-ios-sdk.git", exact: "2.15.3"),
.package(url: "https://github.com/adsbynimbus/nimbus-ios-sdk.git", from: "2.16.0"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Application/Sources/Demand/Unity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import NimbusUnityKit
#endif
import UIKit

fileprivate let unityGameId = Bundle.main.infoDictionary?["Unity Game ID"] as? String ?? ""
let unityGameId = Bundle.main.infoDictionary?["Unity Game ID"] as? String ?? ""

extension UIApplicationDelegate {
func setupUnityDemand() {
Expand Down
4 changes: 3 additions & 1 deletion Application/Sources/Navigation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Foundation
import UIKit

protocol NavigationItem: CaseIterable, CustomStringConvertible {
var rawValue: String { get }

func destinationController(parent: String) -> UIViewController
}

Expand Down Expand Up @@ -77,7 +79,7 @@ enum MainItem: String, NavigationItem {
case .testRender:
return TestRenderViewController(
headerTitle: self.description,
headerSubTitle: "Paste in a VAST or HTML Nimbus response"
headerSubTitle: "Paste a VAST or HTML Nimbus response"
)
case .settings:
return SettingsViewController(headerTitle: self.description, headerSubTitle: "Configure your test app experience")
Expand Down
19 changes: 18 additions & 1 deletion Application/Sources/Rendering/NimbusAdManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class AdManagerViewController: SampleAdViewController {

// To backup existing interceptors to re-inject them at deinit
private let requestInterceptors: [NimbusRequestInterceptor]?
private var hasCompanionAd = false

init(adType: AdManagerAdType, headerSubTitle: String) {
self.adType = adType
Expand Down Expand Up @@ -136,8 +137,24 @@ final class AdManagerViewController: SampleAdViewController {
override func didReceiveNimbusEvent(controller: AdController, event: NimbusEvent) {
super.didReceiveNimbusEvent(controller: controller, event: event)

if let ad = nimbusAd, event == .loaded {
guard let ad = nimbusAd else { return }

switch event {
case .loaded:
controller.adView?.setUiTestIdentifiers(for: ad, refreshing: adType == .bannerWithRefresh)
case .loadedCompanionAd:
hasCompanionAd = true
case .completed:
if hasCompanionAd {
// Ensures companion ad view is present
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
if let companionAdView = controller.adView?.subviews.last {
companionAdView.setCompanionAdUiTestIdentifiers(for: ad)
}
}
}
default:
break
}
}

Expand Down
1 change: 1 addition & 0 deletions Application/Sources/Test/TestRenderViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class TestRenderViewController: DemoViewController {
textView.autocorrectionType = .no
textView.layer.borderWidth = 0.5
textView.layer.borderColor = UIColor.lightGray.cgColor
textView.accessibilityIdentifier = "markup_text"

let accessoryView = UIStackView(frame: CGRect(x: 0, y: 0, width: 0, height: 60))
accessoryView.axis = .vertical
Expand Down
7 changes: 7 additions & 0 deletions Application/Sources/UI/UITest+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ extension UIView {
}
}
}

func setCompanionAdUiTestIdentifiers(for nimbusAd: NimbusAd) {
setUiTestIdentifiers(
for: nimbusAd.testIdentifier,
id: "nimbus_ad_view_companion"
)
}
}
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ target 'nimbus-ios-sample-pods' do

pod 'Application', :path => 'Application'

pod 'NimbusSDK', '2.15.3', subspecs: [
pod 'NimbusSDK', '~> 2.16', subspecs: [
'NimbusKit', # Nimbus SDK
'NimbusRenderStaticKit', # Static Ad Renderer
'NimbusRenderVideoKit', # Video Ad Renderer
Expand Down
49 changes: 46 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nimbus iOS Sample
[![CocoaPods](https://github.com/timehop/nimbus-ios-sample/actions/workflows/cocoapods.yml/badge.svg)](https://github.com/timehop/nimbus-ios-sample/actions/workflows/cocoapods.yml)
[![Swift Package Manager](https://github.com/timehop/nimbus-ios-sample/actions/workflows/spm.yml/badge.svg)](https://github.com/timehop/nimbus-ios-sample/actions/workflows/spm.yml)
[![CocoaPods](https://github.com/adsbynimbus/nimbus-ios-sample/actions/workflows/cocoapods.yml/badge.svg)](https://github.com/adsbynimbus/nimbus-ios-sample/actions/workflows/cocoapods.yml)
[![Swift Package Manager](https://github.com/adsbynimbus/nimbus-ios-sample/actions/workflows/spm.yml/badge.svg)](https://github.com/adsbynimbus/nimbus-ios-sample/actions/workflows/spm.yml)

Welcome to Nimbus Sample App - ads by publishers, for publishers.

Expand All @@ -17,7 +17,7 @@ This repository uses git LFS. Please follow the steps below to install it:
### Clone the repository

- Open your terminal
- Run: `git clone https://github.com/timehop/nimbus-ios-sample`
- Run: `git clone https://github.com/adsbynimbus/nimbus-ios-sample`

## How to run

Expand Down Expand Up @@ -114,6 +114,49 @@ The `Test Render` tool is set up with a 320 by 480 end card Companion Ad by defa
defined in the VAST it will not render without rebuilding the Sample app with an additional Companion Ad definition
that matches the size defined in the VAST markup.

## Troubleshooting

### Unable to boot device because it cannot be located on disk

If you ever see this pop-up error in Xcode, quit all your running simulators, open your terminal and erase all contents and settings of all simulators using: `xcrun simctl erase all`

### Build failed because Application.swiftmodule is missing a required architecture

It's possible you experience this error when trying to run the sample app via cocoapods and the `nimbus-ios-sample-pods` scheme. It's likely caused by a corrupted CocoaPods installation.
You can check whether it's the case by navigating to the project file and selecting the `nimbus-ios-sample-pods` target. Once you're there:

- Click on Build Settings
- Make sure **All** in the secondary top bar is checked
- Type **excluded architectures** in the search bar in the top right corner
- If there's more than one architecture, especially the one your computer runs on, it's likely the problem. E.g. you run on ARM64 (Apple Silicon) and you see `arm64`

#### How to fix it

##### Uninstall CocoaPods

- List the coocapods packages: `gem list --local | grep cocoapods`
- Uninstall every single one of them, e.g. `sudo gem uninstall cocoapods`
- Once you uninstalled everything, delete the local cocoapods directory: `rm -rf ~/.cocoapods`

##### Install CocoaPods

- Run `sudo gem install cocoapods`

##### Clean the nimbus-ios-sample changes

- Navigate to nimbus-ios-sample directory
- Run `git checkout -f` to purge any project changes cocoapods previously did
- Delete the xcworkspace `rm -rf nimbus-ios-sample.xcworkspace`
- Delete the `Podfile.lock` using `rm Podfile.lock`
- Delete the Pods directory: `rm -rf Pods`

##### Re-initialize nimbus-ios-sample using cocoapods

- Run `pod install --repo-update`
- Open the `nimbus-ios-sample.xcworkspace`
- Clean the build using `CMD + Shift + K`
- Try to run the `nimbus-ios-sample-pods` scheme. Everything should work.

## Need help?
You can check out [Nimbus iOS Quick Start Guide](https://adsbynimbus-public.s3.amazonaws.com/iOS/docs/1.11.1/docs/index.html)

Expand Down