小编hac*_*ker的帖子

用于推送通知的Creating.pem文件?

我有一个IPhone应用程序,我正在实现推送通知.为此我创建了一个csrfile,p12文件和生产cer.Enabled推送通知的app id.And配置文件下载.当我在设备上运行时我得到了一个注册通知也来了.但是当我从p12键合并来自证书和pem文件的pem文件,并生成另一个pem文件并放入我的服务器.推送通知没有进入我的手机.我已经使用了这个命令终端创建文件

openssl x509 -in aps_production.cer -inform der -out phoneapp.pem 

openssl pkcs12 -nocerts -out phoneappKey.pem -in veapp.p12

cat phoneapp.pem phoneappKey.pem > applicationwebservice.pem
Run Code Online (Sandbox Code Playgroud)

`有人可以帮我正确地获取pem文件吗?

iphone ipad ios

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

malloc:***对象0x165060的错误:没有分配被释放的指针?

我有一个应用程序,其中我有一些视频和音频和一些inapp purchase.all r伟大的模拟器和工作完美.但昨天我已经创建了一个应用程序,并试图在它上面运行崩溃.错误报告是

malloc: *** error for object 0x165060: pointer being freed was not allocated
  *** set a breakpoint in malloc_error_break to debug
Run Code Online (Sandbox Code Playgroud)

任何人都可以知道解决方案.我不知道哪里出错了,在模拟器中它工作得很好.任何人都可以帮助我吗?

iphone ipad ios

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

getFileDescriptor在从扩展文件中读取mp3文件时返回null

我已经成功下载并存储了扩展文件.但是当我尝试在里面播放mp3时它崩溃了..

            ZipResourceFile expansionFile = APKExpansionSupport.getAPKExpansionZipFile(getApplicationContext(),
                    1, 0);

            InputStream fileStream = expansionFile.getInputStream("mysong.mp3");
            AssetFileDescriptor asd = expansionFile.getAssetFileDescriptor("mysong.mp3");
            MediaPlayer mediaPlayer = new MediaPlayer();
                    mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
                    mediaPlayer.setDataSource(asd.getFileDescriptor(), asd.getStartOffset(), asd.getLength());
                    asd.close();
                    mediaPlayer.prepare();
                    mediaPlayer.start();
Run Code Online (Sandbox Code Playgroud)

这里logcat说输入流和文件描述符都是null ..任何人都可以帮助我吗?

android apk-expansion-files

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

MFmailcomposer有时会出错?

我正在使用MFMailcomposer从我的iPhone应用程序发送邮件.它工作正常,但是当我将它移植到iPhone 5和ios6时

_serviceViewControllerReady:error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=1 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 1. 但如果我再次运行没有问题,它工作正常.

我正在呈现像这样的邮件作曲家

action
{
Class mailClass = (NSClassFromString(@"MFMailComposeViewController"));
    if (mailClass != nil)
    {
        // We must always check whether the current device is configured for sending emails
        if ([mailClass canSendMail])
        {
            [self displayComposerSheet];
        }
        else
        {
            [self launchMailAppOnDevice];
        }
    }
    else
    {
        [self launchMailAppOnDevice];
    }

}


void)displayComposerSheet 
{

    AppDelegate *appdelegate=[[UIApplication sharedApplication] delegate];
    MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
    picker.mailComposeDelegate = self;  

    [picker setSubject:@"report"];



    // Set up …
Run Code Online (Sandbox Code Playgroud)

iphone ipad ios

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

apk扩展文件无法从Playstore下载

我正在使用从SDk下载的示例apk扩展文件.我的主要扩展文件大小约为5 MB,格式为"main.1.mypackage_name".

我将我的应用程序作为草稿应用程序与扩展文件一起上传到Play商店.但问题是当扩展文件下载进度时,在"Android/obb/mypackage"下创建一个包名称的文件夹.但是该文件夹中没有这样的文件.

有时我STATE_FAILED_UNLICENSED会在下载开始时从playstore 收到消息.

这应该是什么原因?文件名格式有什么问题吗?有谁能够帮我.

android expansion

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

如何在Android中测试应用内购买?

我想在发布之前测试应用程序内购买.如何为此创建测试帐户?任何人都可以帮助我完成所有需要的程序吗?

android in-app-purchase in-app-billing google-play

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

Twitter:使用scribe发送直接消息

这是我使用scribe发送直接消息的代码.但它给了我无效的反应.我究竟做错了什么?

 OAuthRequest req;
 OAuthService s;
 s = new ServiceBuilder()
        .provider(TwitterApi.class)
        .apiKey(APIKEY)
        .apiSecret(APISECRET)
        .callback(CALLBACK)
        .build();
 req = new OAuthRequest(Verb.POST, "https://api.twitter.com/1/direct_messages/new.format?user_id="+user_id+"&text=my app test");

s.signRequest(MyTwitteraccesToken, req);
Response response = req.send();

   if (response.getBody() != null) {
    String t=response.getBody();
    Log.w("twittersent","twittersent"+t);
 }
Run Code Online (Sandbox Code Playgroud)

有谁能够帮我 ?

twitter android

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

android camera setDisplayOrientation(90)在不同的设备中失败

我的相机应用程序有问题.相机活动处于纵向模式.所以我给了

camera.setDisplayOrientation(90);
Run Code Online (Sandbox Code Playgroud)

根据SO中的不同帖子,这将在纵向模式下正常工作.

但它不能正常使用不同的设备.问题是,预览向左或向右旋转90度.在Htc中没关系.但是对于Galaxy系列,它不起作用.

谁能帮我 ?

android orientation android-camera

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

自定义Android应用内购买的详细信息

我已经在我的应用程序中实现了应用程序内购买.但我需要自定义购买的详细信息,购买时间应该是第一个,第二个购买的项目数量是连续的.基本上从Dungeons示例中,它只是显示只有那一列

android.test.purchased 1

我需要这样的东西,

2012FEB1 2 $已购买

任何人都可以帮我实现这个目标吗?

android in-app-purchase

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

当我收到推送通知时,如何重新加载tableview?

我有一个iPhone应用程序,我在其中添加推送通知.

当我收到推送通知时,我需要转到特定视图,在此处我在调用Web服务后加载表视图.问题是当我站在同一个观点时.如果我收到推送消息,我需要在前台和后台重新加载tableview.但是,当我这样做时,它无法正常工作.我该如何实现这一目标?

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {

    NSLog(@"########################################didReceiveRemoteNotification****************************###################### %@",userInfo);

    // Check application in forground or background
    if (application.applicationState == UIApplicationStateActive)
    {
        if (tabBarController.selectedIndex==0)
        {
            NSArray *mycontrollers = self.tabBarController.viewControllers;
            NSLog(@"%@",mycontrollers);
            [[mycontrollers objectAtIndex:0] viewWillAppear:YES];
            mycontrollers = nil;
        }

        tabBarController.selectedIndex = 0;
        //NSLog(@"FOreGround");
        //////NSLog(@"and Showing %@",userInfo)
    }
    else {
        tabBarController.selectedIndex = 0;
    }
}
Run Code Online (Sandbox Code Playgroud)

iphone ipad ios

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