This is the Swift + SwiftUI migration of the TheoremReach iOS SDK example app.
The original Objective-C version can be found in the iOSSDK directory. The Swift + Storyboard version can be found in iOSSDK-Swift-Storyboard. This SwiftUI version demonstrates the same functionality using modern SwiftUI architecture.
For additional information, please see the TheoremReach iOS SDK Integration.
- Language: Swift
- UI Framework: SwiftUI
- Min iOS Version: iOS 14.0+ (iOS 15.0+ recommended for best SwiftUI support)
- Frameworks: TheoremReachSDK.xcframework, PlaytimeMonetize.xcframework
- Architecture: SwiftUI App with UIApplicationDelegateAdaptor for SDK integration
- Modern SwiftUI declarative UI
- UIApplicationDelegateAdaptor for legacy SDK integration
- @Published properties for reactive state management
- Environment object injection for app-wide state
- SwiftUI-compatible color extensions
- Support for all device orientations
TheoremReach SDK (Objective-C based) is integrated using UIApplicationDelegateAdaptor:
- AppDelegate handles SDK initialization and delegate protocols
- @Published properties make SDK state available to SwiftUI views
- @EnvironmentObject provides app-wide access to AppDelegate
- ContentView: Main SwiftUI view with purple background and survey button
- AppDelegate: Observable object managing SDK lifecycle
- Color Extension: Hex color support for SwiftUI
- Miscellaneous updates
- Remove bitcode
- Updated version tracking and default colors
- Fix close and refresh buttons for iPhone 8 and earlier
- Better third party login support
- Fix issue with redirecting to offers
- Fix visual issue in landscape
- Added getIsSurveyAvailable
- Minor performance improvements
- Correctly lookup sdk version
- Use xcframework
- Fix code signing issue
- Fix LC_VERSION_MIN_IPHONEOS to now be 14.0 error
- Future proof for iOS 14
- Fix iPadOS display issue with the reward center viewcontroller
- Fixing iPad bug for iOS 13
Add the following to your podfile
pod 'TheoremReach', '3.4.3'Download the latest version of the TheoremReach iOS SDK and add the TheoremReachSDK.xcframework to your project. Follow the integration guide to setup your application to use TheoremReach.
TheoremReach Android SDK Integration