Interacting with Particle Auth within applications made using Cocos.
projectId
, clientKey
, and appId
.
particle-cocos
repository.Core
folder to your project’s assets
directory.particle-cocos
repository.engine
directory to your project’s native
directory.projectId
, clientKey
, and appId
) within $exportDir/proj/gradle.properties,
such as within the example below.
pod install --repo-update
, then open {your project}.xcworkspace
to update and see your project within Xcode.
Now that you’ve configured your Particle dashboard, installed the SDK, and configured a Podfile, it’s time to initialize the SDK with the aforementioned projectId
, clientKey
, and appId
retrieved from the Particle dashboard.
ParticleNetwork-Info.plist
file from the root of your corresponding Xcode project.
Base58.swift
, Model.swift
, and ParticleAuthPlugin.swift
are marked within TargetMembership
.
AppDelegate
file and include a custom return within the (BOOL)application:openURL:options:
method, as shown in the example below:AppDelegate
, ensure a project-specific import is included at the top of the file. This should be #import "{project name}-Swift.h"
.JsbBridgeTest.m
and JsbBridgeTest.h
are crucial components, serving as the core bridge between JS and native code.
To prevent any issues arising from improper setup, ensure that the code within these files matches the code from the demo or includes the exact code from it.
Defining a scheme URL
Your scheme URL should be “pn” concatenated with your projectId
.
For example, if your project app id is
63bfa427-cf5f-4742-9ff1-e8f5a1b9828f
, your scheme URL is
pn63bfa427-cf5f-4742-9ff1-e8f5a1b9828f
.
../../Core/particleAuth
, as shown below: