# Conflicts:
#	star_lock/lib/common/XSConstantMacro/XSConstantMacro.dart
#	star_lock/lib/network/api.dart
#	star_lock/lib/network/api_repository.dart
This commit is contained in:
魏少阳 2024-02-01 11:24:46 +08:00
commit 361162414b
207 changed files with 2899 additions and 19698 deletions

View File

@ -115,15 +115,22 @@ android {
versionName flutterVersionName
signingConfig signingConfigs.pre
// 使 flutter build apk --split-per-abi
// ndk在同一个个包中包含多个架构
// 使 flutter build apk --split-per-abi
// ndk在同一个个包中包含多个架构
// NDK配置使flutter run .apk包
ndk {
//SO库架构so
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86","x86_64"
}
splits {
abi {
enable true
reset()
// x86_64,x86,armeabi-v7a,armeabi,arm64-v8a
// x86_64,x86,armeabi-v7a,armeabi,arm64-v8a
include "armeabi", "armeabi-v7a", "arm64-v8a", "x86","x86_64"
universalApk true
}
}
}

View File

@ -75,4 +75,4 @@
</intent-filter>
</receiver>
</application>
</manifest>
</manifest>

View File

@ -7,9 +7,28 @@
# 安卓图标dart run flutter_flavorizr -p android:icons
# 安卓构建参数集配置dart run flutter_flavorizr -p android:androidManifest
# 安卓构建目标配置dart run flutter_flavorizr -p android:buildGradle
# iOS图标dart run flutter_flavorizr -
# iOS构建参数集配置dart run flutter_flavorizr -
# iOS构建目标配置dart run flutter_flavorizr -
# 用法-生成iOS图标dart run flutter_flavorizr -p ios:icons
# Scheme 定义了构建目标、测试、运行、调试和分析应用程序的方式。它是Xcode中一个关键的组件用于配置不同的构建设置和运行环境。
# 可以有针对不同目的的多个Schemes例如一个用于调试的Scheme、一个用于发布的Scheme以及用于不同测试环境的Scheme。
# 用法 dart run flutter_flavorizr -p ios:schema
# XCConfig文件是Xcode配置文件用于外部化和管理项目的构建设置。通过使用这些文件可以更容易地管理和共享构建配置。
# 可以为不同的构建环境如Debug和Release或不同的应用flavor配置多个XCConfig文件。
# 用法dart run flutter_flavorizr -p ios:xcconfig
# Build Target定义了一个构建过程它描述了如何编译和链接构建应用程序的源代码。每个Target可以有不同的配置和目的例如一个应用程序Target、一个单元测试Target
# 可能包括应用程序本身的Target、测试Target、用于不同flavor的Target或者针对不同平台如iOS和macOS的Target。
# 用法dart run flutter_flavorizr -p ios:buildTargets
# Plist文件用于存储应用程序的配置信息如应用版本号、显示名称等。它是一个XML文件Xcode在构建应用程序时会读取它
# 每个Target通常有自己的Info.plist文件还可能有其他Plist文件来管理不同的配置和设置。
# 用法dart run flutter_flavorizr -p ios:plist
# LaunchScreen启动屏幕是应用启动时显示的界面通常包含应用的Logo和名称。它在应用加载期间显示提供更好的用户体验。
# 可以针对不同的设备和屏幕尺寸配置多个LaunchScreen或者为不同的版本或flavor提供不同的启动屏幕。
# 用法dart run flutter_flavorizr -p ios:launchScreen
# 项目运行说明添加不同风味后不能再使用flutter默认的运行方式`flutter run`,而是需要指定运行的风味
# flutter run --flavor <flavor> -t lib/main_<flavor>.dart
@ -22,6 +41,11 @@
# flutter run --flavor sky -t lib/main_sky.dart
# flutter run --flavor xhj -t lib/main_xhj.dart
# 下面是安卓发布编译命令
# flutter build apk --split-per-abi --release --flavor sky -t lib/main_sky.dart
# IOS编译发布
# TODO 待补充
app:
android:
flavorDimensions: "flavor-type"
@ -33,13 +57,16 @@ flavors:
icon: "assets/icon/dev.png"
android:
applicationId: "com.starlock.lock.dev"
ios:
bundleId: "com.starlock.lock.dev"
pre:
app:
name: "星锁"
icon: "assets/icon/pre.png"
android:
applicationId: "com.starlock.lock.pre"
ios:
bundleId: "com.starlock.lock.pre"
sky:
app:
name: "锁通通"
@ -48,6 +75,8 @@ flavors:
applicationId: "com.skychip.lock"
customConfig:
signingConfig: signingConfigs.sky
ios:
bundleId: "com.skychip.lock"
xhj:
app:
name: "鑫锁"
@ -56,4 +85,6 @@ flavors:
applicationId: "com.xhjcn.lock"
customConfig:
signingConfig: signingConfigs.xhj
ios:
bundleId: "com.xhjcn.lock"
ide: idea

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_dev.dart
ASSET_PREFIX=dev
BUNDLE_NAME=星锁-dev
BUNDLE_DISPLAY_NAME=星锁-dev

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_dev.dart
ASSET_PREFIX=dev
BUNDLE_NAME=星锁-dev
BUNDLE_DISPLAY_NAME=星锁-dev

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_dev.dart
ASSET_PREFIX=dev
BUNDLE_NAME=星锁-dev
BUNDLE_DISPLAY_NAME=星锁-dev

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_pre.dart
ASSET_PREFIX=pre
BUNDLE_NAME=星锁
BUNDLE_DISPLAY_NAME=星锁

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_pre.dart
ASSET_PREFIX=pre
BUNDLE_NAME=星锁
BUNDLE_DISPLAY_NAME=星锁

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_pre.dart
ASSET_PREFIX=pre
BUNDLE_NAME=星锁
BUNDLE_DISPLAY_NAME=星锁

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_sky.dart
ASSET_PREFIX=sky
BUNDLE_NAME=锁通通
BUNDLE_DISPLAY_NAME=锁通通

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_sky.dart
ASSET_PREFIX=sky
BUNDLE_NAME=锁通通
BUNDLE_DISPLAY_NAME=锁通通

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_sky.dart
ASSET_PREFIX=sky
BUNDLE_NAME=锁通通
BUNDLE_DISPLAY_NAME=锁通通

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_xhj.dart
ASSET_PREFIX=xhj
BUNDLE_NAME=鑫锁
BUNDLE_DISPLAY_NAME=鑫锁

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_xhj.dart
ASSET_PREFIX=xhj
BUNDLE_NAME=鑫锁
BUNDLE_DISPLAY_NAME=鑫锁

