IPhone
Flutter 的IOS build
Submitted by hubdog on Sat, 2023-11-18 06:13好久没有发布Flutter的IOS程序,都忘了怎么搞了
1.打开ios目录下的Runner工程,修改为有效的签名
1.在工程目录下执行flutter build ios, 执行这步就不需要手工执行pod install了,否则编译会报告各种native的module找不到的错误。
IOS上监听用户抓屏的事件
Submitted by hubdog on Sat, 2020-12-26 22:16
unit CMain; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, Macapi.ObjectiveC, iOSapi.Foundation, System.TypInfo,iOSapi.UIKit, FMX.Controls.Presentation, FMX.StdCtrls; type TShotListener=class; TFormMain = class(TForm) lblMsg: TLabel; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private { Private declarations } FListener:TShotListener; public { Public declarations } end;
如何在IOS中用XCode调试Flutter的Plugin
Submitted by hubdog on Thu, 2020-05-14 16:11打开plugin的Runner工程,注意这个时候你在工程中找不到plugin的Objective-C的代码,没法加断点,这时用sublime文本编辑器或者Android Studio打开*.m文件,随便添加一个编译错误的代码,用xcode点运行,它会报错并定位到错误的代码,这时你就可以添加断点了,修改掉错误的代码,点运行,就可以断在指定的位置上了
也可以用下面呢的自定义Sybolic Breakpoing的方法,但是非常不好用
https://stackoverflow.com/questions/52770209/how-to-debug-ios-native-code-in-a-flutter-plugin
吐槽Webrtc的IOS编译支持
Submitted by hubdog on Sat, 2019-04-20 13:56XCode都已经10.2了,webrtc的ios编译甚至不能支持到xcode9,默认需要用xcode8编译,无F可说
参见类似的错误:
http://myblog.emhct.net.cn/index.php/archives/1940
无奈只好强行修改ios sdk的header file. 把uuid的api的_Nonnull属性删除才能编译通过.我之前还误以为是我的xcode版本太低导致的,将Xcode从9.2升级到10.2,结果同样的错误.而且类似的错误完全google不到,让我怀疑都没有人自己去编译webrtc ios库.
2019/4/23 追记
好像是我的webrtc的master branch没有更新到最新的toolchain,虽然head 已经sync了,应该不是google的问题
IOS下webrtc输出日志
Submitted by hubdog on Thu, 2016-05-12 22:30// console output
RTCSetMinDebugLogLevel(kRTCLoggingSeverityInfo);
// file output
self.fileLogger = [[RTCFileLogger alloc] initWithDirPath:logsDirectory maxFileSize:(100 * 1024)];
self.fileLogger.severity = kRTCFileLoggerSeverityInfo;
[self.fileLogger start];
IPhone密探007
Submitted by hubdog on Tue, 2015-11-24 00:04做了一个iPhone备份信息提取器,可以从iPhone备份信息中提取联系人,照片,视频等信息,并可以查看微信聊天记录,播放声音,视频。
地址:http://www.sqlitedeveloper.com/zh-hans-iphone-backup-explorer-10
IOS及Android文件类型关联的Delphi示例
Submitted by hubdog on Sun, 2015-09-27 13:37Android要匹配任意扩展名,注意要改成
<intent-filter> <action android:name="android.intent.action.VIEW"></action> <category android:name="android.intent.category.DEFAULT"></category> <data android:mimeType="*/*"></data> </intent-filter> 如果你想关联发送共享之类的,可以加上 <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="*/*" /> </intent-filter>
ios下关联任意文件,要改成
<key>CFBundleDocumentTypes</key>
IOS7 background download task
Submitted by hubdog on Thu, 2014-02-27 22:57IOS下一个异步加载图像的类
Submitted by hubdog on Sun, 2014-02-16 21:52IPhone上手机性能不佳,批量加载网络图像时很慢,所以写了一个异步加载图像的类.
有待进一步实现的功能是图像的硬盘cache.
unit FMX.AsyncImage.IOS;
interface
uses FMX.Types,FMX.Graphics,System.Types, System.Generics.Collections, iOSapi.Foundation, Macapi.ObjectiveC, iOSapi.UIKit;
type
NSURLConnectionDelegate = interface(IObjectiveC)
['{682BABAC-89E0-4A9B-BFF5-96A7EE7881A6}']
end;
NSURLConnectionDataDelegate = interface(NSURLConnectionDelegate)
['{6F015871-FCF4-4F8D-B9E5-C6484D6F60E7}']
procedure connection(connection: NSURLConnection; didReceiveData: NSData); cdecl;
Blocks中有界面删除操作的时候
Submitted by hubdog on Sun, 2014-02-09 01:41在blocks里面做了一个删除的动作,结果内存coredump了.
http://stackoverflow.com/questions/7838442/using-block-callbacks-to-the-...
解决办法就是用一个弱引用,而不是retain self.
__weak id weakSelf = self;
[operation setCompletionBlockWithSuccess:^(KxSMBOperation *operation) {
//[self performSelectorOnMainThread: @selector(finishTask) withObject: nil waitUntilDone: NO];
if (weakSelf)
[weakSelf finishTask];
} failure:^(KxSMBOperation *operation, NSError *error) {
if (!operation.isCancelled)
{
if (weakSelf)