commit 5c56bbe09f3d1c1dae5c0c5b4d9b4453570032d7 Author: developer Date: Sat Feb 22 11:21:27 2020 +0800 fix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cf9c6f2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# 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 diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..7560ae1 --- /dev/null +++ b/Podfile @@ -0,0 +1,14 @@ +platform :ios, "9.0" +source 'https://git.finogeeks.com/cocoapods/FinPods' + +source 'https://github.com/CocoaPods/Specs.git' + + + +inhibit_all_warnings! + +target "demo" do + pod 'FinApplet', '2.0.177' +end + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..28a8cb1 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# mop-ios-demo +mop小程序样例 diff --git a/demo.xcodeproj/project.pbxproj b/demo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ffe0634 --- /dev/null +++ b/demo.xcodeproj/project.pbxproj @@ -0,0 +1,396 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 8A8D5069EEC4CE9564C7B391 /* libPods-demo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 28A582EE796CD12C1FF4F5DB /* libPods-demo.a */; }; + 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 */; }; +/* 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 = ""; }; + 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 = ""; }; + 9DD565BD23EC45080011FC4A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 9DD565C223EC45080011FC4A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 9DD565C323EC45080011FC4A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 9DD565C823EC450A0011FC4A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 9DD565CB23EC450A0011FC4A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 9DD565CD23EC450A0011FC4A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9DD565CE23EC450A0011FC4A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 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 = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9DD565B623EC45080011FC4A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8A8D5069EEC4CE9564C7B391 /* 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 = ""; + }; + 9DD565BA23EC45080011FC4A /* Products */ = { + isa = PBXGroup; + children = ( + 9DD565B923EC45080011FC4A /* demo.app */, + ); + name = Products; + sourceTree = ""; + }; + 9DD565BB23EC45080011FC4A /* demo */ = { + isa = PBXGroup; + children = ( + 9DD565BC23EC45080011FC4A /* AppDelegate.h */, + 9DD565BD23EC45080011FC4A /* AppDelegate.m */, + 9DD565C223EC45080011FC4A /* ViewController.h */, + 9DD565C323EC45080011FC4A /* ViewController.m */, + 9DD565C823EC450A0011FC4A /* Assets.xcassets */, + 9DD565CA23EC450A0011FC4A /* LaunchScreen.storyboard */, + 9DD565CD23EC450A0011FC4A /* Info.plist */, + 9DD565CE23EC450A0011FC4A /* main.m */, + ); + path = demo; + sourceTree = ""; + }; + ACE3AE3120D1733A6BB38C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 28A582EE796CD12C1FF4F5DB /* libPods-demo.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + F230DA512C0C77A07ACE5BB1 /* Pods */ = { + isa = PBXGroup; + children = ( + FBEBA7E73B95B66C846E76FF /* Pods-demo.debug.xcconfig */, + 3F2BFD149B6F799A303A07B3 /* Pods-demo.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* 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 */, + BF23969D00C03EFEF2CAA500 /* [CP] Embed Pods Frameworks */, + ); + 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 */, + 9DD565C923EC450A0011FC4A /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + BF23969D00C03EFEF2CAA500 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-demo/Pods-demo-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-demo/Pods-demo-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-demo/Pods-demo-frameworks.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 */, + 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 = ""; + }; +/* 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_STYLE = Automatic; + INFOPLIST_FILE = demo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mop.demo; + PRODUCT_NAME = "$(TARGET_NAME)"; + 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_STYLE = Automatic; + INFOPLIST_FILE = demo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mop.demo; + PRODUCT_NAME = "$(TARGET_NAME)"; + 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 */; +} diff --git a/demo/AppDelegate.h b/demo/AppDelegate.h new file mode 100644 index 0000000..0c81cac --- /dev/null +++ b/demo/AppDelegate.h @@ -0,0 +1,16 @@ +// +// AppDelegate.h +// demo +// +// Created by 杨涛 on 2020/2/6. +// Copyright © 2020 finogeeks. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end + diff --git a/demo/AppDelegate.m b/demo/AppDelegate.m new file mode 100644 index 0000000..68f2249 --- /dev/null +++ b/demo/AppDelegate.m @@ -0,0 +1,39 @@ +// +// AppDelegate.m +// demo +// +// Created by 杨涛 on 2020/2/6. +// Copyright © 2020 finogeeks. All rights reserved. +// + +#import "AppDelegate.h" +#import "ViewController.h" + +#import + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + + NSString *appKey = @"22LyZEib0gLTQdU3MUauAWQrT5jdkwBnjD/4Rw9r+4kA"; + FATConfig *config = [FATConfig configWithAppSecret:@"1a90cee1773badee" appKey:appKey]; + config.apiServer = @"https://mp.finogeeks.com"; + config.apiPrefix = @"/api/v1"; + + [[FATClient sharedClient] initWithConfig:config error:nil]; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + self.window.backgroundColor = [UIColor whiteColor]; + self.window.rootViewController = [[ViewController alloc] init]; + [self.window makeKeyAndVisible]; + + return YES; +} + +@end diff --git a/demo/Assets.xcassets/AppIcon.appiconset/Contents.json b/demo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/demo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "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 diff --git a/demo/Assets.xcassets/Contents.json b/demo/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/demo/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo/Base.lproj/LaunchScreen.storyboard b/demo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/demo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo/Info.plist b/demo/Info.plist new file mode 100644 index 0000000..73e6371 --- /dev/null +++ b/demo/Info.plist @@ -0,0 +1,64 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSBluetoothPeripheralUsageDescription + 是否允许【FinApplet】使用蓝牙? + NSCalendarsUsageDescription + 是否允许【FinApplet】使用日历? + NSCameraUsageDescription + 是否允许【FinApplet】使用你的相机? + NSContactsUsageDescription + 开启同步通讯录信息,可智能补全客户资料。如果系统提示确认权限,请点击“好”。 + NSLocationAlwaysUsageDescription + 我们需要通过您的地理位置信息获取您周边的相关数据 + NSLocationWhenInUseUsageDescription + 我们需要通过您的地理位置信息获取您周边的相关数据 + NSMicrophoneUsageDescription + 是否允许【FinApplet】使用你的麦克风? + NSPhotoLibraryUsageDescription + 是否允许【FinApplet】使用语相册? + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/demo/ViewController.h b/demo/ViewController.h new file mode 100644 index 0000000..3d4ba29 --- /dev/null +++ b/demo/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// demo +// +// Created by 杨涛 on 2020/2/6. +// Copyright © 2020 finogeeks. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/demo/ViewController.m b/demo/ViewController.m new file mode 100644 index 0000000..c05bb19 --- /dev/null +++ b/demo/ViewController.m @@ -0,0 +1,38 @@ +// +// ViewController.m +// demo +// +// Created by 杨涛 on 2020/2/6. +// Copyright © 2020 finogeeks. All rights reserved. +// + +#import "ViewController.h" +#import + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 200, 40)]; + [btn setTitle:@"打开小程序" forState:UIControlStateNormal]; + [btn setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal]; + [btn addTarget:self action:@selector(onTestClick:) forControlEvents:UIControlEventTouchUpInside]; + [self.view addSubview:btn]; +} + +- (void)onTestClick:(id)sender { + + NSString *appId = @"5e3c0950188211000141e9ac"; + // 打开小程序 + [[FATClient sharedClient] startRemoteApplet:appId startParams:nil InParentViewController:self completion:^(BOOL result, NSError *error) { + NSLog(@"result:%d---error:%@", result, error); + }]; +} + +@end diff --git a/demo/main.m b/demo/main.m new file mode 100644 index 0000000..7514bf5 --- /dev/null +++ b/demo/main.m @@ -0,0 +1,19 @@ +// +// main.m +// demo +// +// Created by 杨涛 on 2020/2/6. +// Copyright © 2020 finogeeks. All rights reserved. +// + +#import +#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); +}