小编Sol*_*oft的帖子

从iOS中的Twitter帐户获取关注者和关注者

大家..

如何从iOS用户登录的Twitter帐户中获取所有关注者和关注者?那有什么api吗?

请帮我..

iphone twitter ios

8
推荐指数
1
解决办法
4770
查看次数

蓝牙LE设备从iOS后台扫描

我正在以背景模式扫描BLE.

问题在后台扫描中不起作用.它在前景模式下工作得非常好.

下面是几个代码行.

dispatch_queue_t centralQueue = dispatch_queue_create("com.XXXXX.BLEback", DISPATCH_QUEUE_SERIAL);// or however you want to create your dispatch_queue_t
manager = [[CBCentralManager alloc] initWithDelegate:self queue:centralQueue options:nil];
Run Code Online (Sandbox Code Playgroud)
- (void)centralManagerDidUpdateState:(CBCentralManager *)central 
{
    if (central.state == CBCentralManagerStatePoweredOn) {

        [self startScan];
    }

    if (![self supportLEHardware]) 
    {
        @throw ([NSError errorWithDomain:@"Bluetooth LE not supported"
                                    code:999
                                userInfo:nil]);
    }
}
Run Code Online (Sandbox Code Playgroud)
- (void)startScan
{
    NSDictionary * options = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:false] forKey:CBCentralManagerScanOptionAllowDuplicatesKey];
    [manager scanForPeripheralsWithServices:nil options:options];
}
Run Code Online (Sandbox Code Playgroud)

在这里,我作为服务传递零.

我在Xcode中收到登录设备部分.但不是在申请中.

Notice>: (Error) Discovered unknown type for scan: {
        kCBAdvDataChannel = 37;
        kCBAdvDataIsConnectable = 1; …
Run Code Online (Sandbox Code Playgroud)

iphone ios core-bluetooth bluetooth-lowenergy cbcentralmanager

8
推荐指数
1
解决办法
7529
查看次数

如何更改静态库的代码.a文件Xcode项目的另一个Xcode项目?

场景如,

我有两个有git repo的xcode项目.

第二个Xcode项目没有在Device中运行应用程序的目标,但它有libProject.a目标和许多代码行.

第一个Xcode项目的目标是在Device中运行app,它通过CocoaPod机制使用上面的.a库.

现在我想在Second Xcode项目中更新一些内容并想要检查设备,而不是将更新提取到First xcode项目.这两个项目都属于git repo.

我曾尝试过推进第二个项目并更新第一个项目的pod,但我无法得到它.

编辑* 第一个Xcode项目也有工作区..

************新编辑************现在发生了什么事.我在静态库中有更新代码行,只能用于单元测试.我做到了.现在我已将此代码行提交到新分支并使其成为默认值.但是当我要从终端更新静态库的pod时,我看不到First Code工作区项目的变化.

在此输入图像描述

请告知如何做到这一点.

iphone xcode github ios cocoapods

8
推荐指数
1
解决办法
765
查看次数

错误构建:无法直接与 dylib/framework XCTAutomationSupport for Architecture arm64 链接

我正在使用 Xcode Beta 14,尝试构建 WebDriverAgent

低于错误

WebDriverAgent/构建/产品/调试-iphoneos/WebDriverAgentLib.framework/WebDriverAgentLib

ld:无法直接与 dylib/framework 链接,您的二进制文件不是 /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/XCTAutomationSupport.framework/XCTAutomationSupport 架构允许的客户端arm64 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

注意:使用协同签名身份覆盖:iPhone 开发人员说明:按依赖顺序构建目标 ** 测试构建失败 **

Beta 版的任何问题或设置它所需的任何进一步偏好。

在此输入图像描述

ios appium-ios xcode14

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

如何运行在UIWebView上运行的HTML + javascript文件..?

每个人,

我有一个HTML页面,其中包含一个Javascript函数,显示一个动物动画..我已将其本地添加到xcode项目中.

现在当我在UIWebView中加载这个文件时,它看起来很完美.这是将HTMl文件加载到UIWebView的代码

NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"elephant-animation" ofType:@"html"] isDirectory:NO];
        NSURLRequest *req = [NSURLRequest requestWithURL:url];
        [self performSelectorOnMainThread:@selector(startWebLoad3:) withObject:req waitUntilDone:YES];

-(void)startWebLoad3:(NSURLRequest *)request
{
    [wbView3 loadRequest:request];
    [wbView3 setBackgroundColor:[UIColor clearColor]];
    wbView3.scrollView.scrollEnabled = NO;
    [wbView3.scrollView setBackgroundColor:[UIColor clearColor]];
    [wbView3 setOpaque:NO];
}
Run Code Online (Sandbox Code Playgroud)

但我有6页.当开始用单独的UIWebView加载每个页面时,它转到内存警告..并给我这样的错误.

