Skip to content

Commit

Permalink
chore: fixed issues with cocoapods
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro-all-win-software committed Dec 20, 2024
1 parent 1fd81a6 commit 80d4fef
Show file tree
Hide file tree
Showing 20 changed files with 116 additions and 8 deletions.
20 changes: 20 additions & 0 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
C1C00DE1D4D140D43FF1F838 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0319CE3D006F4355FEBFB2E6 /* Pods_Runner.framework */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -81,6 +82,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
C1C00DE1D4D140D43FF1F838 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -189,6 +191,9 @@
productType = "com.apple.product-type.bundle.unit-test";
};
97C146ED1CF9000F007C117D /* Runner */ = {
packageProductDependencies = (
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
);
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
Expand All @@ -214,6 +219,9 @@

/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
);
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1510;
Expand Down Expand Up @@ -775,6 +783,18 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"originHash" : "d75e1870e24786a8f3168abef93b2bf5b3c10211210817b12d64ec80e264c360",
"pins" : [
{
"identity" : "stripe-ios-spm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stripe/stripe-ios-spm",
"state" : {
"revision" : "653fc8cfc40b33740401f9bd9faa8588f9a53e5f",
"version" : "23.32.0"
}
}
],
"version" : 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"originHash" : "d75e1870e24786a8f3168abef93b2bf5b3c10211210817b12d64ec80e264c360",
"pins" : [
{
"identity" : "stripe-ios-spm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stripe/stripe-ios-spm",
"state" : {
"revision" : "653fc8cfc40b33740401f9bd9faa8588f9a53e5f",
"version" : "23.32.0"
}
}
],
"version" : 3
}
2 changes: 1 addition & 1 deletion example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7

COCOAPODS: 1.12.1
COCOAPODS: 1.16.2
6 changes: 5 additions & 1 deletion example/macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Cocoa
import FlutterMacOS

@NSApplicationMain
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
14 changes: 11 additions & 3 deletions packages/stripe_ios/ios/stripe_ios.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,24 @@ A new flutter plugin project.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'stripe_ios/Sources/**/*.<m,h,swift>'
s.public_header_files = 'stripe_ios/Sources/stripe_objc/include/**/*.h'
s.module_map = 'stripe_ios/Sources/stripe_objc/include/stripe_objc.modulemap'
s.dependency 'Flutter'
s.dependency 'Stripe', stripe_version
s.dependency 'StripePaymentSheet', stripe_version
s.dependency 'StripePayments', stripe_version
s.dependency 'StripePaymentsUI', stripe_version
s.dependency 'StripeApplePay', stripe_version
s.dependency 'StripeFinancialConnections', stripe_version

s.subspec 'stripe_objc' do |ss|
ss.source_files = 'stripe_ios/Sources/**/*.{m,h}'
ss.public_header_files = 'stripe_ios/Sources/stripe_objc/include/**/*.h'
end

s.subspec 'stripe_ios' do |ss|
ss.source_files = 'stripe_ios/Sources/**/*.{swift}'
ss.dependency 'stripe_ios/stripe_objc'
end

s.platform = :ios, '13.0'

# Flutter.framework does not contain a i386 slice.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import Flutter
import UIKit
import PassKit
#if canImport(stripe_objc)
import stripe_objc
#endif

class ApplePayButtonViewFactory: NSObject, FlutterPlatformViewFactory {
private var messenger: FlutterBinaryMessenger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import Foundation
import StripePaymentSheet
import UIKit
#if canImport(stripe_objc)
import stripe_objc
#endif

@objc(AddressSheetView)
class AddressSheetView: UIView {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Foundation
import UIKit
import Stripe
#if canImport(stripe_objc)
import stripe_objc
#endif

@objc(AuBECSDebitFormView)
class AuBECSDebitFormView: UIView, STPAUBECSDebitFormViewDelegate {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Foundation
import UIKit
import Stripe
#if canImport(stripe_objc)
import stripe_objc
#endif

class CardFieldView: UIView, STPPaymentCardTextFieldDelegate {
@objc var onCardChange: RCTDirectEventBlock?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Foundation
import UIKit
import Stripe
#if canImport(stripe_objc)
import stripe_objc
#endif

class CardFormView: UIView, STPCardFormViewDelegate {
public var cardForm: STPCardFormView?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
import Foundation
import StripeFinancialConnections
import Stripe
import stripe_objc
import UIKit
#if canImport(stripe_objc)
import stripe_objc
#endif

class FinancialConnections {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import Foundation
@_spi(PrivateBetaCustomerSheet) @_spi(STP) import StripePaymentSheet
import UIKit
#if canImport(stripe_objc)
import stripe_objc
#endif

extension StripeSdk {
@objc(initCustomerSheet:customerAdapterOverrides:resolver:rejecter:)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
//

import Foundation
#if canImport(stripe_objc)
import stripe_objc
#endif
@_spi(ExperimentalAllowsRemovalOfLastSavedPaymentMethodAPI) @_spi(CustomerSessionBetaAccess) @_spi(STP) import StripePaymentSheet

extension StripeSdk {
Expand Down Expand Up @@ -311,4 +313,3 @@ extension StripeSdk {
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import Stripe
import StripePaymentSheet
import StripeFinancialConnections
import Foundation
#if canImport(stripe_objc)
import stripe_objc
#endif

@objc(StripeSdk)
class StripeSdk: RCTEventEmitter, STPBankSelectionViewControllerDelegate, UIAdaptivePresentationControllerDelegate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import Foundation
import Stripe
import PassKit
#if canImport(stripe_objc)
import stripe_objc
#endif

@objc(AddToWalletButtonView)
class AddToWalletButtonView: UIView {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import Flutter
import UIKit
import Stripe
import PassKit
#if canImport(stripe_objc)
import stripe_objc
#endif

protocol ViewManagerDelegate {
var cardFieldView: CardFieldView? { get set }
Expand Down Expand Up @@ -660,4 +662,3 @@ extension StripePlugin {
result(nil)
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#if __has_include(<stripe_objc/RCTBridge.h>)
#import <stripe_objc/RCTBridge.h>
#else
#import "RCTBridge.h"
#endif

@implementation UIView (React)

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#if __has_include(<stripe_objc/RCTBridge.h>)
#import <stripe_objc/RCTBridge.h>
#else
#import "RCTBridge.h"
#endif

0 comments on commit 80d4fef

Please sign in to comment.