View File

@ -0,0 +1,6 @@
#include "Generated.xcconfig"
FLUTTER_TARGET=lib/main_xhj.dart
ASSET_PREFIX=xhj
BUNDLE_NAME=鑫锁
BUNDLE_DISPLAY_NAME=鑫锁

View File

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
platform :ios, '12.0'
#use_modular_headers!
use_frameworks! :linkage => :static
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.

View File

@ -103,6 +103,7 @@ PODS:
- Flutter
- video_player_avfoundation (0.0.1):
- Flutter
- FlutterMacOS
- webview_flutter_wkwebview (0.0.1):
- Flutter
@ -137,7 +138,7 @@ DEPENDENCIES:
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`)
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
SPEC REPOS:
@ -221,7 +222,7 @@ EXTERNAL SOURCES:
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
video_player_avfoundation:
:path: ".symlinks/plugins/video_player_avfoundation/ios"
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
@ -272,9 +273,9 @@ SPEC CHECKSUMS:
SwiftProtobuf: 407a385e97fd206c4fbe880cc84123989167e0d1
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126
video_player_avfoundation: 02011213dab73ae3687df27ce441fbbcc82b5579
webview_flutter_wkwebview: 4f3e50f7273d31e5500066ed267e3ae4309c5ae4
PODFILE CHECKSUM: 42aa7ffc6134b996f93caa6a9b6a2b5b580ff28a
PODFILE CHECKSUM: 2d54cef87a0ac87750282877d7a79b735ed5c517
COCOAPODS: 1.14.3

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug-dev"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug-dev"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release-dev"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug-dev">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release-dev"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug-pre"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug-pre"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release-pre"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug-pre">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release-pre"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug-sky"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug-sky"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release-sky"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug-sky">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release-sky"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug-xhj"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug-xhj"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release-xhj"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug-xhj">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release-xhj"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -8,43 +8,12 @@
#import <MediaPlayer/MediaPlayer.h>
#import <AudioToolbox/AudioToolbox.h>
#import "sysInfo.h"
#import "UdpHelper.h"
#import "talk_Class.h"
#import "Call.h"
#import "P2pTest.h"
#import "Opendoor.h"
#import "HKHTextField.h"
#import <CloudPushSDK/CloudPushSDK.h>
#define SoundOK 0
#define SoundNotice 1
#define SoundError 2
#define SoundAlarm 3
#define SoundRing 4
@interface AppDelegate : FlutterAppDelegate <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) Opendoor *main;
@property (strong, nonatomic) Call *callOut;
@property (strong, nonatomic) P2pTest *p2ptest;
@property (strong, nonatomic) AVAudioPlayer *audioPlayer;
@property (nonatomic) BOOL isBack;
@property (nonatomic) BOOL TalkSendAudio;
@property sqlite3 *db;
@property (strong, nonatomic) sysInfo *sysinfo;
@property (strong, nonatomic) UdpHelper *udp;
@property (strong, nonatomic) talk_Class *talk;
@property (strong, nonatomic) HKHTextField *activeTextField;
- (void)playSoundWith:(NSInteger)mode;
- (void)OpenDoorSucc:(NSString *)equid;
- (void)OpenDoorFail:(NSString *)equid;
- (void)ring;
- (void)ring_stop;
@end

View File

@ -4,12 +4,7 @@
#import "CommonDefine.h"
#import "XSFlutterManager.h"
#import "Sformat.h"
#import "Pub.h"
#import "Msg.h"
#import "VideoTalkManager.h"
#import <UserNotifications/UserNotifications.h>
#import "BaseViewController.h"
@interface AppDelegate()
@ -17,15 +12,8 @@
@end
@implementation AppDelegate {
SystemSoundID okSound;
SystemSoundID noticeSound;
SystemSoundID errorSound;
SystemSoundID alarmSound;
SystemSoundID ringSound;
}
@synthesize sysinfo;
@synthesize db;
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
@ -36,15 +24,6 @@
self.window.rootViewController = VC;
[self.window makeKeyAndVisible];
//
//[self initSound];
//_udp = [[UdpHelper alloc] init];
//[_udp Open];
//_talk = [[talk_Class alloc] init];
//sysinfo.launchtime = [Sformat timestamp];
return YES;
}
@ -148,145 +127,6 @@
[CloudPushSDK sendNotificationAck:userInfo];
}
- (void)initSound
{
CFURLRef okURL = (CFURLRef)CFBridgingRetain([NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"ok" ofType:@"wav"]]);
CFURLRef noticeURL = (CFURLRef)CFBridgingRetain([NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"notice" ofType:@"wav"]]);
CFURLRef errURL = (CFURLRef)CFBridgingRetain([NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"err" ofType:@"wav"]]);
CFURLRef alarmURL = (CFURLRef)CFBridgingRetain([NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"alarm" ofType:@"wav"]]);
CFURLRef ringURL = (CFURLRef)CFBridgingRetain([NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"notice" ofType:@"wav"]]);
AudioServicesCreateSystemSoundID(okURL, &okSound);
AudioServicesCreateSystemSoundID(noticeURL, &noticeSound);
AudioServicesCreateSystemSoundID(errURL, &errorSound);
AudioServicesCreateSystemSoundID(alarmURL, &alarmSound);
AudioServicesCreateSystemSoundID(ringURL, &ringSound);
AudioServicesPropertyID flag = 0; //0 means always play
AudioServicesSetProperty(kAudioServicesPropertyIsUISound, sizeof(SystemSoundID), &okSound, sizeof(AudioServicesPropertyID), &flag);
AudioServicesSetProperty(kAudioServicesPropertyIsUISound, sizeof(SystemSoundID), &noticeSound, sizeof(AudioServicesPropertyID), &flag);
AudioServicesSetProperty(kAudioServicesPropertyIsUISound, sizeof(SystemSoundID), &errorSound, sizeof(AudioServicesPropertyID), &flag);
AudioServicesSetProperty(kAudioServicesPropertyIsUISound, sizeof(SystemSoundID), &alarmSound, sizeof(AudioServicesPropertyID), &flag);
AudioServicesSetProperty(kAudioServicesPropertyIsUISound, sizeof(SystemSoundID), &ringSound, sizeof(AudioServicesPropertyID), &flag);
CFBridgingRelease(okURL);
CFBridgingRelease(noticeURL);
CFBridgingRelease(errURL);
CFBridgingRelease(alarmURL);
CFBridgingRelease(ringURL);
}
- (void)playSoundWith:(NSInteger)mode
{
dispatch_async(dispatch_get_main_queue(), ^{//线
if ([MPMusicPlayerController systemMusicPlayer].playbackState == MPMusicPlaybackStatePlaying) {
NSLog(@"play ServicesPlayAlertSound ...");
switch (mode) {
case SoundOK:
AudioServicesPlayAlertSound(self->okSound);
break;
case SoundNotice:
AudioServicesPlayAlertSound(self->noticeSound);
break;
case SoundError:
AudioServicesPlayAlertSound(self->errorSound);
break;
case SoundAlarm:
AudioServicesPlayAlertSound(self->alarmSound);
break;
case SoundRing:
AudioServicesPlayAlertSound(self->ringSound);
break;
default:
break;
}
}
else
{
NSLog(@"play ServicesPlaySystemSound ...");
switch (mode) {
case SoundOK:
AudioServicesPlaySystemSound(self->okSound);
break;
case SoundNotice:
AudioServicesPlaySystemSound(self->noticeSound);
break;
case SoundError:
AudioServicesPlaySystemSound(self->errorSound);
break;
case SoundAlarm:
AudioServicesPlayAlertSound(self->alarmSound);
break;
case SoundRing:
AudioServicesPlayAlertSound(self->ringSound);
break;
default:
break;
}
}
});
}
- (void)ring
{
if (!self.isBack)[self playaudio];
//if (!self.isBack)[self playSoundWith:SoundRing];
}
- (void)ring_stop
{
if(self.audioPlayer != nil) {
[self.audioPlayer stop];
self.audioPlayer = nil;
}
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setActive:YES error:nil];
[session setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
}
- (void)playaudio
{
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setActive:YES error:nil];
[session setCategory:AVAudioSessionCategoryPlayback error:nil];
//
NSString *musicPath = [[NSBundle mainBundle] pathForResource:@"ring1" ofType:@"mp3"];
NSURL *url = [[NSURL alloc] initFileURLWithPath:musicPath];
//
self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil];
//[url release];
[self.audioPlayer prepareToPlay];
[self.audioPlayer setVolume:.5];
self.audioPlayer.numberOfLoops = -1; // -1
[self.audioPlayer play]; //
NSLog(@"playaudio");
}
- (void)OpenDoorSucc:(NSString *)equid{
if(self.callOut){
[self.callOut alert:@"开门成功"];
}
[self playSoundWith:SoundOK];
[self.sysinfo SaveRecord:[Sformat timestamp] Type:@"开门" Equ:equid Img:@"" Note:@"成功"];
}
- (void)OpenDoorFail:(NSString *)equid{
if(self.callOut){
[self.callOut alert:@"开门失败"];
NSLog(@"通话中开门失败");
}
[self playSoundWith:SoundError];
[self.sysinfo SaveRecord:[Sformat timestamp] Type:@"开门" Equ:equid Img:@"" Note:@"失败"];
}
@end

View File

@ -0,0 +1,122 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

View File

@ -0,0 +1,5 @@
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

View File

@ -0,0 +1,122 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

View File

@ -0,0 +1,5 @@
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

View File

@ -0,0 +1,122 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

View File

@ -0,0 +1,5 @@
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

View File

@ -0,0 +1,122 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Some files were not shown because too many files have changed in this diff Show More