我试图像Firebug一样监视从应用程序到我的服务器的调用.我找不到在iOS模拟器或xCode中查看的方法.
有没有办法在不嗅探所有流量的情况下做到这一点?如果不是,您会建议使用什么工具?
每当我跑步时react-native run-ios,我都会
Could not find iPhone X simulator
Error: Could not find iPhone X simulator
at resolve (calendarPractice/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13)
at new Promise (<anonymous>)
at runOnSimulator (calendarPractice/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
at Object.runIOS [as func] (calendarPractice/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
at Promise.resolve.then (calendarPractice/node_modules/react-native/local-cli/cliEntry.js:117:22)
Run Code Online (Sandbox Code Playgroud)
但是,当我在Xcode上运行时,它工作正常
{
"devicetypes" : [
{
"name" : "iPhone 4s",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 4s.simdevicetype",
"identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-4s"
},
{
"name" : "iPhone 5",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 5.simdevicetype",
"identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-5"
},
{
"name" : "iPhone 5s",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 5s.simdevicetype",
"identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-5s"
},
{ …Run Code Online (Sandbox Code Playgroud) 使用Xcode 5 GM,只要我切换到5.1,6.0或6.1模拟器进行测试,我就会收到错误"iOS模拟器无法安装应用程序".当我重置模拟器它工作,但这变得非常累人.
有人有永久修复或解决方法吗?
我试图在iPhone 6S或iPhone 6S Plus模拟器上使用Xcode 7 GM模拟力触摸.特别是,我试图模拟实施应用程序快捷方式的测试应用程序图标上的力触摸.
让我知道如果有一个模拟这个的解决方案,我尝试了Watch模拟器用来模拟力触摸的长按,因为iPhone将其捕获为长按手势,所以无效.
更新:我从Apple下载了ViewControllerPreview示例代码.运行他们的示例应用程序我发现模拟器虽然是iPhone 6s,但不支持3D /强制触摸功能.如果我要使用带有强制触摸功能的触控板的macbook,我仍然不确定它是否支持该功能.
编辑:使用具有强制触控触控板的macbook的人是否可以尝试使用触控板上的力触摸来模拟iPhone 6s或6s Plus模拟器上的3D触控?我的理论是,您可以使用新MacBook上的强制触控触控板来模拟新iPhone模拟器上的3D触控.如果您尝试,请添加注释,注明结果,我可以更新帖子.
EDIT2:似乎Force Touch触控板对新型号Macbook专业版没有帮助.
我想从命令行启动iPhone模拟器.
直到现在我一直在使用下面的命令
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator -SimulateDevice
-SimulateDevice用于启动特定的设备类型
现在使用Xcode 6,路径和应用程序已更改为
/Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app/Contents/MacOS/iOS Simulator
但遗憾的是-SimulateDevice选项现在不能正常工作.我可以启动模拟器,但没有选项来指定要启动哪一个
有人用Xcode 6找到了替代品吗?
这可能听起来真的NOOB!我想检查是否是用户第二次进入我的应用程序,以便保持我正在使用的运行计数NSUserDefaults.我在我rootViewController的viewDidLoad方法中实现了以下代码:
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSLog(@"hello %ld", (long)[userDefaults integerForKey:@"runCount"]);
if ([userDefaults integerForKey:@"runCount"] != 1) {
//not the 2nd run
[userDefaults setInteger:1 forKey:@"runCount"];
NSLog(@"not 2nd run");
} else {
//second run or more
NSLog(@"2nd run");
}
[userDefaults synchronize];
Run Code Online (Sandbox Code Playgroud)
一切正常,但问题是当我卸载(删除并重新安装)应用程序时,根据此处和此处的数据应该被清除,但它不是,并且在重新安装应用程序之前,以前的数据仍然显示.我在iOS模拟器上使用xCode6-beta运行我的应用程序,并在iOS 8上定位应用程序
是否有iPhone Simulator生成的崩溃日志?
模拟器崩溃很多,但没有在控制台中留下任何痕迹...崩溃日志将是有用的.
在我的iPhone应用程序中,我需要将许多ASCII艺术插入到数据库中.
我正在使用模拟器并在textview中粘贴textpic以将ASCII艺术插入数据库.
在这里,模拟器的剪贴板曾经适当地粘贴艺术,但是当我复制另一种艺术时,它也会将之前的艺术粘贴到textview中.
如何解决这个问题呢?有没有解决这个或更好的方法?
所以我仍然是iOS开发的新手,我发现自己经常需要删除DerivedData或iPhone模拟器目录的内容,以便从我的代码中实际执行.在Xcode中清理与清空这些目录不一样,对吧?如果没有,是否有更简单的方法来做到这一点,而不是拖着Finder到达他们并清除它们?
ios-simulator ×10
ios ×5
xcode ×4
iphone ×2
xcode6 ×2
ios7 ×1
ios8 ×1
macos ×1
networking ×1
react-native ×1
xcode5 ×1
xcode7 ×1