Skip to content

Commit

Permalink
Swift 6 Ready (#120)
Browse files Browse the repository at this point in the history
- Swift 6 compatibility: The codebase is now fully compatible with Swift 6.
- Enhanced code safety: Various improvements have been made to ensure safer and more robust code.
- In-app Branch attribution support: We've added support for Branch attribution directly within the app.
- Optimized currency fetching: Currency fetching processes have been improved for better performance and accuracy.
  • Loading branch information
ren6 authored Oct 10, 2024
1 parent cbdaff4 commit f231c43
Show file tree
Hide file tree
Showing 30 changed files with 350 additions and 336 deletions.
2 changes: 1 addition & 1 deletion ApphudSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ApphudSDK'
s.version = '3.5.0'
s.version = '3.5.3'
s.summary = 'Build and Measure In-App Subscriptions on iOS.'
s.description = 'Apphud covers every aspect when it comes to In-App Subscriptions from integration to analytics on iOS and Android.'
s.homepage = 'https://github.com/apphud/ApphudSDK'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@
94AE4E8522A0FAC800564F85 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1500;
LastUpgradeCheck = 1400;
LastUpgradeCheck = 1600;
ORGANIZATIONNAME = softeam;
TargetAttributes = {
282FCC512ACAE48400B00D2B = {
Expand Down Expand Up @@ -606,7 +607,7 @@
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -637,7 +638,7 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 3 additions & 3 deletions Examples/ApphudDemoSwift/ApphudSDKDemo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import AdSupport

public typealias BoolCallback = (Bool) -> Void

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
@main
class AppDelegate: UIResponder, UIApplicationDelegate, @preconcurrency UNUserNotificationCenterDelegate {

var window: UIWindow?

Expand Down Expand Up @@ -88,7 +88,7 @@ extension AppDelegate: ApphudUIDelegate {
}
}

extension AppDelegate: ApphudDelegate {
extension AppDelegate: @preconcurrency ApphudDelegate {
func userDidLoad(rawPaywalls: [ApphudSDK.ApphudPaywall], rawPlacements: [ApphudSDK.ApphudPlacement]?) {
print("User loaded, paywalls and placements are available")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extension UIStackView {
}
}

@MainActor
struct LoaderDialog {
static var alert = UIAlertController()
static var progressView = UIProgressView()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import UIKit

@MainActor
class Router: NSObject {

static let shared = Router()
Expand Down
2 changes: 1 addition & 1 deletion Examples/ApphudDemoSwiftUI/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ApphudSDK
import AdSupport
import AppTrackingTransparency

class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate {
class AppDelegate: NSObject, UIApplicationDelegate, @preconcurrency UNUserNotificationCenterDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1420;
LastUpgradeCheck = 1500;
LastUpgradeCheck = 1600;
TargetAttributes = {
2833A959299C95A700398839 = {
CreatedOnToolsVersion = 14.2;
Expand Down Expand Up @@ -382,7 +382,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.apphud.testapplication;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -416,7 +416,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.apphud.testapplication;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 3 additions & 3 deletions Examples/ApphudDemoVisionOS/ApphudSDKDemo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import AdServices

public typealias BoolCallback = (Bool) -> Void

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
@main
class AppDelegate: UIResponder, UIApplicationDelegate, @preconcurrency UNUserNotificationCenterDelegate {

var window: UIWindow?

Expand Down Expand Up @@ -77,7 +77,7 @@ extension AppDelegate: ApphudUIDelegate {
}
}

extension AppDelegate: ApphudDelegate {
extension AppDelegate: @preconcurrency ApphudDelegate {
func userDidLoad(rawPaywalls: [ApphudSDK.ApphudPaywall], rawPlacements: [ApphudSDK.ApphudPlacement]?) {
print("User loaded, paywalls and placements are available")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extension UIStackView {
}
}

@MainActor
struct LoaderDialog {
static var alert = UIAlertController()
static var progressView = UIProgressView()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import UIKit

@MainActor
class Router: NSObject {

static let shared = Router()
Expand Down
Loading

0 comments on commit f231c43

Please sign in to comment.