Skip to content

Commit 45cd4e3

Browse files
Changes to use Airborne SDK in react native
1 parent 5c22220 commit 45cd4e3

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
lines changed

iOS/hyper-ota/Airborne.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Airborne'
3-
s.version = '0.0.1'
3+
s.version = '0.0.2'
44
s.summary = 'An OTA update plugin for Android, iOS and React Native applications.'
55
s.description = <<-DESC
66
Hyper OTA empowers developers to effortlessly integrate Over-The-Air (OTA) update capabilities into their Android, iOS, and React Native applications.

iOS/hyper-ota/Airborne/Classes/Airborne.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
//
55
// Copyright © Juspay Technologies. All rights reserved.
66
//
7+
8+
#import <Airborne/HPJPApplicationManagerDelegate.h>

react-plugin/AirborneReact.podspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ Pod::Spec.new do |s|
3333
}
3434

3535
s.source_files = "ios/**/*.{h,m,mm,cpp}"
36-
s.private_header_files = "ios/**/*.h"
36+
s.public_header_files = "ios/**/*.h"
37+
s.static_framework = false
38+
39+
s.dependency "Airborne", "0.0.2"
3740

3841
install_modules_dependencies(s)
3942
end

react-plugin/example/ios/AirborneExample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
AFD6A59F34A03A60F6533D9F /* libPods-AirborneExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 851151BF10F523772EEBB7C9 /* libPods-AirborneExample.a */; };
10+
95E47D579382B4CC141FD285 /* Pods_AirborneExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 025A197B971943FA60EAAF6C /* Pods_AirborneExample.framework */; };
1111
D12EC9AB2E12B14000EE39A2 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D12EC9A62E12B14000EE39A2 /* Images.xcassets */; };
1212
D12EC9AC2E12B14000EE39A2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D12EC9A82E12B14000EE39A2 /* LaunchScreen.storyboard */; };
1313
D12EC9AD2E12B14000EE39A2 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = D12EC9A92E12B14000EE39A2 /* PrivacyInfo.xcprivacy */; };
1414
D12EC9AF2E12B14000EE39A2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12EC9A52E12B14000EE39A2 /* AppDelegate.swift */; };
1515
/* End PBXBuildFile section */
1616

1717
/* Begin PBXFileReference section */
18+
025A197B971943FA60EAAF6C /* Pods_AirborneExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AirborneExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1819
13B07F961A680F5B00A75B9A /* AirborneExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AirborneExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
1920
45A9F2CD828E5D8DF9FBEDE3 /* Pods-AirborneExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirborneExample.release.xcconfig"; path = "Target Support Files/Pods-AirborneExample/Pods-AirborneExample.release.xcconfig"; sourceTree = "<group>"; };
20-
851151BF10F523772EEBB7C9 /* libPods-AirborneExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AirborneExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
2121
A993245705CC3DF5E7BE5C39 /* Pods-AirborneExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AirborneExample.debug.xcconfig"; path = "Target Support Files/Pods-AirborneExample/Pods-AirborneExample.debug.xcconfig"; sourceTree = "<group>"; };
2222
D12EC9A52E12B14000EE39A2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2323
D12EC9A62E12B14000EE39A2 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
@@ -32,7 +32,7 @@
3232
isa = PBXFrameworksBuildPhase;
3333
buildActionMask = 2147483647;
3434
files = (
35-
AFD6A59F34A03A60F6533D9F /* libPods-AirborneExample.a in Frameworks */,
35+
95E47D579382B4CC141FD285 /* Pods_AirborneExample.framework in Frameworks */,
3636
);
3737
runOnlyForDeploymentPostprocessing = 0;
3838
};
@@ -43,7 +43,7 @@
4343
isa = PBXGroup;
4444
children = (
4545
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
46-
851151BF10F523772EEBB7C9 /* libPods-AirborneExample.a */,
46+
025A197B971943FA60EAAF6C /* Pods_AirborneExample.framework */,
4747
);
4848
name = Frameworks;
4949
sourceTree = "<group>";

react-plugin/example/ios/AirborneExample/AppDelegate.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ import UIKit
22
import React
33
import React_RCTAppDelegate
44
import ReactAppDependencyProvider
5+
import Airborne
56

67
@main
78
class AppDelegate: UIResponder, UIApplicationDelegate {
89
var window: UIWindow?
910

1011
var reactNativeDelegate: ReactNativeDelegate?
1112
var reactNativeFactory: RCTReactNativeFactory?
13+
14+
var airborne: AirborneServices?
1215

1316
func application(
1417
_ application: UIApplication,

react-plugin/example/ios/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ENV['RCT_NEW_ARCH_ENABLED'] = '1'
2+
ENV['USE_FRAMEWORKS'] = 'static'
23

34
# Resolve react_native_pods.rb with node to allow for hoisting
45
require Pod::Executable.execute_command('node', ['-p',

react-plugin/ios/Airborne.mm

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#import "Airborne.h"
22
#import "AirborneiOS.h"
33
#import <React/RCTLog.h>
4+
#import <Airborne/Airborne.h>
5+
#import <Airborne/Airborne-Swift.h>
46

57
@implementation Airborne
68

@@ -11,17 +13,8 @@ + (void)initializeAirborneWithAppId:(NSString *)appId
1113
appVersion:(NSString *)appVersion
1214
releaseConfigTemplateUrl:(NSString *)releaseConfigTemplateUrl
1315
headers:(nullable NSDictionary<NSString *, NSString *> *)headers {
14-
[[AirborneiOS sharedInstance] initializeWithAppId:appId
15-
indexFileName:indexFileName
16-
appVersion:appVersion
17-
releaseConfigTemplateUrl:releaseConfigTemplateUrl
18-
headers:headers
19-
lazyDownloadCallback:^(NSString *filePath, BOOL success) {
20-
RCTLogInfo(@"Airborne: File %@ - %@", filePath, success ? @"installed" : @"failed");
21-
}
22-
lazySplitsCallback:^(BOOL success) {
23-
RCTLogInfo(@"Airborne: Lazy splits - %@", success ? @"installed" : @"failed");
24-
}];
16+
17+
[[AirborneServices alloc] initWithReleaseConfigURL:@"" delegate:nil];
2518
}
2619

2720
#ifdef RCT_NEW_ARCH_ENABLED

0 commit comments

Comments
 (0)