Skip to content

Commit

Permalink
Removed useless appdelegate.h import so we can build consuming app
Browse files Browse the repository at this point in the history
Implemented podspecs file to allow react native autolinking & avoid specifying the SumUpSDK in the consuming app's podfile
Removed useless header search paths, added more relevant ones
  • Loading branch information
serybva committed Jan 25, 2023
1 parent 2e4a05b commit 18fd5f5
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 19 deletions.
22 changes: 22 additions & 0 deletions RNSumUp.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = "RNSumUp"
s.version = package['version']
s.summary = package['description']
s.license = package['license']

s.authors = package['author']
s.homepage = package['repository']['url']
s.platform = :ios, "9.0"
s.ios.deployment_target = '9.0'
s.tvos.deployment_target = '10.0'

s.source = { :git => "https://github.com/wavyapp/react-native-sum-up.git", :tag => "v#{s.version}" }
s.source_files = "ios/**/*.{h,m}"

s.dependency 'React'
s.dependency 'SumUpSDK'
end
1 change: 0 additions & 1 deletion ios/RNSumUp.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

#import "RNSumUp.h"
#import "AppDelegate.h"

@implementation RCTConvert (SMPPaymentOptions)

Expand Down
31 changes: 23 additions & 8 deletions ios/RNSumUp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 58B511D21A9E6C8500147676;
Expand Down Expand Up @@ -205,12 +206,21 @@
58B511F01A9E6C8500147676 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SRCROOT)/../node_modules/react-native/**",
"$(PROJECT_DIR)/../../../ios/Pods/SumUpSDK/SumUpSDK.embeddedframework",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../../React/**",
"$(SRCROOT)/../../react-native/React/**",
"$(SRCROOT)/../../../ios/**",
"$(SRCROOT)/../react-native/React/**",
"$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/rn-sumup/ios",
"$(SRCROOT)/Pods/Headers/**",
"$(SRCROOT)/../ios/Pods/Headers/**",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "-ObjC";
Expand All @@ -222,12 +232,17 @@
58B511F11A9E6C8500147676 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SRCROOT)/../node_modules/react-native/**",
"$(PROJECT_DIR)/../../../ios/Pods/SumUpSDK/SumUpSDK.embeddedframework",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../../React/**",
"$(SRCROOT)/../../react-native/React/**",
"$(SRCROOT)/../../../ios/**",
"$(SRCROOT)/../react-native/React/**",
"$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/rn-sumup/ios",
"$(SRCROOT)/Pods/Headers/**",
"$(SRCROOT)/../ios/Pods/Headers/**",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "-ObjC";
Expand Down
9 changes: 0 additions & 9 deletions ios/RNSumUp.xcworkspace/contents.xcworkspacedata

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rn-sumup",
"version": "1.0.1",
"version": "1.1.0",
"description": "SumUpSDK Wrapper for React Native.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 18fd5f5

Please sign in to comment.