Skip to content

Commit

Permalink
Moves common dependencies to another repo
Browse files Browse the repository at this point in the history
  • Loading branch information
vegaro committed Jul 18, 2019
1 parent e06fa9a commit e97827a
Show file tree
Hide file tree
Showing 13 changed files with 100 additions and 253 deletions.
2 changes: 1 addition & 1 deletion RNPurchases.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ Pod::Spec.new do |spec|
spec.exclude_files = "ios/Purchases.framework"

spec.dependency "React"
spec.dependency "Purchases", "~> 2.4.0"
spec.dependency "Purchases", "~> 2.5.0"
end
28 changes: 17 additions & 11 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
var exec = require('child_process').exec;
var os = require('os');
const {exec} = require("child_process");
const os = require("os");

if (os.type() === 'Linux') {
console.log("Skipping iOS Dependencies")
} else if (os.type() === 'Darwin') {
var downloadProcess = exec('./scripts/download-purchases-framework.sh 2.4.0')
downloadProcess.stdout.pipe(process.stdout);
} else if (os.type() === 'Windows_NT') {
console.log("Skipping iOS Dependencies")
} else{
throw new Error("Unsupported OS found: " + os.type());
if (os.type() === "Linux") {
console.log("Skipping iOS Dependencies");
} else if (os.type() === "Darwin") {
const downloadProcess = exec(
"./scripts/download-purchases-framework.sh 2.5.0"
);
downloadProcess.stdout.pipe(process.stdout);
const downloadProcessCommon = exec(
"./scripts/download-purchases-common.sh 0.1.1"
);
downloadProcessCommon.stdout.pipe(process.stdout);
} else if (os.type() === "Windows_NT") {
console.log("Skipping iOS Dependencies");
} else {
throw new Error(`Unsupported OS found: ${os.type()}`);
}
4 changes: 3 additions & 1 deletion ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Purchases.framework
.framework_version
.framework_version
.common_version
Common
15 changes: 0 additions & 15 deletions ios/RCEntitlement+RNPurchases.h

This file was deleted.

24 changes: 0 additions & 24 deletions ios/RCEntitlement+RNPurchases.m

This file was deleted.

15 changes: 0 additions & 15 deletions ios/RCPurchaserInfo+RNPurchases.h

This file was deleted.

63 changes: 0 additions & 63 deletions ios/RCPurchaserInfo+RNPurchases.m

This file was deleted.

4 changes: 4 additions & 0 deletions ios/RNPurchases.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//
// Created by RevenueCat.
// Copyright © 2019 RevenueCat. All rights reserved.
//

#if __has_include("RCTEventEmitter.h")
#import "RCTEventEmitter.h"
Expand Down
11 changes: 8 additions & 3 deletions ios/RNPurchases.m
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@

//
// Created by RevenueCat.
// Copyright © 2019 RevenueCat. All rights reserved.
//

#import "RNPurchases.h"

@import StoreKit;

#import "RCPurchaserInfo+RNPurchases.h"
#import "RCEntitlement+RNPurchases.h"
#import "SKProduct+RNPurchases.h"
#import "RCPurchaserInfo+HybridAdditions.h"
#import "RCEntitlement+HybridAdditions.h"
#import "SKProduct+HybridAdditions.h"

@interface RNPurchases () <RCPurchasesDelegate>

Expand Down
45 changes: 27 additions & 18 deletions ios/RNPurchases.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
3535581A20E1574500DB9004 /* RCEntitlement+RNPurchases.m in Sources */ = {isa = PBXBuildFile; fileRef = 3535581920E1574500DB9004 /* RCEntitlement+RNPurchases.m */; };
3535581D20E1586200DB9004 /* SKProduct+RNPurchases.m in Sources */ = {isa = PBXBuildFile; fileRef = 3535581C20E1586200DB9004 /* SKProduct+RNPurchases.m */; };
35493AF2202DFD47004DFA39 /* RCPurchaserInfo+RNPurchases.m in Sources */ = {isa = PBXBuildFile; fileRef = 35493AF1202DFD47004DFA39 /* RCPurchaserInfo+RNPurchases.m */; };
35AB2E5C22E012CA008499FF /* SKProduct+HybridAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 35AB2E5B22E012CA008499FF /* SKProduct+HybridAdditions.m */; };
35AB2E5D22E012CA008499FF /* RCEntitlement+HybridAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 35AB2E5822E012CA008499FF /* RCEntitlement+HybridAdditions.m */; };
35AB2E5E22E012CA008499FF /* RCPurchaserInfo+HybridAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 35AB2E5A22E012CA008499FF /* RCPurchaserInfo+HybridAdditions.m */; };
35D0736B20AD0F740012EB8C /* Purchases.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35D0736A20AD0F740012EB8C /* Purchases.framework */; };
B3E7B58A1CC2AC0600A0062D /* RNPurchases.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNPurchases.m */; };
/* End PBXBuildFile section */
Expand All @@ -28,12 +28,12 @@

