diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml index aaa80f8..2622f4d 100644 --- a/.github/workflows/publish-nuget.yml +++ b/.github/workflows/publish-nuget.yml @@ -11,20 +11,15 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v3 - - name: Set default Xamarin SDK versions - run: | - $VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12 --ios=16.0.0.72 - - - name: Set default Xcode 14.1 + + - name: Install Xamarin.iOS package using Homebrew run: | - XCODE_ROOT=/Applications/Xcode_14.1.0.app - echo "MD_APPLE_SDK_ROOT=$XCODE_ROOT" >> $GITHUB_ENV - sudo xcode-select -s $XCODE_ROOT + brew install --cask xamarin-ios - - name: Setup .NET Core SDK 6.0.403 + - name: Setup .NET Core SDK 8.x uses: actions/setup-dotnet@v3 with: - dotnet-version: '6.0.403' + dotnet-version: '8.0' - name: Install ios workload run: | @@ -34,36 +29,27 @@ jobs: run: | sh build.sh --target=nuget --base-path=$PWD - - name: Publish with Dotnet CLI - env: - NUGET_PUSH_API_KEY: ${{ secrets.NUGET_PUSH_API_KEY }} - shell: bash - run: | - dotnet nuget push ./nugets/*.nupkg --api-key "$NUGET_PUSH_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate + - name: Publish NuGet and symbols + id: nuget-push + uses: edumserrano/nuget-push@v1.2.0 + with: + api-key: '${{ secrets.NUGET_PUSH_API_KEY }}' # this example is using GitHub secrets to pass the API key + working-directory: 'nugets' - # publish: - # runs-on: macos-latest - # steps: - # - name: Publish NuGet and symbols - # id: nuget-push - # uses: edumserrano/nuget-push@v1.1.0 - # with: - # api-key: '${{ secrets.NUGET_PUSH_API_KEY }}' # this example is using GitHub secrets to pass the API key - # working-directory: 'nugets' - # # The next step is using powershell to parse the action's output but you can use whatever you prefer. - # # Note that in order to read the step outputs the action step must have an id. - # - name: Log output - # if: steps.nuget-push.conclusion != 'skipped' && always() # run regardless if the previous step failed or not, just as long as it wasn't skipped - # shell: pwsh - # run: | - # $pushResult = '${{ steps.nuget-push.outputs.push-result }}' | ConvertFrom-Json - # $pushResultAsJsonIndented = ConvertTo-Json $pushResult - # Write-Output $pushResultAsJsonIndented # outputs the result of the nuget push operation as an indented JSON string - # Write-Output '${{ steps.nuget-push.outputs.status }}' # outputs the overall status of the nuget push action + # The next step is using powershell to parse the action's output but you can use whatever you prefer. + # Note that in order to read the step outputs the action step must have an id. + - name: Log output + if: steps.nuget-push.conclusion != 'skipped' && always() # run regardless if the previous step failed or not, just as long as it wasn't skipped + shell: pwsh + run: | + $pushResult = '${{ steps.nuget-push.outputs.push-result }}' | ConvertFrom-Json + $pushResultAsJsonIndented = ConvertTo-Json $pushResult + Write-Output $pushResultAsJsonIndented # outputs the result of the nuget push operation as an indented JSON string + Write-Output '${{ steps.nuget-push.outputs.status }}' # outputs the overall status of the nuget push action - # # iterates over all list of packages and outputs the data from the nuget push operation for each - # foreach($package in $pushResult.packages) { - # Write-Output "$($package.status)" # outputs the status of the nuget push operation - # Write-Output "$($package.package)" # outputs the NuGet package name that was pushed - # Write-Output "$($package.symbols)" # outputs the symbols package name that was pushed - # } + # iterates over all list of packages and outputs the data from the nuget push operation for each + foreach($package in $pushResult.packages) { + Write-Output "$($package.status)" # outputs the status of the nuget push operation + Write-Output "$($package.package)" # outputs the NuGet package name that was pushed + Write-Output "$($package.symbols)" # outputs the symbols package name that was pushed + } \ No newline at end of file diff --git a/README.md b/README.md index f0a7e24..2513471 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ A Xamarin.Android binding library for [Braintree DropIn iOS](https://cocoapods.o ## Installation ``` -dotnet add package BraintreeDropIn.iOS --version 9.7.2 -dotnet add package Xamarin.Swift --version 1.0.11 +dotnet add package BraintreeDropIn.iOS --version 9.7.2.3 +dotnet add package Xamarin.Swift --version 1.2.0 ``` ## Usage diff --git a/config.json b/config.json index e304fbc..2f08687 100644 --- a/config.json +++ b/config.json @@ -20,7 +20,7 @@ { "name": "BraintreeDropIn", "version": "9.7.0", - "nugetVersion": "9.7.0.2", + "nugetVersion": "9.7.0.24", "libraryType": "static", "packageType": "pod", "dependencyOnly": false, @@ -46,7 +46,7 @@ { "name": "Braintree", "version": "5.12.0", - "nugetVersion": "5.12.0.2", + "nugetVersion": "5.12.0.24", "libraryType": "dynamic", "packageType": "spm", "dependencyOnly": false, @@ -149,7 +149,7 @@ { "name": "PayPalCheckout", "version": "0.100.0", - "nugetVersion": "0.100.0.1", + "nugetVersion": "0.100.0.24", "packageType": "pod", "dependencyOnly": false, "targets": [ @@ -165,7 +165,7 @@ { "name": "CardinalMobile", "version": "2.2.5.3", - "nugetVersion": "2.2.5.301", + "nugetVersion": "2.2.5.324", "packageType": "pod", "dependencyOnly": false, "targets": [ @@ -179,7 +179,7 @@ { "name": "KountDataCollector", "version": "4.1.5", - "nugetVersion": "4.1.5.1", + "nugetVersion": "4.1.5.24", "packageType": "pod", "dependencyOnly": false, "targets": [ @@ -193,7 +193,7 @@ { "name": "PPRiskMagnes", "version": "5.4.0", - "nugetVersion": "5.4.0.1", + "nugetVersion": "5.4.0.24", "packageType": "pod", "dependencyOnly": false, "targets": [ diff --git a/global.json b/global.json index c148894..3ac0442 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "6.0.403", + "version": "8.0.100", "rollForward": "latestMinor" }, "msbuild-sdks": diff --git a/samples/DropInQS/AppDelegate.cs b/samples/DropInQS/AppDelegate.cs deleted file mode 100644 index 17a783d..0000000 --- a/samples/DropInQS/AppDelegate.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Foundation; -using UIKit; - -namespace DropInQS2 -{ - // The UIApplicationDelegate for the application. This class is responsible for launching the - // User Interface of the application, as well as listening (and optionally responding) to application events from iOS. - [Register ("AppDelegate")] - public class AppDelegate : UIResponder, IUIApplicationDelegate { - - [Export("window")] - public UIWindow Window { get; set; } - - [Export ("application:didFinishLaunchingWithOptions:")] - public bool FinishedLaunching (UIApplication application, NSDictionary launchOptions) - { - // Override point for customization after application launch. - // If not required for your application you can safely delete this method - return true; - } - - // UISceneSession Lifecycle - - [Export ("application:configurationForConnectingSceneSession:options:")] - public UISceneConfiguration GetConfiguration (UIApplication application, UISceneSession connectingSceneSession, UISceneConnectionOptions options) - { - // Called when a new scene session is being created. - // Use this method to select a configuration to create the new scene with. - return UISceneConfiguration.Create ("Default Configuration", connectingSceneSession.Role); - } - - [Export ("application:didDiscardSceneSessions:")] - public void DidDiscardSceneSessions (UIApplication application, NSSet sceneSessions) - { - // Called when the user discards a scene session. - // If any sessions were discarded while the application was not running, this will be called shortly after `FinishedLaunching`. - // Use this method to release any resources that were specific to the discarded scenes, as they will not return. - } - } -} - - diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon1024.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon1024.png deleted file mode 100644 index 9174c98..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon1024.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon120.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon120.png deleted file mode 100644 index 9c60a17..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon120.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon152.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon152.png deleted file mode 100644 index 448d6ef..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon152.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon167.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon167.png deleted file mode 100644 index 8524768..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon167.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon180.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon180.png deleted file mode 100644 index 60a6470..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon180.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon20.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon20.png deleted file mode 100644 index 45268a6..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon20.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon29.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon29.png deleted file mode 100644 index 6a6c77a..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon29.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon40.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon40.png deleted file mode 100644 index cc7edcf..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon40.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon58.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon58.png deleted file mode 100644 index 1ad04f0..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon58.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon60.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon60.png deleted file mode 100644 index 2dd5262..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon60.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon76.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon76.png deleted file mode 100644 index b058cae..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon76.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon80.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon80.png deleted file mode 100644 index 02e47a2..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon80.png and /dev/null differ diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon87.png b/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon87.png deleted file mode 100644 index 4954a4b..0000000 Binary files a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Icon87.png and /dev/null differ diff --git a/samples/DropInQS/DropInQS.csproj b/samples/DropInQS/DropInQS.csproj deleted file mode 100644 index e3367fe..0000000 --- a/samples/DropInQS/DropInQS.csproj +++ /dev/null @@ -1,154 +0,0 @@ - - - - Debug - iPhoneSimulator - {90EEED57-FCEA-4558-BEF9-DA33625EF00E} - {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {edc1b0fa-90cd-4038-8fad-98fe74adb368} - Exe - DropInQS - DropInQS - Resources - true - NSUrlSessionHandler - PackageReference - automatic - - - true - portable - false - bin\iPhoneSimulator\Debug - DEBUG - prompt - 4 - x86_64 - None - true - latestmajor - - - none - true - bin\iPhoneSimulator\Release - prompt - 4 - None - x86_64 - latestmajor - - - true - portable - false - bin\iPhone\Debug - DEBUG - prompt - 4 - ARM64 - Entitlements.plist - iPhone Developer - true - latestmajor - - - none - true - bin\iPhone\Release - prompt - 4 - Entitlements.plist - ARM64 - iPhone Developer - latestmajor - - - - - - - - - - - - - 1.0.11 - - - 9.7.0.2 - - - 5.12.0.1 - - - 4.1.5.1 - - - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - false - - - - - - - - - - - - - - - - - - - - ViewController.cs - - - - \ No newline at end of file diff --git a/samples/DropInQS/Info.plist b/samples/DropInQS/Info.plist deleted file mode 100644 index 4f07f81..0000000 --- a/samples/DropInQS/Info.plist +++ /dev/null @@ -1,67 +0,0 @@ - - - - - CFBundleDisplayName - DropInQS2 - CFBundleIdentifier - tech.tuyen-vuduc.dropinqs - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - SceneDelegate - UISceneStoryboardFile - Main - - - - - MinimumOSVersion - 14.0 - UIDeviceFamily - - 1 - 2 - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIMainStoryboardFile~ipad - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - XSAppIconAssets - Assets.xcassets/AppIcon.appiconset - - \ No newline at end of file diff --git a/samples/DropInQS/Main.cs b/samples/DropInQS/Main.cs deleted file mode 100644 index e263b55..0000000 --- a/samples/DropInQS/Main.cs +++ /dev/null @@ -1,16 +0,0 @@ -using UIKit; - -namespace DropInQS2 -{ - public class Application - { - // This is the main entry point of the application. - static void Main(string[] args) - { - // if you want to use a different Application Delegate class from "AppDelegate" - // you can specify it here. - UIApplication.Main(args, null, typeof(AppDelegate)); - } - } -} - diff --git a/samples/DropInQS/Properties/AssemblyInfo.cs b/samples/DropInQS/Properties/AssemblyInfo.cs deleted file mode 100644 index b6b2099..0000000 --- a/samples/DropInQS/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("DropInQS2")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("DropInQS2")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/DropInQS/SceneDelegate.cs b/samples/DropInQS/SceneDelegate.cs deleted file mode 100644 index 5a381f5..0000000 --- a/samples/DropInQS/SceneDelegate.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using Foundation; -using UIKit; - -namespace NewSingleViewTemplate { - [Register ("SceneDelegate")] - public class SceneDelegate : UIResponder, IUIWindowSceneDelegate { - - [Export ("window")] - public UIWindow Window { get; set; } - - [Export ("scene:willConnectToSession:options:")] - public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions) - { - // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. - // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. - // This delegate does not imply the connecting scene or session are new (see UIApplicationDelegate `GetConfiguration` instead). - } - - [Export ("sceneDidDisconnect:")] - public void DidDisconnect (UIScene scene) - { - // Called as the scene is being released by the system. - // This occurs shortly after the scene enters the background, or when its session is discarded. - // Release any resources associated with this scene that can be re-created the next time the scene connects. - // The scene may re-connect later, as its session was not neccessarily discarded (see UIApplicationDelegate `DidDiscardSceneSessions` instead). - } - - [Export ("sceneDidBecomeActive:")] - public void DidBecomeActive (UIScene scene) - { - // Called when the scene has moved from an inactive state to an active state. - // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. - } - - [Export ("sceneWillResignActive:")] - public void WillResignActive (UIScene scene) - { - // Called when the scene will move from an active state to an inactive state. - // This may occur due to temporary interruptions (ex. an incoming phone call). - } - - [Export ("sceneWillEnterForeground:")] - public void WillEnterForeground (UIScene scene) - { - // Called as the scene transitions from the background to the foreground. - // Use this method to undo the changes made on entering the background. - } - - [Export ("sceneDidEnterBackground:")] - public void DidEnterBackground (UIScene scene) - { - // Called as the scene transitions from the foreground to the background. - // Use this method to save data, release shared resources, and store enough scene-specific state information - // to restore the scene back to its current state. - } - } -} - diff --git a/samples/DropInQS/ViewController.cs b/samples/DropInQS/ViewController.cs deleted file mode 100644 index 76dffdd..0000000 --- a/samples/DropInQS/ViewController.cs +++ /dev/null @@ -1,76 +0,0 @@ -using Foundation; -using System; -using UIKit; -using BraintreeDropIn; - -namespace DropInQS2 -{ - public partial class ViewController : UIViewController - { - public ViewController (IntPtr handle) : base (handle) - { - var x = KountDataCollector.KDataCollector.SharedCollector; - var xx = new BraintreePayPal.BTPayPalVaultRequest(); - var xxx = new BraintreeThreeDSecure.BTThreeDSecureRequest(); - - var z = new BraintreeDataCollector.BTDataCollector(); - var zz = new BraintreeApplePay.BTApplePayCardNonce(); - var zzz = new BraintreeCard.BTCardNonce(); - var zzzz = new BraintreeCore.BTPaymentMethodNonce(); - var zzzzz = new BraintreePayPal.BTPayPalAccountNonce(); - } - - public override void ViewDidLoad() - { - base.ViewDidLoad(); - // Perform any additional setup after loading the view, typically from a nib. - - btnShowDropIn.TouchUpInside += BtnShowDropIn_TouchUpInside; - } - - private void BtnShowDropIn_TouchUpInside(object sender, EventArgs e) - { - ShowDropIn("sandbox_tmxhyf7d_dcpspy2brwdjr3qn"); - } - - public override void DidReceiveMemoryWarning() - { - base.DidReceiveMemoryWarning(); - // Release any cached data, images, etc that aren't in use. - } - - private void ShowDropIn(string clientTokenOrTokenizationKey) - { - var request = new BTDropInRequest(); - - var dropIn = new BTDropInController(authorization: clientTokenOrTokenizationKey, request: request, handler: HandleDropInResult); - - PresentViewController(dropIn!, animated: true, completionHandler: null); - } - - private void HandleDropInResult(BTDropInController controller, BTDropInResult result, NSError error) - { - if (error != null) - { - System.Diagnostics.Debug.WriteLine(error); - - } - else if (result?.Canceled == true) - { - System.Diagnostics.Debug.WriteLine("Cancel"); - - } - else if (result != null) - { - // Use the BTDropInResult properties to update your UI - // result.paymentMethodType - // result.paymentMethod - // result.paymentIcon - // result.paymentDescription - } - - controller.DismissViewController(animated: true, completionHandler: null); - } - } -} - diff --git a/samples/X/AppDelegate.cs b/samples/X/AppDelegate.cs new file mode 100644 index 0000000..44eb114 --- /dev/null +++ b/samples/X/AppDelegate.cs @@ -0,0 +1,16 @@ +namespace X; + +[Register ("AppDelegate")] +public class AppDelegate : UIApplicationDelegate { + [Export("window")] + public UIWindow Window { get; set; } + + [Export ("application:didFinishLaunchingWithOptions:")] + public bool FinishedLaunching (UIApplication application, NSDictionary launchOptions) + { + // Override point for customization after application launch. + // If not required for your application you can safely delete this method + return true; + } +} + diff --git a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/X/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 99% rename from samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Contents.json rename to samples/X/Assets.xcassets/AppIcon.appiconset/Contents.json index fc9d330..79d29a5 100644 --- a/samples/DropInQS/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/samples/X/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -115,3 +115,4 @@ "author": "xcode" } } + diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon1024.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon1024.png new file mode 100644 index 0000000..b573205 Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon1024.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon120.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon120.png new file mode 100644 index 0000000..0b74155 Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon120.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon152.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon152.png new file mode 100644 index 0000000..1c19313 Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon152.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon167.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon167.png new file mode 100644 index 0000000..4e3e8bd Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon167.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon180.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon180.png new file mode 100644 index 0000000..40a7371 Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon180.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon20.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon20.png new file mode 100644 index 0000000..8bb1383 Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon20.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon29.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon29.png new file mode 100644 index 0000000..bdd130c Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon29.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon40.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon40.png new file mode 100644 index 0000000..75d2789 Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon40.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon58.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon58.png new file mode 100644 index 0000000..06afa60 Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon58.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon60.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon60.png new file mode 100644 index 0000000..2e0db2a Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon60.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon76.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon76.png new file mode 100644 index 0000000..755bc88 Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon76.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon80.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon80.png new file mode 100644 index 0000000..6559bb4 Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon80.png differ diff --git a/samples/X/Assets.xcassets/AppIcon.appiconset/Icon87.png b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon87.png new file mode 100644 index 0000000..ca28c8d Binary files /dev/null and b/samples/X/Assets.xcassets/AppIcon.appiconset/Icon87.png differ diff --git a/samples/DropInQS/Entitlements.plist b/samples/X/Entitlements.plist similarity index 100% rename from samples/DropInQS/Entitlements.plist rename to samples/X/Entitlements.plist diff --git a/samples/X/Info.plist b/samples/X/Info.plist new file mode 100644 index 0000000..6f05230 --- /dev/null +++ b/samples/X/Info.plist @@ -0,0 +1,46 @@ + + + + + CFBundleDisplayName + X + CFBundleIdentifier + com.companyname.X + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/AppIcon.appiconset + UIMainStoryboardFile + Main + UIMainStoryboardFile~ipad + Main + + diff --git a/samples/DropInQS/LaunchScreen.storyboard b/samples/X/LaunchScreen.storyboard similarity index 54% rename from samples/DropInQS/LaunchScreen.storyboard rename to samples/X/LaunchScreen.storyboard index 590690a..73af283 100644 --- a/samples/DropInQS/LaunchScreen.storyboard +++ b/samples/X/LaunchScreen.storyboard @@ -1,27 +1,26 @@  - + - - + + - - + - + - - + + - - - - + + + + - + - + diff --git a/samples/X/Main.cs b/samples/X/Main.cs new file mode 100644 index 0000000..bbaac48 --- /dev/null +++ b/samples/X/Main.cs @@ -0,0 +1,7 @@ +using X; + +// This is the main entry point of the application. +// If you want to use a different Application Delegate class from "AppDelegate" +// you can specify it here. +UIApplication.Main (args, null, typeof (AppDelegate)); + diff --git a/samples/DropInQS/Main.storyboard b/samples/X/Main.storyboard similarity index 100% rename from samples/DropInQS/Main.storyboard rename to samples/X/Main.storyboard diff --git a/samples/DropInQS/Resources/LaunchScreen.xib b/samples/X/Resources/LaunchScreen.xib similarity index 96% rename from samples/DropInQS/Resources/LaunchScreen.xib rename to samples/X/Resources/LaunchScreen.xib index 406007c..e4e7335 100644 --- a/samples/DropInQS/Resources/LaunchScreen.xib +++ b/samples/X/Resources/LaunchScreen.xib @@ -18,7 +18,7 @@ - + + diff --git a/samples/X/SceneDelegate.cs b/samples/X/SceneDelegate.cs new file mode 100644 index 0000000..f966cb0 --- /dev/null +++ b/samples/X/SceneDelegate.cs @@ -0,0 +1,55 @@ +namespace X; + +[Register ("SceneDelegate")] +public class SceneDelegate : UIResponder, IUIWindowSceneDelegate { + + [Export ("window")] + public UIWindow? Window { get; set; } + + [Export ("scene:willConnectToSession:options:")] + public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions) + { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see UIApplicationDelegate `GetConfiguration` instead). + } + + [Export ("sceneDidDisconnect:")] + public void DidDisconnect (UIScene scene) + { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see UIApplicationDelegate `DidDiscardSceneSessions` instead). + } + + [Export ("sceneDidBecomeActive:")] + public void DidBecomeActive (UIScene scene) + { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + [Export ("sceneWillResignActive:")] + public void WillResignActive (UIScene scene) + { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + [Export ("sceneWillEnterForeground:")] + public void WillEnterForeground (UIScene scene) + { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + [Export ("sceneDidEnterBackground:")] + public void DidEnterBackground (UIScene scene) + { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } +} + diff --git a/samples/X/ViewController.cs b/samples/X/ViewController.cs new file mode 100644 index 0000000..a7f461e --- /dev/null +++ b/samples/X/ViewController.cs @@ -0,0 +1,68 @@ +using Foundation; +using System; +using UIKit; +using BraintreeDropIn; + +namespace X; + +public partial class ViewController : UIViewController { + public ViewController (IntPtr handle) : base (handle) + { + var x = KountDataCollector.KDataCollector.SharedCollector; + var xx = new BraintreePayPal.BTPayPalVaultRequest (); + var xxx = new BraintreeThreeDSecure.BTThreeDSecureRequest (); + + var z = new BraintreeDataCollector.BTDataCollector (); + var zz = new BraintreeApplePay.BTApplePayCardNonce (); + var zzz = new BraintreeCard.BTCardNonce (); + var zzzz = new BraintreeCore.BTPaymentMethodNonce (); + var zzzzz = new BraintreePayPal.BTPayPalAccountNonce (); + } + + public override void ViewDidLoad () + { + base.ViewDidLoad (); + // Perform any additional setup after loading the view, typically from a nib. + + btnShowDropIn.TouchUpInside += BtnShowDropIn_TouchUpInside; + } + + private void BtnShowDropIn_TouchUpInside (object sender, EventArgs e) + { + ShowDropIn ("sandbox_tmxhyf7d_dcpspy2brwdjr3qn"); + } + + public override void DidReceiveMemoryWarning () + { + base.DidReceiveMemoryWarning (); + // Release any cached data, images, etc that aren't in use. + } + + private void ShowDropIn (string clientTokenOrTokenizationKey) + { + var request = new BTDropInRequest (); + + var dropIn = new BTDropInController (authorization: clientTokenOrTokenizationKey, request: request, handler: HandleDropInResult); + + PresentViewController (dropIn!, animated: true, completionHandler: null); + } + + private void HandleDropInResult (BTDropInController controller, BTDropInResult result, NSError error) + { + if (error != null) { + System.Diagnostics.Debug.WriteLine (error); + + } else if (result?.Canceled == true) { + System.Diagnostics.Debug.WriteLine ("Cancel"); + + } else if (result != null) { + // Use the BTDropInResult properties to update your UI + // result.paymentMethodType + // result.paymentMethod + // result.paymentIcon + // result.paymentDescription + } + + controller.DismissViewController (animated: true, completionHandler: null); + } +} \ No newline at end of file diff --git a/samples/DropInQS/ViewController.designer.cs b/samples/X/ViewController.designer.cs similarity index 96% rename from samples/DropInQS/ViewController.designer.cs rename to samples/X/ViewController.designer.cs index 7452b04..ebc1c40 100644 --- a/samples/DropInQS/ViewController.designer.cs +++ b/samples/X/ViewController.designer.cs @@ -7,7 +7,7 @@ using Foundation; using System.CodeDom.Compiler; -namespace DropInQS2 +namespace X { [Register ("ViewController")] partial class ViewController diff --git a/samples/X/X.csproj b/samples/X/X.csproj new file mode 100644 index 0000000..3046197 --- /dev/null +++ b/samples/X/X.csproj @@ -0,0 +1,25 @@ + + + net8.0-ios + Exe + enable + true + 13.0 + + + false + + + false + + + + + + + + + + + + diff --git a/samples/dropin-qs.sln b/samples/dropin-qs.sln index a55056c..91ab903 100644 --- a/samples/dropin-qs.sln +++ b/samples/dropin-qs.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 25.0.1704.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DropInQS", "DropInQS\DropInQS.csproj", "{90EEED57-FCEA-4558-BEF9-DA33625EF00E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X", "X\X.csproj", "{5F29EBCE-9D79-480C-9043-13FCFD8ADD28}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,18 +15,18 @@ Global Release|iPhone = Release|iPhone EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Release|Any CPU.Build.0 = Release|iPhoneSimulator - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Debug|iPhone.ActiveCfg = Debug|iPhone - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Debug|iPhone.Build.0 = Debug|iPhone - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Release|iPhone.ActiveCfg = Release|iPhone - {90EEED57-FCEA-4558-BEF9-DA33625EF00E}.Release|iPhone.Build.0 = Release|iPhone + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Release|Any CPU.Build.0 = Release|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Debug|iPhone.Build.0 = Debug|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Release|iPhone.ActiveCfg = Release|Any CPU + {5F29EBCE-9D79-480C-9043-13FCFD8ADD28}.Release|iPhone.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/source/Project.cshtml b/source/Project.cshtml index 3946449..7eadad9 100644 --- a/source/Project.cshtml +++ b/source/Project.cshtml @@ -10,23 +10,15 @@ var sourceFolder = sourceFolderDir + Model.Name.Replace("/", "\\"); var projId = System.Guid.NewGuid(); } - + - xamarin.ios10;net6.0-ios - true - enable - true - true - false - 12.0 - @(Model.NormalizedName) - @(Model.NuGetPackageId) - @(Model.NuGetVersion.Replace("-", "00")) - @(Model.NuGetVersion.Replace("-", "00")) - Resources - PackageReference - Resources - true + net8.0-ios + enable + true + true + true + 15.0 + true @(Model.NuGetPackageId) @@ -42,9 +34,6 @@ false @(Model.NuGetVersion) - - - @@ -54,10 +43,6 @@ - - - -