void SendDelegateMessage(NSInvocation*): delegate (webView:didFinishLoadForFrame:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode
Run Code Online (Sandbox Code Playgroud)

如果我只运行一个页面而不是它完美运行,但是当我开始一起加载或逐个加载时,它会因内存警告而崩溃.

如果有人得到任何解决方案,请告诉我..

我一直坚持这个问题..

谢谢,

html javascript iphone uiwebview ios

7
推荐指数
1
解决办法
2465
查看次数

Google+是否有公开API?

可能重复:
是否已有Google+ API?

Google+是否有我可以在iOS应用程序中使用的公共API?

gdata-api google-api google-plus

6
推荐指数
1
解决办法
622
查看次数

UIView中的Animaton就像警报(POP UP)

我需要一些关于动画的信息帮助.想要在iPhone应用程序中添加动画..第一件事是创建动画UIView像警报..我搜索其他地方,但没有找到确切的方式.

请帮我解决这个问题..你有任何博客教程或doc文件告诉我..

iphone animation objective-c

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

自定义AlertView与背景

大家好,我需要在UIAlertView上设置一个图像..

在此输入图像描述

我附上了我的UIAlertview图像问题..

我用过这个代码行..

UIAlertView *theAlert = [[[UIAlertView alloc] initWithTitle:@"Atention"
   message: @"YOUR MESSAGE HERE", nil)
   delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];

   [theAlert show];

   UILabel *theTitle = [theAlert valueForKey:@"_titleLabel"];
   [theTitle setTextColor:[UIColor redColor]];

   UILabel *theBody = [theAlert valueForKey:@"_bodyTextLabel"];
   [theBody setTextColor:[UIColor blueColor]];

   UIImage *theImage = [UIImage imageNamed:@"Background.png"];    
   theImage = [theImage stretchableImageWithLeftCapWidth:16 topCapHeight:16];
   CGSize theSize = [theAlert frame].size;

   UIGraphicsBeginImageContext(theSize);    
   [theImage drawInRect:CGRectMake(0, 0, theSize.width, theSize.height)];    
   theImage = UIGraphicsGetImageFromCurrentImageContext();    
   UIGraphicsEndImageContext();

   [[theAlert layer] setContents:[theImage CGImage]];
Run Code Online (Sandbox Code Playgroud)

请解决这个问题..我只需要提醒图像..

cocoa-touch objective-c uikit uialertview ios

3
推荐指数
1
解决办法
6640
查看次数

游戏中心朋友列表

所有

我为Apple iOS制作了一款游戏.现在我想在Apple的游戏中心展示我的好友列表.

如何在iPhone上显示登录播放器的Game Center好友列表,可能使用UIViewController(管理ViewControllers)?

任何帮助,将不胜感激..

谢谢...

iphone objective-c game-center

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

目标c中的多维数组

大家..

我想在目标c中创建一个8*8维数组.

(
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
)
Run Code Online (Sandbox Code Playgroud)

喜欢那样..而且还可以作为其中一个可以移动的对象..喜欢想要移动

MOVE_ARRAY = array([0, 0], [0, 2])
Run Code Online (Sandbox Code Playgroud)

并检查阵列的任何位置,如5*6或4*3任何..所以,任何人可以帮助我如何初始化,以及如何在代码中使用?谢谢.

iphone objective-c multidimensional-array ios

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

从 vs 代码中制作 APK

我面临着从 vs 代码中制作 APK 的问题。

我用来制作 APK 的命令。

flutter build apk --split-per-abi
Run Code Online (Sandbox Code Playgroud)

我尝试了大多数解决方案,例如检查 AndroidX 兼容性、Flutter Clean、pub get、pub update 等。我仍然在 vs 代码以及 android studio 中遇到以下错误,

请有人在这个过程中帮助我,我错过了一些东西。

Running Gradle task 'assembleRelease'...                                
                                                                
FAILURE: Build failed with an exception.                                                                           
                                                                                                                   
* What went wrong:                                                                                                 
Execution failed for task ':speech_recognition:verifyReleaseResources'.                                            
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade                  
   > 1 exception was raised by workers:                                                                            
     com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed                          
     /Users/company/.gradle/caches/transforms-2/files-2.1/fc785d3673ca7ec4009108d2721750b3/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontStyle not found.
                                                                                                                   
     /Users/company/.gradle/caches/transforms-2/files-2.1/fc785d3673ca7ec4009108d2721750b3/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/font not found.
                                                                                                                   
     /Users/company/.gradle/caches/transforms-2/files-2.1/fc785d3673ca7ec4009108d2721750b3/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: …
Run Code Online (Sandbox Code Playgroud)

android dart flutter flutter-dependencies

0
推荐指数
1
解决办法
6347
查看次数

如何在数组中存储录制的文件?

这是我用字符串保存音频文件的代码.之后,我添加数组.但是仍然没有在这里工作..这里有任何选项存储documentdictionary后存储音频文件的数组.

    fileArray = [[NSMutableArray alloc] initWithContentsOfURL:recordedTmpFile];

    fileArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

    NSString *documentsDirectory = [fileArray objectAtIndex:0];

    NSMutableDictionary *recordDictionary = [NSDictionary dictionaryWithContentsOfFile:documentsDirectory];
    NSFileManager *fileManager = [NSFileManager defaultManager];
    for(int i= 0; i<fileArray.count;i++)
    {
        NSString *recorded = [fileArray objectAtIndex:i];
        NSString *filePath = [recordDictionary stringByAppendingPathComponent:recorded];
        newArray = [fileManager fileExistsAtPath:filePath];
    }   
Run Code Online (Sandbox Code Playgroud)

如果我遗漏的任何代码比建议我一些具体的想法.Plz给出一些回应..

iphone cocoa-touch objective-c

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