提交 cd73e8cc 编写于 作者: L liuxianan

fix:修改目录结构

上级 b0bdc3ad
*.* linguist-language=objective-c
name: Notify
on:
issues:
types: [opened]
issue_comment:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Notify
run: curl --location --request POST 'https://api.finogeeks.club/api/v1/finstore/webhooks/61b331d79b3dad0001f72fa2/postreceive?nonce=jhd2QyrArsc' --header "Content-Type:application/json" --data-raw '{"msg":"仓库 ${{github.repository}} 有新的 issue"}'
name: Notify
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Notify
run: curl --location --request POST 'https://api.finogeeks.club/api/v1/finstore/webhooks/61b331d79b3dad0001f72fa2/postreceive?nonce=jhd2QyrArsc' --header "Content-Type:application/json" --data-raw '{"msg":"仓库 ${{github.repository}} 有新的 PR ${{ github.event.pull_request._links.html.href }}"}'
# Xcode
#
package-lock.json
Gemfile.lock
dist
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
out/
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
Pods/
# Do not track our workspace since it is created by CocoaPods
*.xcworkspace
.DS_Store
build
build-*
out
out-*
Podfile.lock
data.json*
data1.json*
Riot/QSFramworks
stat.sh
MIT License
Copyright (c) 2020 finogeeks
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
platform :ios, "9.0"
inhibit_all_warnings!
target "demo" do
pod 'FinApplet'
pod 'FinAppletExt'
pod 'WechatOpenSDK'
end
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objects = {
/* Begin PBXBuildFile section */
9DD565BE23EC45080011FC4A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DD565BD23EC45080011FC4A /* AppDelegate.m */; };
9DD565C423EC45080011FC4A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DD565C323EC45080011FC4A /* ViewController.m */; };
9DD565C923EC450A0011FC4A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9DD565C823EC450A0011FC4A /* Assets.xcassets */; };
9DD565CC23EC450A0011FC4A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9DD565CA23EC450A0011FC4A /* LaunchScreen.storyboard */; };
9DD565CF23EC450A0011FC4A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DD565CE23EC450A0011FC4A /* main.m */; };
A0E041B926CE6DAD00D58D47 /* demo.plist in Resources */ = {isa = PBXBuildFile; fileRef = A0E041B826CE6DAD00D58D47 /* demo.plist */; };
A0E041BB26CE6E1F00D58D47 /* finosprite.plist in Resources */ = {isa = PBXBuildFile; fileRef = A0E041BA26CE6E1F00D58D47 /* finosprite.plist */; };
A0E041BD26CE720900D58D47 /* servers.plist in Resources */ = {isa = PBXBuildFile; fileRef = A0E041BC26CE720900D58D47 /* servers.plist */; };
A823321F258C3B7000C1B2D5 /* FINDemoClientHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A823321D258C3B7000C1B2D5 /* FINDemoClientHelper.m */; };
A863B745257A09A300959AA1 /* FINExtensionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A863B744257A09A300959AA1 /* FINExtensionHelper.m */; };
A8BC097A258BA095001289A3 /* FINCustomMenuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A8BC0979258BA095001289A3 /* FINCustomMenuModel.m */; };
FBF7F422A6EA50C856DB84F7 /* libPods-demo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 28A582EE796CD12C1FF4F5DB /* libPods-demo.a */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
28A582EE796CD12C1FF4F5DB /* libPods-demo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-demo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3F2BFD149B6F799A303A07B3 /* Pods-demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo.release.xcconfig"; path = "Target Support Files/Pods-demo/Pods-demo.release.xcconfig"; sourceTree = "<group>"; };
9DD565B923EC45080011FC4A /* demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
9DD565BC23EC45080011FC4A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
9DD565BD23EC45080011FC4A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
9DD565C223EC45080011FC4A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
9DD565C323EC45080011FC4A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
9DD565C823EC450A0011FC4A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
9DD565CB23EC450A0011FC4A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
9DD565CD23EC450A0011FC4A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9DD565CE23EC450A0011FC4A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
A0E041B826CE6DAD00D58D47 /* demo.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = demo.plist; sourceTree = "<group>"; };
A0E041BA26CE6E1F00D58D47 /* finosprite.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = finosprite.plist; sourceTree = "<group>"; };
A0E041BC26CE720900D58D47 /* servers.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = servers.plist; sourceTree = "<group>"; };
A823321D258C3B7000C1B2D5 /* FINDemoClientHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FINDemoClientHelper.m; sourceTree = "<group>"; };
A823321E258C3B7000C1B2D5 /* FINDemoClientHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FINDemoClientHelper.h; sourceTree = "<group>"; };
A863B743257A09A200959AA1 /* FINExtensionHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FINExtensionHelper.h; sourceTree = "<group>"; };
A863B744257A09A300959AA1 /* FINExtensionHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FINExtensionHelper.m; sourceTree = "<group>"; };
A8BC0978258BA095001289A3 /* FINCustomMenuModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FINCustomMenuModel.h; sourceTree = "<group>"; };
A8BC0979258BA095001289A3 /* FINCustomMenuModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FINCustomMenuModel.m; sourceTree = "<group>"; };
FBEBA7E73B95B66C846E76FF /* Pods-demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo.debug.xcconfig"; path = "Target Support Files/Pods-demo/Pods-demo.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
9DD565B623EC45080011FC4A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FBF7F422A6EA50C856DB84F7 /* libPods-demo.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9DD565B023EC45080011FC4A = {
isa = PBXGroup;
children = (
9DD565BB23EC45080011FC4A /* demo */,
9DD565BA23EC45080011FC4A /* Products */,
F230DA512C0C77A07ACE5BB1 /* Pods */,
ACE3AE3120D1733A6BB38C8A /* Frameworks */,
);
sourceTree = "<group>";
};
9DD565BA23EC45080011FC4A /* Products */ = {
isa = PBXGroup;
children = (
9DD565B923EC45080011FC4A /* demo.app */,
);
name = Products;
sourceTree = "<group>";
};
9DD565BB23EC45080011FC4A /* demo */ = {
isa = PBXGroup;
children = (
9DD565BC23EC45080011FC4A /* AppDelegate.h */,
9DD565BD23EC45080011FC4A /* AppDelegate.m */,
A823321E258C3B7000C1B2D5 /* FINDemoClientHelper.h */,
A823321D258C3B7000C1B2D5 /* FINDemoClientHelper.m */,
A863B743257A09A200959AA1 /* FINExtensionHelper.h */,
A863B744257A09A300959AA1 /* FINExtensionHelper.m */,
A8BC0978258BA095001289A3 /* FINCustomMenuModel.h */,
A8BC0979258BA095001289A3 /* FINCustomMenuModel.m */,
9DD565C223EC45080011FC4A /* ViewController.h */,
9DD565C323EC45080011FC4A /* ViewController.m */,
9DD565C823EC450A0011FC4A /* Assets.xcassets */,
9DD565CA23EC450A0011FC4A /* LaunchScreen.storyboard */,
9DD565CD23EC450A0011FC4A /* Info.plist */,
9DD565CE23EC450A0011FC4A /* main.m */,
A0E041B826CE6DAD00D58D47 /* demo.plist */,
A0E041BA26CE6E1F00D58D47 /* finosprite.plist */,
A0E041BC26CE720900D58D47 /* servers.plist */,
);
path = demo;
sourceTree = "<group>";
};
ACE3AE3120D1733A6BB38C8A /* Frameworks */ = {
isa = PBXGroup;
children = (
28A582EE796CD12C1FF4F5DB /* libPods-demo.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
F230DA512C0C77A07ACE5BB1 /* Pods */ = {
isa = PBXGroup;
children = (
FBEBA7E73B95B66C846E76FF /* Pods-demo.debug.xcconfig */,
3F2BFD149B6F799A303A07B3 /* Pods-demo.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
9DD565B823EC45080011FC4A /* demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 9DD565D223EC450A0011FC4A /* Build configuration list for PBXNativeTarget "demo" */;
buildPhases = (
E71B82096235B4713AA534F8 /* [CP] Check Pods Manifest.lock */,
9DD565B523EC45080011FC4A /* Sources */,
9DD565B623EC45080011FC4A /* Frameworks */,
9DD565B723EC45080011FC4A /* Resources */,
D5CFBA4174EF15FFF4AA041A /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = demo;
productName = demo;
productReference = 9DD565B923EC45080011FC4A /* demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
9DD565B123EC45080011FC4A /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1130;
ORGANIZATIONNAME = finogeeks;
TargetAttributes = {
9DD565B823EC45080011FC4A = {
CreatedOnToolsVersion = 11.3.1;
};
};
};
buildConfigurationList = 9DD565B423EC45080011FC4A /* Build configuration list for PBXProject "demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 9DD565B023EC45080011FC4A;
productRefGroup = 9DD565BA23EC45080011FC4A /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
9DD565B823EC45080011FC4A /* demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
9DD565B723EC45080011FC4A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9DD565CC23EC450A0011FC4A /* LaunchScreen.storyboard in Resources */,
A0E041BB26CE6E1F00D58D47 /* finosprite.plist in Resources */,
A0E041B926CE6DAD00D58D47 /* demo.plist in Resources */,
9DD565C923EC450A0011FC4A /* Assets.xcassets in Resources */,
A0E041BD26CE720900D58D47 /* servers.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
D5CFBA4174EF15FFF4AA041A /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-demo/Pods-demo-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-demo/Pods-demo-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-demo/Pods-demo-resources.sh\"\n";
showEnvVarsInLog = 0;
};
E71B82096235B4713AA534F8 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-demo-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
9DD565B523EC45080011FC4A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9DD565C423EC45080011FC4A /* ViewController.m in Sources */,
A823321F258C3B7000C1B2D5 /* FINDemoClientHelper.m in Sources */,
A8BC097A258BA095001289A3 /* FINCustomMenuModel.m in Sources */,
A863B745257A09A300959AA1 /* FINExtensionHelper.m in Sources */,
9DD565BE23EC45080011FC4A /* AppDelegate.m in Sources */,
9DD565CF23EC450A0011FC4A /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
9DD565CA23EC450A0011FC4A /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
9DD565CB23EC450A0011FC4A /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
9DD565D023EC450A0011FC4A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
9DD565D123EC450A0011FC4A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
9DD565D323EC450A0011FC4A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FBEBA7E73B95B66C846E76FF /* Pods-demo.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 9QCKYFU5M4;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = demo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.finclip.demo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
9DD565D423EC450A0011FC4A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3F2BFD149B6F799A303A07B3 /* Pods-demo.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = 9QCKYFU5M4;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = demo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.finclip.demo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = github_demo_adhoc;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
9DD565B423EC45080011FC4A /* Build configuration list for PBXProject "demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9DD565D023EC450A0011FC4A /* Debug */,
9DD565D123EC450A0011FC4A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
9DD565D223EC450A0011FC4A /* Build configuration list for PBXNativeTarget "demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9DD565D323EC450A0011FC4A /* Debug */,
9DD565D423EC450A0011FC4A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 9DD565B123EC45080011FC4A /* Project object */;
}
//
// AppDelegate.h
// demo
//
// Created by 杨涛 on 2020/2/6.
// Copyright © 2020 finogeeks. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
//
// AppDelegate.m
// demo
//
// Created by 杨涛 on 2020/2/6.
// Copyright © 2020 finogeeks. All rights reserved.
//
#import "AppDelegate.h"
#import "ViewController.h"
#import "FINExtensionHelper.h"
#import "FINDemoClientHelper.h"
#import <FinApplet/FinApplet.h>
#import <WechatOpenSDK/WXApi.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// servers.plist维护了不同应用,初始化finclip的参数(因为微信支付需要绑定一个可用的账号)
NSString *bundleId = [NSBundle mainBundle].bundleIdentifier;
NSString *path = [[NSBundle mainBundle] pathForResource:@"servers" ofType:@"plist"];
NSDictionary *servers = [NSDictionary dictionaryWithContentsOfFile:path];
NSDictionary *data = servers[bundleId];
NSString *appKey = data[@"appKey"];
NSString *appSecret = data[@"appSecret"];
NSString *apiServer = data[@"apiServer"];
NSString *apiPrefix = data[@"apiPrefix"];
FATApiCryptType cryptType = [data[@"cryptType"] isEqualToString:@"MD5"] ? FATApiCryptTypeMD5 : FATApiCryptTypeSM;
FATConfig *config = [FATConfig configWithAppSecret:appSecret appKey:appKey];
config.apiServer = apiServer;
config.apiPrefix = apiPrefix;
config.cryptType = cryptType;
[[FATClient sharedClient] initWithConfig:config error:nil];
[[FATClient sharedClient] setEnableLog:YES];
[FATClient sharedClient].delegate = [FINDemoClientHelper sharedHelper];
// 注入自定义api
[[FINExtensionHelper sharedHelper] registerCustomApis];
// 该appID【wx85663af68a0cbbc8】绑定的应用为凡泰助手,若要生效,请修改BundleID为com.finogeeks.mop.finosprite
[WXApi registerApp:@"wx85663af68a0cbbc8" universalLink:apiServer];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[ViewController alloc] init];
[self.window makeKeyAndVisible];
return YES;
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options {
if ([url.scheme isEqualToString:@"wx85663af68a0cbbc8"]) {
return [WXApi handleOpenURL:url delegate:(id<WXApiDelegate> _Nullable)[FINExtensionHelper sharedHelper]];
}
return YES;
}
@end
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "minipro_list_collect@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "minipro_list_collect@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "minipro_list_service@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "minipro_list_service@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
//
// FINCustomMenuModel.h
// demo
//
// Created by Haley on 2020/12/17.
// Copyright © 2020 finogeeks. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <FinApplet/FinApplet.h>
NS_ASSUME_NONNULL_BEGIN
@interface FINCustomMenuModel : NSObject<FATAppletMenuProtocol>
@end
NS_ASSUME_NONNULL_END
//
// FINCustomMenuModel.m
// demo
//
// Created by Haley on 2020/12/17.
// Copyright © 2020 finogeeks. All rights reserved.
//
#import "FINCustomMenuModel.h"
@implementation FINCustomMenuModel
@synthesize menuId, menuIconImage, menuTitle, menuType;
- (id)copyWithZone:(NSZone *)zone
{
FINCustomMenuModel *model = [[FINCustomMenuModel allocWithZone:zone] init];
model.menuId = self.menuId;
model.menuIconImage = self.menuIconImage;
model.menuTitle = self.menuTitle;
return model;
}
@end
//
// FINClientHelper.h
// demo
//
// Created by Haley on 2020/12/17.
// Copyright © 2020 finogeeks. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <FinApplet/FinApplet.h>
@interface FINDemoClientHelper : NSObject<FATAppletDelegate>
+ (instancetype)sharedHelper;
@end
//
// FINClientHelper.m
// demo
//
// Created by Haley on 2020/12/17.
// Copyright © 2020 finogeeks. All rights reserved.
//
#import "FINDemoClientHelper.h"
#import "FINCustomMenuModel.h"
static FINDemoClientHelper *instance = nil;
@implementation FINDemoClientHelper
+ (instancetype)sharedHelper {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[[self class] alloc] init];
});
return instance;
}
+ (instancetype)allocWithZone:(struct _NSZone *)zone {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [super allocWithZone:zone];
});
return instance;
}
- (id)copy {
return instance;
}
#pragma mark - FATAppletDelegate
- (void)forwardAppletWithInfo:(NSDictionary *)contentInfo completion:(void (^)(FATExtensionCode, NSDictionary *))completion
{
NSLog(@"小程序信息:%@", contentInfo);
// 1.如果你需要将小程序转发到自己app的聊天室,那么就根据contentInfo封装成自己IM消息,然后发送。
// 2.如果你需要将小程序转发到自己app的朋友圈,那么就根据contentInfo,组装信息发送给后台。
}
/// 小程序灰度扩展参数
/// @param appletId 小程序id
- (NSDictionary *)grayExtensionWithAppletId:(NSString *)appletId
{
if ([appletId isEqualToString:@"5facb3a52dcbff00017469bd"]) {
return @{@"phone":@(1234567890)};
}
if ([appletId isEqualToString:@"5fa214a29a6a7900019b5cc1"]) {
return @{@"token":@"xxxxxtoken"};
}
return @{@"key1":@"value1"};
}
#pragma mark - more menu
/// 更多按钮中自定义的菜单,会在页面弹出菜单时调用该api
/// @param appletInfo 小程序信息
/// @param path 页面路径
- (NSArray<id<FATAppletMenuProtocol>> *)customMenusInApplet:(FATAppletInfo *)appletInfo atPath:(NSString *)path
{
NSString *appletId = appletInfo.appId;
if ([appletId isEqualToString:@"5facb3a52dcbff00017469bd"]) {
FINCustomMenuModel *favModel1 = [[FINCustomMenuModel alloc] init];
favModel1.menuId = @"1001";
favModel1.menuTitle = @"客服";
favModel1.menuIconImage = [UIImage imageNamed:@"minipro_list_service"];
return @[favModel1];
}
if ([appletId isEqualToString:@"5fa214a29a6a7900019b5cc1"]) {
FINCustomMenuModel *favModel2 = [[FINCustomMenuModel alloc] init];
favModel2.menuId = @"1002";
favModel2.menuTitle = @"收藏";
favModel2.menuIconImage = [UIImage imageNamed:@"minipro_list_collect"];
return @[favModel2];
}
FINCustomMenuModel *favModel1 = [[FINCustomMenuModel alloc] init];
favModel1.menuId = @"1003";
favModel1.menuTitle = @"客服";
favModel1.menuIconImage = [UIImage imageNamed:@"minipro_list_service"];
FINCustomMenuModel *favModel2 = [[FINCustomMenuModel alloc] init];
favModel2.menuId = @"1004";
favModel2.menuTitle = @"收藏";
favModel2.menuIconImage = [UIImage imageNamed:@"minipro_list_collect"];
return @[favModel1, favModel2];
}
/// 点击自定义菜单时,会触发的事件
/// @param customMenu 自定义菜单对象
/// @param appletInfo 小程序信息
/// @param path 当前页面路径
- (void)customMenu:(id<FATAppletMenuProtocol>)customMenu inApplet:(FATAppletInfo *)appletInfo didClickAtPath:(NSString *)path
{
NSLog(@"自定义按钮被点击");
if ([customMenu.menuId isEqual:@"1001"]) {
NSLog(@"客服按钮被点击");
return;
}
if ([customMenu.menuId isEqual:@"1002"]) {
NSLog(@"收藏按钮被点击");
// 1.获取用户id
// NSString *userId = @"";
//
// // 2.获取小程序id
// NSString *appletId = appletInfo.appId;
//
// NSDictionary *param = @{@"userId":userId,@"appletId":appletId};
// 3.调用网络接口
// [FINNetworkClient postParam:param completion:];
return;
}
}
@end
//
// FINExtensionHelper.h
// finclip_custom_demo
//
// Created by Haley on 2020/12/3.
//
#import <Foundation/Foundation.h>
@interface FINExtensionHelper : NSObject
+ (instancetype)sharedHelper;
- (void)registerCustomApis;
@end
//
// FINExtensionHelper.m
// finclip_custom_demo
//
// Created by Haley on 2020/12/3.
//
#import "FINExtensionHelper.h"
#import <FinApplet/FinApplet.h>
#import <WechatOpenSDK/WXApi.h>
#import <CommonCrypto/CommonDigest.h>
#import <CommonCrypto/CommonHMAC.h>
@interface FINExtensionHelper () <WXApiDelegate>
// 支付时,支付的回调是异步的,故这里将小程序的回调持有,在适当的时机调用(用户可根据自己的场景自行实现自己调用的逻辑)
@property (nonatomic, copy) FATExtensionApiCallback callback;
@end
static FINExtensionHelper *instance = nil;
@implementation FINExtensionHelper
+ (instancetype)sharedHelper {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[FINExtensionHelper alloc] init];
});
return instance;
}
+ (instancetype)allocWithZone:(struct _NSZone *)zone {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [super allocWithZone:zone];
});
return instance;
}
- (id)copy {
return instance;
}
// 注入自定义api
- (void)registerCustomApis {
[[FATClient sharedClient] registerExtensionApi:@"onNative" handle:^(id param, FATExtensionApiCallback callback) {
NSString *inputText = @"床前明月光,疑是地上霜。举头望明月,低头思故乡。";
callback(FATExtensionCodeSuccess, @{@"text":inputText});
}];
[[FATClient sharedClient] fat_registerWebApi:@"user_define_native" handle:^(id param, FATExtensionApiCallback callback) {
NSString *inputText = @"鹅鹅鹅,曲项向天歌,白毛浮绿水,红掌拨清波。";
callback(FATExtensionCodeSuccess, @{@"text":inputText});
}];
// 注入获取用户信息
[[FATClient sharedClient] registerExtensionApi:@"getUserProfile" handle:^(id param, FATExtensionApiCallback callback) {
NSDictionary *userInfo = @{@"nickName":@"张三",@"avatarUrl":@"",@"gender":@1,@"country":@"中国",@"province":@"广东省",@"city":@"深圳",@"language":@"zh_CN"};
NSDictionary *resDic = @{@"userInfo":userInfo};
callback(FATExtensionCodeSuccess,resDic);
}];
// 注入登录方法
[[FATClient sharedClient] registerExtensionApi:@"login" handle:^(id param, FATExtensionApiCallback callback) {
// 处理小程序登录逻辑后,调用小程序回调
// 登录成功回调示例
callback(FATExtensionCodeSuccess,@{@"desc":@"登录成功"});
}];
// 注入微信支付方法
__weak typeof(self) weakSelf = self;
[[FATClient sharedClient] registerExtensionApi:@"requestPayment" handle:^(id param, FATExtensionApiCallback callback) {
// 支付调用,调用结果通过回调通告小程序
[weakSelf getTestPayment:callback];
}];
}
#pragma mark - WXPay
// 模拟向服务请求支付订单
- (void)getTestPayment:(FATExtensionApiCallback)callback {
NSString *urlString = @"https://finclip-testing.finogeeks.club/mop/wechat-auth/api/order";
NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *requset = [NSMutableURLRequest requestWithURL:url];
requset.HTTPMethod = @"POST";
__weak typeof(self) weakSelf = self;
NSURLSessionTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:requset completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
if (httpResponse.statusCode == 200) {
NSString *appId = @"wx85663af68a0cbbc8";
NSString *partnerId = @"1600932850";
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
NSString *prepayId = dict[@"data"][@"prepay_id"];
NSString *nonceStr = @"5K8264ILTKCH16CQ2502SI8ZNMTM67VS"; // 随机字符串,这里就不模拟了
UInt32 timeStamp = [[NSDate date] timeIntervalSince1970];
NSString *text = [NSString stringWithFormat:@"%@\n%ld\n%@\n%@\n", appId, (long)timeStamp, nonceStr, prepayId];
NSString *sign = [weakSelf sha256:text];
PayReq *request = [[PayReq alloc] init];
request.partnerId = partnerId;
request.prepayId = prepayId;
request.package = @"Sign=WXPay";
request.nonceStr = nonceStr;
request.timeStamp = timeStamp;
request.sign= sign;
dispatch_async(dispatch_get_main_queue(), ^{
[WXApi sendReq:request completion:^(BOOL success) {
if (success) {
weakSelf.callback = callback;
} else {
callback(FATExtensionCodeFailure, nil);
}
}];
});
return;
}
callback(FATExtensionCodeFailure, nil);
}];
[task resume];
}
// 签名加密(正常是放在后台处理,由上面的请求接口返回
- (NSString *)sha256:(NSString *)shaStr {
NSData *data = [shaStr dataUsingEncoding:NSUTF8StringEncoding];
uint8_t digest[CC_SHA256_DIGEST_LENGTH];
CC_SHA256(data.bytes, (CC_LONG)data.length, digest);
NSData *adata = [[NSData alloc] initWithBytes:digest length:CC_SHA256_DIGEST_LENGTH];
adata = [adata base64EncodedDataWithOptions:0];
NSString *ret = [[NSString alloc] initWithData:adata encoding:NSUTF8StringEncoding];
return ret;
}
#pragma mark - WXApiDelegate
//发起支付请求回调
- (void)onReq:(BaseReq *)req {
}
//支付结果回调
- (void)onResp:(BaseResp *)resp {
if ([resp isKindOfClass:[PayResp class]]) {
PayResp *response = (PayResp*)resp;
//response.errCode
// WXSuccess = 0, /**< 成功 */
// WXErrCodeCommon = -1, /**< 普通错误类型 */
// WXErrCodeUserCancel = -2, /**< 用户点击取消并返回 */
// WXErrCodeSentFail = -3, /**< 发送失败 */
// WXErrCodeAuthDeny = -4, /**< 授权失败 */
// WXErrCodeUnsupport = -5, /**< 微信不支持 */
switch (response.errCode) {
case WXSuccess:
self.callback(FATExtensionCodeSuccess, nil);
break;
default:
self.callback(FATExtensionCodeFailure, nil);
break;
}
}
}
@end
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>weixin</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wx85663af68a0cbbc8</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>weixinULAPI</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>是否允许【FinApplet】使用蓝牙?</string>
<key>NSCalendarsUsageDescription</key>
<string>是否允许【FinApplet】使用日历?</string>
<key>NSCameraUsageDescription</key>
<string>是否允许【FinApplet】使用你的相机?</string>
<key>NSContactsUsageDescription</key>
<string>开启同步通讯录信息,可智能补全客户资料。如果系统提示确认权限,请点击“好”。</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>我们需要通过您的地理位置信息获取您周边的相关数据</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>我们需要通过您的地理位置信息获取您周边的相关数据</string>
<key>NSMicrophoneUsageDescription</key>
<string>是否允许【FinApplet】使用你的麦克风?</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>是否允许【FinApplet】使用语相册?</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
//
// ViewController.h
// demo
//
// Created by 杨涛 on 2020/2/6.
// Copyright © 2020 finogeeks. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
//
// ViewController.m
// demo
//
// Created by 杨涛 on 2020/2/6.
// Copyright © 2020 finogeeks. All rights reserved.
//
#import "ViewController.h"
#import <FinApplet/FinApplet.h>
#import <WechatOpenSDK/WXApi.h>
@interface ViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSMutableArray *appletList;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self p_loadData];
[self p_initSubViews];
}
- (void)p_initSubViews {
CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, 44)];
headerView.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1];
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight) style:UITableViewStylePlain];
self.tableView.tableHeaderView = headerView;
self.tableView.tableFooterView = [UIView new];
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self.view addSubview:self.tableView];
}
- (void)p_loadData {
// 配置小程序列表
self.appletList = [[NSMutableArray alloc] init];
NSString *bundleId = [NSBundle mainBundle].bundleIdentifier;
NSString *appName = [bundleId componentsSeparatedByString:@"."].lastObject;
if (![appName isEqualToString:@""]) {
NSString *path = [[NSBundle mainBundle] pathForResource:appName ofType:@"plist"];
NSArray *array = [NSArray arrayWithContentsOfFile:path];
for (NSDictionary *dict in array) {
[self.appletList addObject:dict];
}
}
[self.tableView reloadData];
}
// 原生向小程序发送的事件
- (void)sendCustomEvent {
if (@available(iOS 10.0, *)) {
[NSTimer scheduledTimerWithTimeInterval:3 repeats:YES block:^(NSTimer * _Nonnull timer) {
NSTimeInterval timestamp = [[NSDate date] timeIntervalSince1970];
[[FATClient sharedClient].nativeViewManager sendCustomEventWithDetail:@{@"timestamp":@(timestamp)} completion:^(id result, NSError *error) {
NSLog(@"sendCustomEventW:%@", error);
}];
}];
}
}
#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.appletList.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *identifer = @"identifer";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifer];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifer];
}
NSDictionary *dict = self.appletList[indexPath.row];
cell.textLabel.text = dict[@"title"];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
NSDictionary *dict = self.appletList[indexPath.row];
NSString *appId = dict[@"appId"];
NSDictionary *startParams = dict[@"startParams"];
[[FATClient sharedClient] startRemoteApplet:appId startParams:startParams InParentViewController:self completion:^(BOOL result, NSError *error) {
if ([appId isEqualToString:@"60c5bbf99e094f00015079ee"]) {
[self sendCustomEvent];
}
}];
}
@end
<?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">
<array>
<dict>
<key>appId</key>
<string>5facb3a52dcbff00017469bd</string>
<key>title</key>
<string>绘图小程序</string>
<key>startParams</key>
<dict/>
</dict>
<dict>
<key>appId</key>
<string>5fa214a29a6a7900019b5cc1</string>
<key>title</key>
<string>官方示例小程序</string>
<key>startParams</key>
<dict/>
</dict>
<dict>
<key>appId</key>
<string>5fa215459a6a7900019b5cc3</string>
<key>title</key>
<string>对账单</string>
<key>startParams</key>
<dict/>
</dict>
<dict>
<key>appId</key>
<string>5fc8934aefb8c600019e9747</string>
<key>title</key>
<string>自定义小程序API示例</string>
<key>startParams</key>
<dict/>
</dict>
<dict>
<key>appId</key>
<string>5fc8934aefb8c600019e9747</string>
<key>title</key>
<string>自定义H5 API示例</string>
<key>startParams</key>
<dict>
<key>path</key>
<string>/pages/webview/webview</string>
</dict>
</dict>
<dict>
<key>appId</key>
<string>60c5bbf99e094f00015079ee</string>
<key>title</key>
<string>原生向小程序发送事件</string>
<key>startParams</key>
<dict/>
</dict>
<dict>
<key>appId</key>
<string>60f051ea525ea10001c0bd22</string>
<key>title</key>
<string>小程序登录授权示例</string>
<key>startParams</key>
<dict/>
</dict>
</array>
</plist>
<?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">
<array>
<dict>
<key>appId</key>
<string>611cf17739245f000182fa40</string>
<key>title</key>
<string>小程序微信登录&amp;支付示例</string>
<key>startParams</key>
<dict/>
</dict>
</array>
</plist>
//
// main.m
// demo
//
// Created by 杨涛 on 2020/2/6.
// Copyright © 2020 finogeeks. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
NSString * appDelegateClassName;
@autoreleasepool {
// Setup code that might create autoreleased objects goes here.
appDelegateClassName = NSStringFromClass([AppDelegate class]);
}
return UIApplicationMain(argc, argv, nil, appDelegateClassName);
}
<?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>com.finogeeks.finclip.demo</key>
<dict>
<key>appKey</key>
<string>22LyZEib0gLTQdU3MUauATBwgfnTCJjdr7FCnywmAEM=</string>
<key>appSecret</key>
<string>bdfd76cae24d4313</string>
<key>apiServer</key>
<string>https://api.finclip.com</string>
<key>apiPrefix</key>
<string>/api/v1/mop/</string>
<key>cryptType</key>
<string>MD5</string>
</dict>
<key>com.finogeeks.mop.finosprite</key>
<dict>
<key>appKey</key>
<string>22LyZEib0gLTQdU3MUauAQVLIkNNhTSGIN42gXzlAsk=</string>
<key>appSecret</key>
<string>ae55433be2f62915</string>
<key>apiServer</key>
<string>https://finchat-mop-b.finogeeks.club</string>
<key>apiPrefix</key>
<string>/api/v1/mop/</string>
<key>cryptType</key>
<string>SM</string>
</dict>
</dict>
</plist>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册