相关疑难解决方法(0)

如何将照片添加到OSX的iPhone模拟器?

我在Mac上有照片,我想添加到iPhone模拟器来测试我的应用程序.

换句话说:如何将照片添加到iPhone模拟器?

编辑:iPhone模拟器4.0怎么样?iphone Simulator 3.0和4.0都有不同的工作方式.

在此先感谢帮助我......

iphone

45
推荐指数
4
解决办法
4万
查看次数

如何将图像添加到iOS模拟器

我有xcode 4.5.1,想要将照片添加到iphone 6.0模拟器,但无法找到它.我有一个名为iphone模拟器的文件夹,但它只包含4.3.1.可能是因为几个月前我将应用程序支持中的几乎所有内容拖到我的外部硬盘上以节省一些内存.现在,当我将其拖回时,它包含我之前使用过的4.3.1.我是否必须下载新内容或我应该怎么做?提前致谢!

iphone xcode ipad ios ios-simulator

38
推荐指数
6
解决办法
2万
查看次数

如何将图像添加到iPhone模拟器?

我已经习惯UIImagePickerControllerUIImagePickerControllerSourceTypePhotoLibrary,但它说"没有照片".

模拟器从哪里获取图像?我应该在哪里复制图像,以便它们显示在模拟器中?

ios-simulator

9
推荐指数
2
解决办法
3701
查看次数

如何将照片和视频加载到Iphone Simulator 4.0

有没有办法将照片和视频加载到iPhone模拟器4.0.

最诚挚的问候,穆罕默德萨迪克.

iphone

6
推荐指数
2
解决办法
2691
查看次数

将图像添加到iPhone模拟器相册 - 接受的"技巧"不起作用

我已经尝试过我读过的每一个技巧,包括Stack Overflow上的答案都无济于事.

  1. 将照片添加到Application Support中的正确目录
  2. 从safari中保存图像 - 包括本地和网络

对于#1,这就是我所拥有的

~/Library/Application Support/iPhone Simulator/User/Media/DCIM/100APPLE/IMG_0000.JPG
~/Library/Application Support/iPhone Simulator/User/Media/DCIM/100APPLE/.MISC/IMG_0000.THM
Run Code Online (Sandbox Code Playgroud)

它们都是实际的jpeg文件.实际上,它们都是完全相同文件的副本.

  • Max OSX 10.7.1
  • iOS模拟器4.3(238.2)
  • Xcode 4.1 build 4B110

有任何想法吗?

iphone xcode ios ios-simulator

5
推荐指数
1
解决办法
2534
查看次数

UIImagePickerController在iOS设备上工作但在iOS模拟器上没有?

我一直在物理iOS设备上运行我的应用程序一段时间没有任何问题.但是现在UIImagePickerController视图不会出现在模拟器上.我已经使用此处的方法将照片保存到模拟器中,并确认它们确实存在于图像库中的模拟器上.Xcode中没有弹出错误.我尝试过使用不同的源类型,但无济于事.知道我可能做错了什么吗?非常感谢!

    UIImagePickerControllerSourceType sourceType;
    if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
            {
                sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
            }
            else
            {
                sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
            }
            //Display photo library.
            [self startImagePickerControllerFromViewController: self
                                            usingDelegate: self
                                           withSourceType: sourceType];

...

- (BOOL)startImagePickerControllerFromViewController:(UIViewController*) controller
                                  usingDelegate:(id <UIImagePickerControllerDelegate,
                                                     UINavigationControllerDelegate>) delegate
                                 withSourceType:(UIImagePickerControllerSourceType) sourceType
{
    //Insure camera, controller, and delegate exist.
    if (([UIImagePickerController isSourceTypeAvailable:
          UIImagePickerControllerSourceTypeCamera] == NO)
        || (delegate == nil)
        || (controller == nil))
        return NO;

    //Create the ImagePicker.
    UIImagePickerController *imagePickerUI = [[UIImagePickerController alloc] init];
    imagePickerUI.sourceType = sourceType;
    //Only allow still images.
    imagePickerUI.mediaTypes = …
Run Code Online (Sandbox Code Playgroud)

objective-c uiimagepickercontroller ios ios-simulator

4
推荐指数
1
解决办法
900
查看次数

2
推荐指数
1
解决办法
1302
查看次数

将图像添加到 iPhone 模拟器会导致错误(PHPhotosErrorDomain 错误 -1。)

我正在尝试将图像拖放到我的 iPhone 模拟器中。我发现可以在 SO Adding images or video to iPhone Simulator上这样做。但是,当我尝试拖放简单的 png 或 jpeg 图像时,出现错误

\n\n
operation couldn\xe2\x80\x99t be completed. (PHPhotosErrorDomain error -1.)\n
Run Code Online (Sandbox Code Playgroud)\n\n

我知道答案中的解决方案已经有 9 年历史了,而且我还没有找到任何最新的解决方案,那么有什么变化吗?

\n\n

我的iOS模拟器版本是

\n\n

版本 11.5 (921.9.1)\nSimulatorKit 581.9.1\nCoreSimulator 704.12.2

\n

ios ios-simulator

2
推荐指数
1
解决办法
1548
查看次数