AppsOnAir-AppSync is an iOS CocoaPod that enforces mandatory app updates and manages app state dynamically based on network conditions, ensuring version compliance and optimal performance.
⭐️ Compatible with Objective-C, Swift, and SwiftUI
Minimum deployment target: iOS 12.0
Add the package to your project using Xcode:
- Go to File > Add Package Dependencies...
- Enter the repository URL:
https://github.com/apps-on-air/AppsOnAir-iOS-AppSync.git - Select the version or branch you want to use, then click Add Package.
Or add it directly to your Package.swift:
dependencies: [
.package(url: "https://github.com/apps-on-air/AppsOnAir-iOS-AppSync.git", from: "1.3.1")
]Then add "AppsOnAir-AppSync" to your target's dependencies:
.target(
name: "YourTarget",
dependencies: ["AppsOnAir-AppSync"]
)AppsOnAir-AppSync is available through CocoaPods. Add the following line to your Podfile:
pod 'AppsOnAir-AppSync'Then run pod install.
Add application id in your app info.plist file.
<key>AppsonairAppId</key>
<string>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</string>how to get application id for more details check this URL
Firstly, import AppsOnAir_AppSync in appDelegate
Swift / SwiftUI
import AppsOnAir_AppSyncObjective-c
#import "AppsOnAir_AppSync-Swift.h"Swift Ui / Swift :
# AppsOnAirAppSync class object
let appsOnAirSyncService = AppSyncService.shared
# AppsOnAirCore common services Initialization
appsOnAirSyncService.sync(directory: ["showNativeUI":false]) { appUpdateData in
# Write the code here when showNative UI is false
}Objective C :
@interface AppDelegate ()
@property (nonatomic, strong) AppSyncService *appSyncService;
@end
# App Sync Class instance create
self.appSyncService = [AppSyncService shared];
# Help to enable sync manager for app with directory for showNativeUi handling and completion method
[self.appSyncService syncWithDirectory:@{@"showNativeUI":@NO} completion:^(NSDictionary *appUpdate) {
# Write the code here when showNative UI is false
}];devtools-logicwind, devtools@logicwind.com
AppsOnAir-AppSync is available under the MIT license. See the LICENSE file for more info.
For more details, check out this link