/* Begin PBXFileReference section */
134814201AA4EA6300B7C361 /* libRNPurchases.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNPurchases.a; sourceTree = BUILT_PRODUCTS_DIR; };
3535581820E1574500DB9004 /* RCEntitlement+RNPurchases.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCEntitlement+RNPurchases.h"; sourceTree = "<group>"; };
3535581920E1574500DB9004 /* RCEntitlement+RNPurchases.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RCEntitlement+RNPurchases.m"; sourceTree = "<group>"; };
3535581B20E1586200DB9004 /* SKProduct+RNPurchases.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SKProduct+RNPurchases.h"; sourceTree = "<group>"; };
3535581C20E1586200DB9004 /* SKProduct+RNPurchases.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SKProduct+RNPurchases.m"; sourceTree = "<group>"; };
35493AF0202DFD47004DFA39 /* RCPurchaserInfo+RNPurchases.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCPurchaserInfo+RNPurchases.h"; sourceTree = "<group>"; };
35493AF1202DFD47004DFA39 /* RCPurchaserInfo+RNPurchases.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RCPurchaserInfo+RNPurchases.m"; sourceTree = "<group>"; };
35AB2E5622E012C9008499FF /* SKProduct+HybridAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SKProduct+HybridAdditions.h"; sourceTree = "<group>"; };
35AB2E5722E012C9008499FF /* RCEntitlement+HybridAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCEntitlement+HybridAdditions.h"; sourceTree = "<group>"; };
35AB2E5822E012CA008499FF /* RCEntitlement+HybridAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RCEntitlement+HybridAdditions.m"; sourceTree = "<group>"; };
35AB2E5922E012CA008499FF /* RCPurchaserInfo+HybridAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCPurchaserInfo+HybridAdditions.h"; sourceTree = "<group>"; };
35AB2E5A22E012CA008499FF /* RCPurchaserInfo+HybridAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RCPurchaserInfo+HybridAdditions.m"; sourceTree = "<group>"; };
35AB2E5B22E012CA008499FF /* SKProduct+HybridAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SKProduct+HybridAdditions.m"; sourceTree = "<group>"; };
35D0736A20AD0F740012EB8C /* Purchases.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Purchases.framework; sourceTree = SOURCE_ROOT; };
B3E7B5881CC2AC0600A0062D /* RNPurchases.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPurchases.h; sourceTree = "<group>"; };
B3E7B5891CC2AC0600A0062D /* RNPurchases.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPurchases.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -66,18 +66,26 @@
name = Frameworks;
sourceTree = "<group>";
};
35AB2E5F22E0134E008499FF /* Common */ = {
isa = PBXGroup;
children = (
35AB2E5722E012C9008499FF /* RCEntitlement+HybridAdditions.h */,
35AB2E5822E012CA008499FF /* RCEntitlement+HybridAdditions.m */,
35AB2E5922E012CA008499FF /* RCPurchaserInfo+HybridAdditions.h */,
35AB2E5A22E012CA008499FF /* RCPurchaserInfo+HybridAdditions.m */,
35AB2E5622E012C9008499FF /* SKProduct+HybridAdditions.h */,
35AB2E5B22E012CA008499FF /* SKProduct+HybridAdditions.m */,
);
path = Common;
sourceTree = "<group>";
};
58B511D21A9E6C8500147676 = {
isa = PBXGroup;
children = (
35AB2E5F22E0134E008499FF /* Common */,
35D0736A20AD0F740012EB8C /* Purchases.framework */,
B3E7B5881CC2AC0600A0062D /* RNPurchases.h */,
B3E7B5891CC2AC0600A0062D /* RNPurchases.m */,
35493AF0202DFD47004DFA39 /* RCPurchaserInfo+RNPurchases.h */,
35493AF1202DFD47004DFA39 /* RCPurchaserInfo+RNPurchases.m */,
3535581B20E1586200DB9004 /* SKProduct+RNPurchases.h */,
3535581C20E1586200DB9004 /* SKProduct+RNPurchases.m */,
3535581820E1574500DB9004 /* RCEntitlement+RNPurchases.h */,
3535581920E1574500DB9004 /* RCEntitlement+RNPurchases.m */,
134814211AA4EA7D00B7C361 /* Products */,
35493AC8202D4BCD004DFA39 /* Frameworks */,
);
Expand Down Expand Up @@ -122,6 +130,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 58B511D21A9E6C8500147676;
Expand All @@ -139,10 +148,10 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
35493AF2202DFD47004DFA39 /* RCPurchaserInfo+RNPurchases.m in Sources */,
B3E7B58A1CC2AC0600A0062D /* RNPurchases.m in Sources */,
3535581D20E1586200DB9004 /* SKProduct+RNPurchases.m in Sources */,
3535581A20E1574500DB9004 /* RCEntitlement+RNPurchases.m in Sources */,
35AB2E5D22E012CA008499FF /* RCEntitlement+HybridAdditions.m in Sources */,
35AB2E5E22E012CA008499FF /* RCPurchaserInfo+HybridAdditions.m in Sources */,
35AB2E5C22E012CA008499FF /* SKProduct+HybridAdditions.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
15 changes: 0 additions & 15 deletions ios/SKProduct+RNPurchases.h

This file was deleted.

87 changes: 0 additions & 87 deletions ios/SKProduct+RNPurchases.m

This file was deleted.

Loading

0 comments on commit e97827a

Please sign in to comment.