mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
# API Testers cleanup - Moves all API Testers into main RevenueCat workspace - ensure that they all use the local build, not a hardcoded commit - kill all the separate projects, create a single project with a framework per test (objc api tests, swift api tests, etc, etc) - creates a single scheme that builds all of those targets in one pass - update relevant CI (to do) Here's what this actually looks like: a single scheme in Xcode, which you can test using command + U (or just build, since it effectively works too) <img width="515" alt="Screenshot 2024-07-31 at 6 09 33 PM" src="https://github.com/user-attachments/assets/53882e38-f34b-4878-a11e-5d9c304e57ec"> <img width="278" alt="Screenshot 2024-07-31 at 6 09 44 PM" src="https://github.com/user-attachments/assets/3a7a444c-36da-4c82-ab57-4aeab77adb5d"> *Note:* Okay, I'd directly recommend _not_ reviewing the diff, since it's kind of insane, and instead checking out the branch to see if things make sense.
33 lines
1.1 KiB
Swift
33 lines
1.1 KiB
Swift
//
|
|
// PresentedOfferingContextAPI.swift
|
|
// SwiftAPITester
|
|
//
|
|
// Created by Josh Holtz on 2/14/24.
|
|
//
|
|
|
|
import Foundation
|
|
import RevenueCat_CustomEntitlementComputation
|
|
import StoreKit
|
|
|
|
func checkPresentedOfferingContextAPI(context: PresentedOfferingContext! = nil) {
|
|
let _: String = context.offeringIdentifier
|
|
let _: String? = context.placementIdentifier
|
|
let _: PresentedOfferingContext.TargetingContext? = context.targetingContext
|
|
}
|
|
|
|
private func checkCreatePresentedOfferingContextAPI() {
|
|
let _: PresentedOfferingContext = .init(offeringIdentifier: "")
|
|
let _: PresentedOfferingContext = .init(offeringIdentifier: "",
|
|
placementIdentifier: "",
|
|
targetingContext: .init(revision: 1, ruleId: ""))
|
|
}
|
|
|
|
func checkTargetingContextAPI(context: PresentedOfferingContext.TargetingContext! = nil) {
|
|
let _: Int = context.revision
|
|
let _: String? = context.ruleId
|
|
}
|
|
|
|
private func checkTargetingContextAPI() {
|
|
let _: PresentedOfferingContext.TargetingContext = .init(revision: 1, ruleId: "")
|
|
}
|