在考虑iPhone/iPad应用程序安全性时,我注意到:
==>数据盗窃威胁
并且:
==>收入损失威胁
所以我想知道#1 在iOS应用程序中获得更好安全性的最佳实践是什么? 另外,#2 什么是减少收入损失和减少黑客暴露的最佳方法?
对于#1我见过一些关于安全性1 2 3 4 + apple docs的 WWDC幻灯片
我可以说,在这些最佳实践之间存在:
对于#2我认为使用基于免费应用程序的商业模式,然后使用商店收据验证的应用程序购买可以是最小收入损失的模型.
您的安全最佳实践是什么,以及最大限度地减少应用程序黑客攻击机会的最佳方法?
使用时间机器从一个mac迁移到另一个mac后,我收到以下错误.
无法附加到pid
确保"项目标题"尚未运行,"系统用户名"有权调试它.
仅在运行(任何)Framework项目的单元测试时才会发生此错误.在模拟器和设备上运行应用程序工作正常.
对应用程序运行单元测试有效,但由于此错误,无法启动为任何框架运行它.即使使用Alamofire或PromiseKit单元测试,我也会收到此错误.
我在Stackoverflow上测试了类似问题上建议的解决方案(我删除了派生数据,清理了所有内容,重新安装了Xcode,重新启动了mac ..)直到现在还没有解决问题.
我正在使用Xcode 9.3并使用Xcode 9.4-beta进行测试.
我在Mac OS High Sierra上运行 - 10.13.4(17E199)
欢迎任何帮助/建议!
我正在调试一个使用多线程核心数据的应用程序,我在objc_exception_throw上有一个断点,它在保存调用中遇到了这个断点.(代码中的第2行)
NSError *error = nil;
[self.managedObjectContext save:&error];
if (error) {
NSLog(@"Error : %@",error);
}
Run Code Online (Sandbox Code Playgroud)
我没有任何记录的东西.我正在使用Xcode 4和ios 4.0 - > 4.3.我认为这与Xcode/iOS版本无关.
我在 Android 应用程序上调用函数getExternalCacheDir(),这导致某些拥有以下设备(HUAWEI P30 lite、Galaxy A40、Xperia XZ3)的 Android 10 用户出现 ANR。
我的 ANR 的堆栈跟踪如下
The "main" (tid=1) thread is performing disk I/O.
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 flags=1 obj=0x72dfcb58 self=0x73e23a5000
| sysTid=12158 nice=0 cgrp=default sched=0/0 handle=0x73e3913ee8
| state=D schedstat=( 378582885 304333911 539 ) utm=23 stm=14 core=7 HZ=100
| stack=0x7fc28de000-0x7fc28e0000 stackSize=8192KB
| held mutexes=
at libcore.io.Linux.access (Native method)
at libcore.io.ForwardingOs.access (ForwardingOs.java:73)
at libcore.io.BlockGuardOs.access (BlockGuardOs.java:71)
at libcore.io.ForwardingOs.access (ForwardingOs.java:73)
at android.app.ActivityThread$AndroidOs.access (ActivityThread.java:7816)
at java.io.UnixFileSystem.checkAccess (UnixFileSystem.java:281)
at java.io.File.exists (File.java:815) …Run Code Online (Sandbox Code Playgroud) 我们在代码中使用函数 CLLocationManager protectedRegions
public func getMonitoredRegions() -> Set<CLRegion> {
return locationManager.monitoredRegions
}
Run Code Online (Sandbox Code Playgroud)
我们以这种方式使用这个函数
for region in locationManager.getMonitoredRegions() where condition(region) {
...
}
Run Code Online (Sandbox Code Playgroud)
我们注意到,当使用以下 Crashlytics 日志调用 CLLocationManager protectedRegions 时,我们的应用程序崩溃了:
#12. Crashed: our.queue.name.here
EXC_BAD_ACCESS KERN_PROTECTION_FAILURE 0x000000016aecffe0
0 libsystem_malloc.dylib 0x191d9bfb4 nanov2_malloc$VARIANT$armv81 + 138
1 libsystem_malloc.dylib 0x191d9c540 nanov2_calloc$VARIANT$armv81 + 136
2 libsystem_malloc.dylib 0x191da9b74 malloc_zone_calloc + 140
3 libsystem_malloc.dylib 0x191daa3fc calloc + 40
4 libobjc.A.dylib 0x1913ac554 class_createInstance + 72
5 libdispatch.dylib 0x191c05ad8 _os_object_alloc_realized + 40
6 libdispatch.dylib 0x191bd9594 <redacted> + 108
7 libdispatch.dylib 0x191bd78ac <redacted> …Run Code Online (Sandbox Code Playgroud) 我想在我的项目中有一个常量来改变Lite和Pro版本.我不认为这是最好的方式,但我想:
在我的app委托中添加一个常量
#define BUILD_PRO 1 //0 => LITE, 1 => PRO
Run Code Online (Sandbox Code Playgroud)当我需要它时,我导入appDelegate并测试它:
#import "myAppDelegate.h"
Run Code Online (Sandbox Code Playgroud)
然后
#if (BUILD_PRO==1)
NSLog(@"this is pro version");
#endif
Run Code Online (Sandbox Code Playgroud)问题是此代码在某些文件中有效,在其他文件中无效.我没有找到任何解释这种行为; 有人有解释吗?
从同一个项目中获得两个版本(pro和lite)的正确方法是什么?
我有问题使用阿拉伯语字体的iOS.所有字体都具有相同的渲染,我正在尝试测试此处描述的变通方法: iOS中的自定义阿拉伯字体
问题是我不知道如何使用它,我添加了ArabicShaping h和cpp文件代码编译但我不知道接下来该做什么.
提前致谢
我尝试在 iOS 应用程序上播放某些 mp3 文件时遇到问题。\n首先,我注意到这些文件在 iOS 版 Safari 上也不起作用,但现在我的文件可以在 iOS 版 Safari 上运行,但在我的应用程序上不起作用。
\n\n我正在使用此代码来播放 mp3 音频文件:
\n\nNSString *pronociationPath = \xe2\x80\xa6..\n\nif (pronociationPath != nil) \n{ \n NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:pronociationPath];\n NSError *error;\n\n self.player=[[[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:&error] autorelease];\n [fileURL release];\n [self.player setNumberOfLoops:0];\n if (self.player == nil) {\n NSLog(@"%@",error);\n }\n else\n {\n [self.player prepareToPlay];\n [self.player play];\n }\n}\nRun Code Online (Sandbox Code Playgroud)\n\n我在 Safari iOS 上运行的文件遇到此错误:
\n\n\n\n\n错误域=NSOSStatusErrorDomain代码=1685348671“操作\n无法完成\xe2\x80\x99。(OSStatus错误1685348671。)”
\n
我的代码有问题吗?\n有没有为 iOS 应用程序创建安全 mp3 文件的指南?\n我看过 Apple 文档,但没有看到任何有用的信息https://developer.apple.com/library/archive/documentation/AudioVideo /Conceptual/MultimediaPG/UsingAudio/UsingAudio.html#//apple_ref/doc/uid/TP40009767-CH2-SW28
\n我正在使用 Apache Cordova 6.5,添加 iOS 平台并尝试在由cordova iOS 项目创建的工作区中使用 cocoapods。
当我运行命令时
吊舱安装
Xcode 项目无法编译,并且出现以下错误
diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Run Code Online (Sandbox Code Playgroud)
以下是我为解决此问题所做的步骤:
科尔多瓦创建应用程序1
光盘应用1/
科尔多瓦平台添加ios
cd 平台/ios
豆荚初始化
吊舱安装
我尝试使用基本 podfile 和添加工作区名称的 podfile
# Uncomment the next line to define a global platform for your project
# …Run Code Online (Sandbox Code Playgroud) ios ×6
iphone ×5
xcode ×4
objective-c ×3
ipad ×2
android ×1
arabic ×1
cllocation ×1
cocoapods ×1
constants ×1
cordova ×1
core-data ×1
disk-io ×1
fonts ×1
frameworks ×1
java ×1
security ×1
swift ×1
unit-testing ×1