http://stackoverflow.com/questions/7747457/clearing-purchases-from-ios-in-app-purchase-sandbox-for-a-test-user
Does anyone have any ideas on how to reset and/or clear the IOS in-app purchase sandbox? I have an app that I'm testing with the sandbox, and I'd like to test new purchases without having to create a new test user every time I purchase something. If I don't do this, then I (of course) always get a message that the in-app purchase item has already been purchased when I click on my app's buy button.
 
IMO there are 3 things you can do to make testing non-consumables bearable:

pcwiki 發表在 痞客邦 留言(0) 人氣()

I am testing my app on my 3GS iPhone with iOS 4.2
I am using the following code which plays a sound in my IBAction. It works perfectly in the simulator (both iPad and iPhone) - I hear the sound.
NSString*pathToMusicFile1 =[[NSBundle mainBundle] pathForResource:@"alarm" ofType:@"mp3"];NSError*error;
alarmSound
=[[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL fileURLWithPath:pathToMusicFile1] error:&error];NSLog(@"Song1 Loaded");if(alarmSound ==nil){NSLog(@"Error playing sound");}else{
alarmSound
.numberOfLoops =20;
alarmSound
.volume =1.0;[alarmSound play];}

pcwiki 發表在 痞客邦 留言(0) 人氣()

Has anyone had issues playing audio via the SKAction playSoundFileNamed using iOS Sprite Kit through the external speaker of your iOS device? I have the following code that plays the M4A file with no issue through the headphones; however, no audio is played when I unplug the headphones stepping through code it executes just no sound. I have another app that does not use this method and it plays with no issue.
-(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event{/* Called when a touch begins */for(UITouch*touch in touches){CGPoint location =[touch locationInNode:self];SKAction*sound =[SKAction playSoundFileNamed:@"blast.m4a" waitForCompletion:NO];[self runAction:sound];}

pcwiki 發表在 痞客邦 留言(0) 人氣()

self.view.paused =true;

pcwiki 發表在 痞客邦 留言(0) 人氣()


介绍:
Grand Central Dispatch 简称(GCD)是苹果公司开发的技术,以优化的应用程序支持多核心处理器和其他的对称多处理系统的系统。这建立在任务并行执行的线程池模式的基础上的。它首次发布在Mac OS X 10.6 ,iOS 4及以上也可用。
设计:

pcwiki 發表在 痞客邦 留言(0) 人氣()


這篇主要講怎麼安裝以及使用Android NDK,
Android NDK簡單地說,就是讓您能夠在你的app當中使用C/C++進行implementation,
它可以把您寫的C/C++ build出一個share object檔案 (*.so) 讓Java call!類似windows中的dll檔!
當然你也可以在JNI call Java method,也就是說是雙向的!
而使用NDK的好處是大概有下面兩個(我只能想到這兩個..)

pcwiki 發表在 痞客邦 留言(0) 人氣()

I suggest that you follow Sprite Kit’s coordinate and rotation conventions. Specifically, your sprite image should be facing right at zero degrees (the default value), and a positive value is a counter-clockwise rotation. That said, here's one way to apply an impulse in the direction a sprite is facing:
// Specify the force to apply to the SKPhysicsBody
CGFloat r =5;
// Create a vector in the direction the sprite is facing
CGFloat dx = r * cos (sprite.zRotation);
CGFloat dy = r * sin (sprite.zRotation);
// Apply impulse to physics body
[sprite.physicsBody applyImpulse:CGVectorMake(dx,dy)];

pcwiki 發表在 痞客邦 留言(0) 人氣()

#define ARC4RANDOM_MAX 0x100000000
 
Your code means this:

pcwiki 發表在 痞客邦 留言(0) 人氣()

上传快照的时候提示“无法载入文件,请再试一次”,图片尺寸和格式都是没有问题的
A:文件名或路径中含有中文 

pcwiki 發表在 痞客邦 留言(0) 人氣()

new

everything is the quite similar to what was before, but here is the procedure in Xcode6 beta6:
#1
choose the New and File... or press ⌘N on keyboard:



#2
choose iOSSource then Cocoa Touch Class:



#3
type the name of your new class (e.g. HelloWorldClass), it is a subset of the NSObject, and you need to choose the Language as well:

#4
after you saved the files, you can find them in the Project Navigator like I did:

 

pcwiki 發表在 痞客邦 留言(0) 人氣()

主要操作:(用來io7以下)
1. 视图1(ViewController1)中添加以下代码
ViewController2 *lagerPicVC = [[ViewController2 alloc]init];

pcwiki 發表在 痞客邦 留言(0) 人氣()

There are two seemingly similar functions that take a parameter kSystemSoundID_Vibrate:
1)AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);2)AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

pcwiki 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。