Skip to content

Commit

Permalink
Merge pull request #8 from tangem/feature/IOS-5792-SPM-dependencies-s…
Browse files Browse the repository at this point in the history
…upport

IOS-5792: Add SPM dependencies support
  • Loading branch information
m3g0byt3 committed Feb 7, 2024
2 parents abb6fca + a340edc commit 144d999
Show file tree
Hide file tree
Showing 25 changed files with 100,412 additions and 87,224 deletions.
142 changes: 142 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,143 @@
# Created by https://www.toptal.com/developers/gitignore/api/xcode,swiftpackagemanager,swift,swiftpm,macos
# Edit at https://www.toptal.com/developers/gitignore?templates=xcode,swiftpackagemanager,swift,swiftpm,macos

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Swift ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
# Pods/
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

### SwiftPackageManager ###
Packages
xcuserdata
*.xcodeproj


### SwiftPM ###


### Xcode ###

## Xcode 8 and earlier

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

# End of https://www.toptal.com/developers/gitignore/api/xcode,swiftpackagemanager,swift,swiftpm,macos
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "swift-protobuf-binaries",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tangem/swift-protobuf-binaries.git",
"state" : {
"revision" : "de30521530591d98be12133724e3d78bc0524e41",
"version" : "1.25.2-tangem1"
}
}
],
"version" : 2
}
40 changes: 40 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// swift-tools-version:5.6
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "TangemWalletCoreBinaries",
platforms: [
.iOS(.v14),
],
products: [
// A dummy product for linking dependencies to the binary target (SPM doesn't allow this out of the box)
// This product is an implementation detail, don't import or use it
// Just import the `WalletCore` module as usual and you're good to go
.library(
name: "TangemWalletCoreBinariesWrapper",
targets: ["TangemWalletCoreBinariesWrapper"]
),
],
dependencies: [
.package(
url: "https://github.com/tangem/swift-protobuf-binaries.git",
exact: "1.25.2-tangem1"
),
],
targets: [
.target(
name: "TangemWalletCoreBinariesWrapper",
dependencies: [
.product(name: "SwiftProtobuf", package: "swift-protobuf-binaries"),
.byName(name: "WalletCoreBinaries"),
],
path: "WalletCore"
),
.binaryTarget(
name: "WalletCoreBinaries",
path: "WalletCore.xcframework"
),
]
)
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# wallet-core-ios
[Trust Wallet Core fork](https://github.com/tangem/wallet-core) binaries (iOS + iOS Simulator)

18 changes: 7 additions & 11 deletions TangemWalletCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'TangemWalletCore'
s.version = '4.0.21-tangem2'
s.version = '4.0.21-tangem3'
s.summary = 'Use TW xcframework for Tangem integration'

# This description is used to generate tags and improve search results.
Expand All @@ -22,16 +22,12 @@ TW library for Tangem integration
DESC

s.homepage = 'https://github.com/tangem/wallet-core-binaries-ios'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
# s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Tangem AG' => '' }
s.author = { 'Tangem' => '[email protected]' }
s.social_media_url = 'https://twitter.com/Tangem'
s.source = { :path => '.' }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

s.ios.deployment_target = '13.0'

s.dependency 'SwiftProtobuf'

s.vendored_frameworks = '**/WalletCore.xcframework'
s.ios.deployment_target = '14.5'
s.ios.swift_version = '5.0'
s.dependency 'SwiftProtobuf', '=1.25.2'
s.vendored_frameworks = 'WalletCore.xcframework'

end
10 changes: 5 additions & 5 deletions WalletCore.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@
<key>BinaryPath</key>
<string>WalletCore.framework/WalletCore</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>WalletCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>WalletCore.framework/WalletCore</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>WalletCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file modified WalletCore.xcframework/ios-arm64/WalletCore.framework/Info.plist
Binary file not shown.
Loading

0 comments on commit 144d999

Please sign in to comment.