Git Product home page Git Product logo

particle-ios's Introduction

Particle iOS

Swift Platforms CocoaPods Compatible License

This repository contains Auth Service and Wallet Service sample source. It supports Solana and all EVM-compatiable chains now, more chains and more features coming soon! Learn more visit Particle Network.

Note

Please note that the AuthCore SDKs only support ios-arm64 (iOS devices). We currently do not support ios-x86_64-simulator (Intel chip simulators) and ios-arm64-simulator (M-series chip simulators).

Prerequisites

Install the following:

Xcode 15.0 or higher iOS 14 or higher

Xcode version 15.0 or higher
ParticleNetworkBase 1.4.10
ParticleWalletAPI 1.4.10
ParticleWalletGUI 1.4.10
ParticleWalletConnect 1.4.10
ParticleAA 1.4.10
ParticleAuthCore 1.4.9
ParticleMPCCore 1.4.9
AuthCoreAdapter 1.4.9
Thresh 1.4.9
ParticleAuthService(deprecated) 1.4.10

๐ŸŽฏ Support Apple Privacy Manifests

From version 1.4.0, all SDKs have been adapted to Apple's privacy requirements.

The following third-party SDKs require the use of specific versions.

pod 'SwiftyUserDefaults', :git => 'https://github.com/SunZhiC/SwiftyUserDefaults.git', :branch => 'master'
# if you need ParticleWalletConnect, you should add this line.
pod 'WalletConnectSwiftV2', :git => 'https://github.com/SunZhiC/WalletConnectSwiftV2.git', :branch => 'particle'
# if you need ParticleAuthCore or ParticleWalletGUI, you should add this line.
pod 'SkeletonView', :git => 'https://github.com/SunZhiC/SkeletonView.git', :branch => 'main'

Migrating to WalletConnect v2

Starting from version 0.14.0, WalletConnectV2 is supported.

๐Ÿ”Œ Podfile request

From 0.9.12, you should add more in Podfile If you use PartcleWalletGUI, you need add this one.

pod 'SkeletonView', :git => 'https://github.com/SunZhiC/SkeletonView.git', :branch => 'main'

๐Ÿง‚ Update Podfile

From 0.8.6, we start to build SDK with XCFramework, that request copy the following text into Podfile.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
    config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
      end
    end
   end

๐Ÿ”ง Getting Started

  • Clone the repo. open Demo folder.
  • Replace ParticelNetwork.info with your project info in the Dashboard.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>PROJECT_UUID</key>
	<string>YOUR_PROJECT_UUID</string>
	<key>PROJECT_CLIENT_KEY</key>
	<string>YOUR_PROJECT_CLIENT_KEY</string>
	<key>PROJECT_APP_UUID</key>
	<string>YOUR_PROJECT_APP_UUID</string>
</dict>
</plist>
  • Config your app scheme url, select your app target, in the info section, click add URL Type, past your scheme in URL Schemes. your scheme url should be "pn" + your project app id.

    for example, if you project app id is "63bfa427-cf5f-4742-9ff1-e8f5a1b9826f", you scheme url is "pn63bfa427-cf5f-4742-9ff1-e8f5a1b9826f". image

  • Add Privacy - Camera Usage Description to your info.plist file

๐Ÿ’ฟ Build

pod install --repo-update

๐Ÿšดโ€โ™‚๏ธ Other Demo

  • GuideSeries: follow iOS Guide step to step, add ParticleSDK to your project.

  • ParticleWalletConnectDemo show how to integrate with ParticleWalletConnect, it use ParticleAuthService to handle request from dapp.

  • ParticleAuthDemo_deprecated show how to integrate ParticleAuthService with a few code.

  • ParticleAuthDemo_Scene_deprecated start from SceneDelegate.swift, show how to integrate ParticleAuthService when app start from SceneDelagate.swift with a few code.

๐Ÿ”ฌ Features

  1. Login with email, phone, facebook, google, apple etc.
  2. Logout.
  3. Open Wallet.
  4. Change Chain Id.
  5. Check our official dev docs: https://developers.particle.network/

๐Ÿ“„ Docs

  1. https://developers.particle.network/reference/auth-ios
  2. https://developers.particle.network/reference/wallet-ios
  3. https://developers.particle.network/reference/aa-ios

๐Ÿ’ผ Give Feedback

Please report bugs or issues to particle-ios/issues

You can also join our Discord.

particle-ios's People

Contributors

chaichuanfa avatar pantaovay avatar sunzhic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

particle-ios's Issues

compile err

image

xcode version is 13.4.1 pod version is 1.11.3.
I need help

The following error occurs when I run demo (Xcode 14.2, Apple M1 Max, Mac os 13.0.1 (22A400)

Undefined symbols for architecture x86_64:
"_$sSa11CryptoSwifts5UInt8VRszlE8toBase64SSyF", referenced from:
_$s19ParticleAuthService3WebC07prepareD033_0ECA0952FEFBFFC16C9FABE130FEA975LL4type4path6querysyAA0D11RequestTypeO_SSSDySSypGtF in ParticleAuthService(Web.o)
_$s19ParticleAuthService3WebC04openD6WalletyyF in ParticleAuthService(Web.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Linked error with Version 1.4.0

When I upgraded from 0.2.10 to 1.4.0, I fixed some API compatibility issues. But when I try to run the project, the compiler produces some errors.

Xcode Version 15.1 (15C65)
And Minimum Deployments is iOS 14.0

ld: warning: ignoring duplicate libraries: '-lc++'
ld: warning: object file (/Users/xxxxx/Library/Developer/Xcode/DerivedData/iOS-bctxqhmlisygbobqivwjjvcbeuhq/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/AuthCoreAdapter/AuthCoreAdapter.framework/AuthCoreAdapter[3](AuthCoreAdapter.o)) was built for newer 'iOS' version (16.2) than being linked (14.0)
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
  dispatch thunk of JXSegmentedView.JXSegmentedView.indicators.getter : [__C.UIView & JXSegmentedView.JXSegmentedIndicatorProtocol], referenced from:
      ParticleWalletGUI.WalletViewController.(reloadTextAndColor in _36257EB54940F3C40877429E1DD641A7)() -> () in ParticleWalletGUI[176](WalletViewController.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Pod install not working on Xcode 14

When I run pod install using this Podfile
Screenshot 2022-10-27 at 16 57 51

The Pods returns that error...
Screenshot 2022-10-27 at 16 56 27

If I remove the specific version from pod ParticleNetworkBase, when I run the Project the Xcode returns this error:

Module compiled with Swift 5.6.1 cannot be imported by the Swift 5.7 compiler: /Users/andre/Documents/XXX/xxx-ios/Pods/ParticleNetworkBase/Frameworks/ParticleNetworkBase.framework/Modules/ParticleNetworkBase.swiftmodule/arm64-apple-ios.swiftmodule

Screenshot 2022-10-27 at 17 03 16

API migration

In version 0.2.10, I use BiconomyService setting with dappApiKeys.

BiconomyService.initialize(dappApiKeys: dappApiKeys)

Now how do I set the "name" parameter of AAService.initialize?

And some of the ChainInfo I used before couldn't find the corresponding in the new version.

ParticleNetwork.ChainInfo.ethereum(.goerli)
ParticleNetwork.ChainInfo.arbitrum(.goerli)
ParticleNetwork.ChainInfo.base(.testnet)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.