I am very new to Xcode and Objective C. So I need help with the Game Center achievements. I have already set it up on the iTunes connect but don't know how to make them work in my game.
Also, I want to make it so if the user presses a button they get an achievement on Game Center. I have done nothing so far with Gamekit except for import the framework.
Thanks,Kevin
Apple has numerous videos and documentation you can look through to get this done...
https://developer.apple.com/devcenter/ios/gamecenter/
I don't recall the exact API call you will need but you can find it on the Apple developer portal.
Related
so I'm new to iOS development but I've been coding with java for years now.. but I've been trying to figure out how to send an integer, a single number from a variable from the iPhone to a label on an Apple Watch. I'm at the point of banging my head against the keyboard because it seems so easy but I have no idea how implement any of it. thanks for any help,,
One way to send data between iPhone and its paired Apple Watch is through the Watch Connectivity framework - you'll able to send an integer since it's a property list type.
Another way is by sending it up to the network and then fetching it from a WiFi or cellular connected Apple Watch. A more complex iPhone + Apple Watch app might make use of both.
I'm beginning some OS X development, I am reasonably accomplished with objective C and UIKIT.
There doesn't seem to be as much online about moving from iOS development to OS X as I thought there would be!
Anyway, I found a decent tutorial over a Ray Wenderlich, that basically explained the differences, (multiple NSWindows, then add to them NSViewControllers etc)
What I would like to do is make a little app that shows info in the status bar (beside the Wifi icon etc)
Basically all it does is have an NSStatusitem that has it's title set with info I want shown (e.g. current song title)
I've got one going and it's working ok so to my question:
I've got Application is agent (UIElement) (so I cannot see a dock icon or menubar)
The code for my little app all resides in the app delegate, now from iOS dev i'm sure this is not the right place for this code, but since the app is a just a status bar item, that has it's title updated I don't think I need a UIViewController etc....
Where should my apps logic go?
Anything online to transition from iOS to OS X?
As you dont have much work with NSWindows and NSViews, you surely dont need NSWindowController or NSViewController.
And I think for this kind of app even your AppDelegate class is enough and best place to put all your logic.
If you have some models then you can break your code upto that, and use it in the AppDelegate itself.
Transition from iOS to OSX.
If you are good in Objective-C then you dont have to worry about few more Cocoa-Controls especially GUI levels, you have full support of Documentation.
Switching between iOS to OSX, vice-versa is not to difficult, but yes if you end up with system level then you need to interact with OSX too.
As stated earlier, if you know Objective-C well, then you should not face major problems. However, there are some differences. I found these following documents helpful:
About Developing for Mac
Migrating from Cocoa Touch
I have being doing a project in xcode, it is creation of the kings drinking game for ios. I am using uiimages and nsdictionary to create the game the game is working fine. However I have to implement a framework I havent used before. I was wondering if someone could fill me in on possible frameworks i could use.
I was hoping there was a framework that would help with the displaying the rules when a card is turned.
For example the rule would be a string that is displayed to the screen depending on what card is drawn. I would like to be able to display it to the screen without the use of a pop up box or text field.
if anyone could let me know if there is a possible framework that would do this or a framework that would work well with a card game for ios I would appreciate it.
Thanking You
I've started using Game Center in my App but while I'm testing achievements I noticed that I don't know how to delete/reset them. I also tried to go on the Game Center (on the simulator) swipe on the App and delete it. But when I play my App again, the achievements that I've previously unlocked are still there.
There is a way to reset/delete them?
Nevermind. I found "resetAchievementsWithCompletionHandler" method. Didn't know how I missed that before.
Can anyone give me a head starters on this question. How would I be able to make an app that searches through your music contents that are already synced on your phone and play them. I don't want to do a scroll view, where the user just presses on the options. Instead I want the user to type the song name and if the song is found it will play it.
thanks,
kevin
The class you are looking for is MPMusicPlayerController. It's only available in iPhone 3.0 and above.
Get the instance for your app ([MPMusicPlayerController applicationMusicPlayer]) rather than the iPod instance. You can use this to play the songs once you've located them.
In order to do your own search rather than presenting the typical interface check out MPMediaQuery.
I found this article helpful. It's mostly about iPod player integration, but it touches on these other topics too.