Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Getting Started

noob FAQ - Problem and Answers Only Pls

You feel lost? You don't understand how to use ShiVa?

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 31 May 2012, 00:52

ISSUE: In Android Eclipse Project (ANDROID SPECIFICALLY) how do you change the app name (The name that shows up on a users android device in the listing of all apps) without having to RECOMPILE/REDO the entire app again?

OUR SOLUTION: Lol well we thought this was going to take forever or was as simple as just changing the name in the AndroidManifest.xml. Actually it is easy but thats the wrong location to change the app name.

Simply go to res->values->strings.xml (Located in the Package Explorer under your project) and inside of strings.xml simply change the name.

ITS THAT SIMPLE!

Hope that tip helps someone save some time hitting their head against the wall lol!

God Bless!

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 03 Jul 2012, 08:43

ISSUE: How to make a custom font that looks like children's handwriting or handwriting?

OUR SOLUTION:

1. Create a new font in ShiVa of type Arial and size 1024x1024
2. Open the FONT you created in ShiVa in Image Editor from within ShiVa (Just go to Textures->Arial and double click on it, it should open up in your image editor)
3. Draw over each letter and number using your own hand writing
4. SAVE THE FILE
5. Save the ShiVa Font and select ARIAL from now on and you should see the changes.

Let me know if you have issues :)

ENJOY and God Bless!

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 18 Jul 2012, 01:38

ISSUE: Application Rejected due to WAKE LOCK always keeping screen on and not allowing app to shut screen/dim screen normally. How to fix this? (ANDROID SOLUTION)

OUR SOLUTION: Ok for this solution, you need Eclipse installed.

SHIVA UAT STEPS:

1. Complete step 1 as normal in UAT
2. Make sure in Step 2: Authoring you select project as authoring type and complete all the other parts of step 2
3. In Step 3: Build, set the build type as Development and check off the items you want. Finally at the bottom of Step 3, Set the OUTPUT FOLDER to C:
4. Hit build and you should now see a ZIP FILE made in the C:

ECLIPSE STEPS:

1. Open up Eclipse
2. Click on File->New->Java Project
3. Enter a project name and hit ok
4. Right Click on the new project and click on Import
5. Select Archive File and hit Next
6. Click on Browse and find the ZIP FILE you created on C:
7. Click Finish
8. Select the arrow next to the folder to drop down all sub-folders so you can see them
9. Drop down the src folder
10. Drop down the com.yourcompany.yourapp folder
11. Double click on YourAppName.java (This will be the only java file that has your app name there)
12. Go to line 227 where it says "onEnableWakeLock ( true ) ;" and replace the true statement with the word false. Now the line should read:

onEnableWakeLock ( false ) ;

13. Save file using CTRL+S or clicking on save
14. Double click on the ANT Build file on the left in the Package Explorer window called build.xml
15. ON LINE 2:

If you want to export to a DEBUG apk file then default should equal:
default="Build debug apk"

If you want to export to a RELEASE apk file then default should equal:
default="Build release apk"

16. After you have made that change on line 2 (Either debug or release) save the build.xml file and DRAG IT OVER TO THE ANT BUILD WINDOW!

17. DOUBLE CLICK ON the ant build that you just dragged INSIDE OF THE ANT WINDOW (Double click in the ant window side)

18. If all goes well, your new apk file should be located in your workspace inside of the bin directory. For example if your workspace is on C:, your apk file will be located at C:\workspace\YOUR_APP_NAME\bin

19. Retest the new apk, and if all is correct, after about 2 min or whatever setting you have on your device, your device should now successfully go into sleep mode and dim mode without interfering and keeping the screen on all the time.

ENJOY!

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 19 Jul 2012, 09:15

ISSUE: iOS now recoding after a while and all my signing keys and provision profiles say "valid signing identity not found"??

OUR SOLUTION: Well I have to give credit on this one to a google search.

This is the EXACT document from this URL from one of ShiVa's competitor platforms CORONA: http://developer.coronalabs.com/forum/2011/03/13/build-app-store#comment-29896

Here is the entire step by step here created by user mrgoose...basically you have to resetup all your certificates and provision files all over again from scratch. FOLLOW THE TUTORIAL STEP BY STEP! Read it carefully, it will work fine if you do the steps:

mrgoose: OK, thought i might save someone out there a few hours running around in circles. (Like I did).

There seems to be no step-by-step guide for actually getting an app into the app store.... FOR THE FIRST TIME.

IMPORTANT: Let me repeat "FOR THE FIRST TIME" again. Once you get the hang of things, you'll probably not have to renew certificates and provisioning stuff. These

So here's my attempt to remember the steps while developing my app "Key Chords".

--------------------------------------------
Quick Hints
--------------------------------------------

- No spaces in your development folder names. (Including parent folders all the way down to the root of the hard drive.) Really.

- "Application Loader" is located here:
Mac HD > Developer > Applications > Utilities > "Application Loader"
You have to "zip" your app. Right click (or apple click) on the app, and choose "Compress [your app name]"

- Voodoo: You may have to be signed in to the provisioning portal (via safari) when using Application Loader.

- Before the running the Application Loader, your app must be in "Ready to Upload" status in itunes connect.

--------------------------------------------
1. Clean up your certificates / keys / provisioning profiles.
--------------------------------------------

Open Key Chain and find your old "dist" and "dev" certificates and remove them (We're making new ones.) The certs in Key Chain are named "iPhone Distribution: Your Name" and iPhone Developer: Your Name"

Key Chain > (Side Bar: Category) > Certificates (or "my certificates")

You can also click in "Keys"
Key Chain > (Side Bar: Category) > Keys
...and remove the keys that just say Your Name. I think these get created

I ended up doing this, like, 8 times. So I got pretty good at it. You will too.

--------------------------------------------
2. Reboot
--------------------------------------------
It's a voodoo thing. Rebooting is fun too!

--------------------------------------------
3. Create new certificates.
--------------------------------------------

Yes, go ahead and revoke the old ones, then follow the steps to get new ones. You'll need one for "development" and one for "distribution". Be sure to have your exact name and email used for your iOS account.

iOS Prov Portal > (Side Bar: Certificates) Create new or revoke
wait a few minutes then refresh and follow the instructions.

NOTES:
-- Pay close attention to the name and email address you use when setting up your certificates. (Use the ones you used when setting up your developer account.)
-- When creating the certificate authority request files, use the same names and emails as above.

This process will bring you back into Key Chain.

I had to do this a zillion times too, so you'll get good at it too.

NOTE: This guide is intended for "first time" people -- so that everything is set up nice and clean. Once you get the hang of things, you probably won't have to renew/revoke certificates.

--------------------------------------------
4. Set up your App IDs
--------------------------------------------

Use something like looking like com.boob.myappname

(Like a regular web address, assbackwards. You don't need an actual domain name, just make one up.)

NOTE: Don't put any of this info in your Corona "build.settings" file as plist keys... Corona takes care of all that when you build by reading the mobileprovisioning profile data.

--------------------------------------------
5. Provisioning
--------------------------------------------

- Jump through the hoops to get the files. I recommend making all three kinds: dev, hoc and store.
- I recommend using friendly reminder names for your provisioning profile titles like:

silly_app_dev
silly_app_hoc
silly_app_store

That was you can easily identify which files are which. because the end result will be actual files you have to manage.

--------------------------------------------
6. Check what you've got
--------------------------------------------

Don't install any of the provisioning profiles or certificates until your sure you've got everything handy.

You should have the following files:
- developer_identity.cer
- distribution_identity.cer
- silly_app_hoc.mobileprovision
- silly_app_dev.mobileprovision
- silly_app_store.mobileprovision

--------------------------------------------
7. Install the files
--------------------------------------------

Drag and drop the following files (one at a time) onto the KEY CHAIN application icon:
- developer_identity.cer
- distribution_identity.cer

Drag and drop the following files (one at a time) onto the XCODE application icon:
- silly_app_hoc.mobileprovision
- silly_app_dev.mobileprovision
- silly_app_store.mobileprovision

XCODE should automatically pair up the mobileprovisioning files with the certificate files.

You'll have to open the "organizer" window to validate that xcode synced everythign OK.

XCODE > Main Menu > Window > Organizer

The side bar has "developer profile and "provisioning profiles" in the list, there shouldn't be any errors in any of those views.

If there are errors:
-- Stop here and start all over from scratch.
-- Pay close attention to the name and email address you use when setting up your certificates. (use the ones you used when setting up your developer account.
-- When creating the certificate authority request files, use the same names and emails as above.

--------------------------------------------
8. Setup Your app
--------------------------------------------
Log into developer.apple.com and go to "iTunes connect" and set up your app. You should have all the necessary information by this time to set up the app correctly. You'll need to keep the mobile provisioning identifier handy... what ever you decided to use.

e.g. com.boob.silly_app

[user slgilley said:] Once you enter all the information about your app and submit, the app will be in the "Preparing to Upload" state.

Before the running the application loader, you MUST click on the "Ready to Upload" button/link.

--------------------------------------------
9. Build
--------------------------------------------

Follow the instructions in the Corona docs for creating the app.

NOTE: See elbowromapps's comment in the replies to this post below... "Corona has made some changes that made step 9 a little easier."

IMPORTANT: After creating your app, right-click on it and zip it up. (Application Loader needs the app to be zipped).

Launch "Application Loader", which is a utility in your XCODE folder:
Mac HD > Developer > Applications > Utilities > "Application Loader"

(You may have to download this " Application Loader " application from Apple)

Follow the steps to upload to the app store.

IMPORTANT: If you get the " application failed codesign verification " error, check that your Corona project folder and the folder that your outputting the "app" file to doesn't have any spaces or funcky characters.... including the full system path.

Good:

/User/boob/Desktop/silly_app/main.lua
/User/boob/Desktop/silly_app/silly_app.app

Bad:
/User/boob/Desktop/I'm dumb/silly app i'm working on/main.lua
/User/boob/Desktop/I'm dumb/build the silly app/my silly.app

All other errors refering to issues with certificates are due to complications with multiple mobile provisioning profiles, certificates and keys in Key Chain and XCODE and/or, look in:

/Users/your_user_name/Library/MobileDevices/Provisioning Profiles/

That's where XCODE puts the provisioning profiles when you drag and drop them onto the XCODE icon.

--------------

So I went through this process, like, 302 times. So don't feel bad if you have to as well. It's just part of the game.

========================================


Once again thank you to user mrgoose a user from Corona Forums.

Nav
Last edited by gamescorpion on 19 Jul 2012, 21:36, edited 1 time in total.
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 19 Jul 2012, 09:34

ISSUE: Architecture issue (iOS Error) "was built for 'armv7', but device requires 'armv6' ??" What to do?

OUR SOLUTION:

This solution was partly found using the steps in this forum on UNITY (Once again another competitor site to ShiVa, but gotta give credit where its due): http://forum.unity3d.com/threads/46358-was-built-for-armv7-but-device-requires-armv6

Using some of the forum steps above, here is how I fixed it:

1. In xCode Click on the Build Settings for Project
2. Change Architectures to armv6 armv7
2.1. Select other
2.2. Hit the '-' sign (Minus) to remove what is there
2.3. Hit the '+' sign (PLUS) to add armv7
2.4. Hit the '+' sign again to add armv6
2.5. Hit done
3. Repeat step 2 for the Build Settings for Targets (Its under project)
4. If done successfully, you should now no longer have any issues.

ENJOY!

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 19 Jul 2012, 20:50

ISSUE: WARNING TO ALL THOSE DEVELOPING FOR APPLE IOS -> Be EXTREMELY careful when doing an UPDATE on your iPad, iPhone, iPod Touch or other Apple Testing Devices!!! What happens when you update the firmware and OS on one of your testing devices??

OUR SOLUTION: What a pain in the A$$! This is seriously an Apple cash grab in my opinion.

Here's what happened -> iPad 2 was updated to new OS 5.1. I have OS X Snow Leopard with XCode for Snow Leopard on my Mac Air...I go to compile an app on my iPad 2 (I use to be able to do this without a problem) and xCode tells me I have to get either an older OS on my iPad 2 (WHICH IS NOT POSSIBLE, EVEN USING REDSNOW AND JAILBREAKING WILL NOT WORK TO DOWNGRADE!!) or I have to get the new xCode...Guess what...New xCode is only available on OS X Lion!

So basically in order to develop and test apps again on my iPad 2, I have to now go and upgrade OS X to Lion for $70 or else my iPad 2 is useless for Development! (I'm not really worried about the $70 fee for OS X Lion, its the principle of the matter! I wasted a day of my time just to figure out that at the end of the day, I can't dev apps anymore until I upgrade my OS to the latest OS X Lion ONLY because I thought by keeping my devices up to date is the right thing to do. This is the SECOND TIME this garbage has happened where I regret upgrading the OS on an apple device! Last time on my iPhone 4S I upgraded and it rendered my phone useless!)

I wish I had NEVER upgraded my iPad 2 OS to 5.1!!!!!

THE ABOVE IS A VERY VERY VERY IMPORTANT WARNING TO ALL DEVELOPERS OF APPLE APPS, BE VERY CAREFUL WHEN UPGRADING YOUR DEVELOPMENT DEVICES, YOU COULD RENDER THEM USELESS TO DEVELOP ON WITHOUT AN OS UPGRADE AND/OR MAJOR TIME SPENT TRYING TO DOWNGRADE YOUR OS ON YOUR DEVICES!

From now on, unless I'm absolutely sure I need an update, I am refusing to update my Development Devices for Apple.

If Apple keeps doing this, I wont be surprised when Android takes over in the future...just my 2 cents on that!

I hope this warning saves someone hours of time they could end up loosing if they do an upgrade on their device for iOS. ALWAYS make sure you know why you're upgrading an iOS device before doing it!!!!

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 21 Jul 2012, 02:28

ISSUE: Barnes and Noble Nook keeps rejecting my app due to not having the screen timeout after 2 minutes?

OUR SOLUTION:

Keep a note going forward for EVERY nook app submission you do, always DISABLE the wake lock through code using Eclipse.

Here is the link to my tutorial on that:

http://www.stonetrip.com/developer/forum/viewtopic.php?f=27&t=23714&start=75#p48260

After fixing, resubmit and that should fix your screen timeout issue.

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 02 Aug 2012, 10:49

ISSUE: What are Hooks/Callbacks? How do I connect handlers in ShiVa to external code? (IOS APPLE EDITION - HOOKS TUTORIAL)

OUR SOLUTION: This tutorial is similar to my previous hooks and callbacks tutorial for Android as some parts are identical so we will be starting there. This is an Intermediate/Advanced tutorial for those more intermediate/advanced users who want to expand ShiVa apps to do even more! This will open you up to the world of true customization with ShiVa!

ShiVa Step 1

1. Follow step 1 and 2 from the previous Hooks and Callbacks tutorial for Android (http://www.stonetrip.com/developer/forum/viewtopic.php?f=27&t=23714&start=45#p44506)

ShiVa MAC UAT Step 2

1. Now instead of opening ShiVa UAT you will be copying your STK file to the Mac system and compiling the ShiVa STK using ShiVa UAT for MAC (I will assume you know how to do this and get the app into xCode.)

xCode Step 3

1. First make sure LINE NUMBERS are shown in xCode
a. click on File->Preferences->Text Editing->Show: Line numbers

2. Under Classes folder (On left window pane) select the S3DEngine_Wrapper.cpp file.

3. Go to Line 170 and type in the following code (Change the handler name and function name to your own that you specified in ShiVa 3D Steps above):

Example 1:
Code: Select all
S3DClient_InstallCurrentUserEventHook  ( "MainAI", "YOUR_HANDLER_NAME", YOUR_HANDLER_NAMECallback, NULL);


Example 2:
Code: Select all
//Using previous example the hook would be called
S3DClient_InstallCurrentUserEventHook  ( "MainAI", "onMyTestCallWithVar", onMyTestCallWithVarCallback, NULL);


4. Go to line 137 above void AdMobSetVisibleCallback and paste the following (Change the handler name again accordingly):

Example 1:
Code: Select all
void YOUR_HANDLER_NAMECallback ( unsigned char _iArgumentCount, const void *_pArguments, void *_pUserData )
{
     if ( _pArguments && * _iArgumentCount == 1 ) )
     {
          const S3DX::AIVariable *pVariables = (const S3DX::AIVariable *)_pArguments ;
         
          if ( pVariables[0].GetType ( ) == S3DX::AIVariable:eTypeString )
          {
               strncpy ( sYOUR_STRING, pVariables[0].GetStringValue ( ), 254 ) ;
          }
     }
}


Example 2:
Code: Select all
// Once again using the example from the first hooks and callbacks tutorial

void onMyTestCallWithVarCallback ( unsigned char _iArgumentCount, const void *_pArguments, void *_pUserData )
{
     if ( _pArguments && * _iArgumentCount == 1 ) )
     {
          const S3DX::AIVariable *pVariables = (const S3DX::AIVariable *)_pArguments ;
         
          if ( pVariables[0].GetType ( ) == S3DX::AIVariable:eTypeString )
          {
               strncpy ( sYOUR_STRING, pVariables[0].GetStringValue ( ), 254 ) ;
          }
     }
}



5. Go to line 29 and add the following (Once again change the variable to your own but make sure you replace the same variable in the function above as well):

Code: Select all
static char sYOUR_STRING [255] = "" ;


6. Go to approx line 356 and type in the following:

Code: Select all
extern "C" const char *S3DEngine_sYOUR_STRING ( )
{
     return sYOUR_STRING;
}


7. Save the file and close it.

8. Now open up S3DEngine_Wrapper.h and go to line 31 approx and type in the following:

Code: Select all
extern const char *S3DEngine_sYOUR_STRING ( );


9. Save the file and close it.

10. Now ANYWHERE you want to get the string information you passed from ShiVa to iOS, you simply write the function name itself as follows:

Code: Select all
S3DEngine_sYOUR_STRING ( );


11. Most of the work happens in the Classes folder within the various .m files. For example, the main game loop is contained in S3DEngine_EAGLView.m.
If you go to line 258 you will find the function and if you go down inside the function to line 356 you can write an if statement (which will be executed
at every clock tick just like an onEnterFrame is) as follows using your code:

Code: Select all
if ( S3DEngine_sYOUR_STRING ( ) )
{
     // Show passed information in DEBUG log window
     NSLog ( @"%s", S3DEngine_sYOUR_STRING ( ) );

}


12. Using the same method above you can pass numbers, strings and booleans from ShiVa to iOS and do various things with it.

This is a VERY basic overview of hooks and callbacks in iOS from ShiVa 3D. As you start getting into advanced iOS functionality, knowing this will help you out MASSIVE!

ENJOY and God Bless!

Nav
Last edited by gamescorpion on 16 Aug 2012, 05:35, edited 1 time in total.
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 02 Aug 2012, 12:29

ISSUE: Is there a VIDEO that is step-by-step from ShiVa to Apple for Universal Binary?

OUR SOLUTION: Just made a new video JUST for that which I believe broozar will be putting in the wiki. For all those who want to get at it first however, here's the link:

ShiVa 3D to Apple - Step by Step to Get Your App into the App Store from ShiVa 3D! - By Game Scorpion Inc.

https://www.youtube.com/watch?v=yT47XcWLc-c

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 07 Aug 2012, 01:01

ISSUE: Dropped iPad...Now all i get is this red screen (like it turns on but doesn't turn on. Nothing is responsive, what to do??)

OUR SOLUTION: HAHAHAHAHA OH MY GOSH! WAIT TILL YOU HEAR THE FIX!

First a WARNING: WE ARE NOT RESPONSIBLE FOR THIS! DO NOT TRY THIS UNTIL ITS THE LAST RESORT!!!

Reference Forum URL: https://discussions.apple.com/thread/3117242?start=0&tstart=0

Ok so today my son drops the iPad 2 that we use for development, the screen goes black and wont turn on yet I see the screen flashing (known as red screen).

Anyways the SOLUTION is my most favorite solution that worked for me and I couldn't believe this did the trick that I had to share with everyone...

1. PRAY
2. SLAP THE IPAD! Hahahahahaa I'm not joking!

A few firm slaps to the back of the iPad and it seemed to fix the iPad and make it work again and everything was fine as if nothing happened! (Seriously I am not the only one, go read the forum thread link I posted above in the URL, apparently it seems that Steve Jobs must have thought of this before hand (In my opinion lol) ;)...maybe he got frustrated and said, "What would a human being naturally do to their electronics when they are at their last frustration? HIT IT!" loll)

I think Apple thought of this as well and so I believe personally that a sensor goes inside of the iPad when you drop it and a few good firm taps "wakes" up the iPad again.

As the warning above states, do this as a LAST RESORT, but I will not be held responsible for any damages!! This is what worked for us and saved us hundereds of dollars as we didn't have to buy a new one.

My FAVORITE fix around! I couldn't believe it when I slapped my iPad a few times and it worked! BTW: I prayed before doing this, God power's all miracles :)

NOTE: Maybe some people got frustrated and are selling their ipads for CHEAP on eBay with the same issue! Imagine getting an iPad for like $100 and simply slapping it when you get it and its WORKING! Just an idea ;) CHEAP IPADS!!! Hmm I'm gonna go check eBay now LOL!

God Bless!

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 15 Aug 2012, 19:21

ISSUE: How do you get LinkShare links to work in iOS apps???

OUR SOLUTION: This solution comes from a lot of help from this website: http://david-smith.org/blog/2011/12/28/user-friendly-itunes-affiliate-links/

Thanks so very much to David Smith for writing this great blog post entry to help out in getting linkshare to work.

So here are the steps:

1. Follow the linkshare link creation steps from the URL: http://david-smith.org/blog/2011/12/28/user-friendly-itunes-affiliate-links/

David Smith's Steps in a Nutshell:
a. Get your Linkshare ID (11 Digits)
b. Get the US iTunes link (with the mt=8 ending)
c. Append to the end of the URL: &partnerId=30&siteID=<YOUR_11_CHARACTER_SITE_ID>

2. In your ShiVa URL output (system.openURL), place the newly created URL and this will make it so that it finally links correctly to your app without the mess! Cool thing is in my testing I found that it goes DIRECTLY to the app store on your device rather than the messy Browser Window then App Store method.

DOWNFALL OF THIS METHOD: The only downfall of this method is that you wont be able to track clicks. You will get the 5% from sales, but wont know about it until around several weeks to a month. Make sure you are using the correct ID as well or you may not realize you used a wrong ID. This method will save you time and most importantly, it works from your iOS app!

Tested myself and got it up and running. I will be doing a test to see how well it goes in one of our apps.

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 16 Aug 2012, 06:04

ISSUE: How to do iOS Local Notifications?

OUR SOLUTION:

Note: only works on actual devices, not simulator! (Thanks to makkar for pointing this out)

First let us differentiate the two types of notifications. There are LOCAL notifications sent by your app that is running on a device (This is they type that we are going to go through in this tutorial).

The second type of notification is known as a PUSH notification and requires your own server and approval from Apple to start doing client-server push notifications. If you are interested in the second option, for now you can
use the service from Urban Airship (http://www.urbanairship.com) which allows you free 1 million push notifications per month for your app, but you still need to register for Apple Push Notification Service (APNS).

Anyways lets begin our tutorial on simple LOCAL iOS Notifications (These are the ones that show up with an icon and message outside of your app, even in the home screen when device is locked).

Reference URL:
1. http://stackoverflow.com/questions/8965695/ios-simple-local-notification-3-days-prior

We got a head start luckily with the above URL. We will be going over a SIMPLIFIED version of the above code just to show you how to do a simple notification from ShiVa.

TUTORIAL STEPS:
1. Complete previous HOOKS AND CALLBACKS tutorial for iOS: http://www.stonetrip.com/developer/forum/viewtopic.php?f=27&t=23714&p=48768#p48768

2. We are going to assume you have created a function following the HOOKS AND CALLBACKS iOS for passing a value (STRING VALUE - specifically char *) using a function such as S3DEngine_sYourString ( ).

3. Open up S3DEngine_EAGLView.m and on line 13 paste the following:

Code: Select all
BOOL   SINGLE_MSG   = NO;


4. Go down to - (void) drawView (Line 259) and inside the function after the "if ( S3DEngine_iPhone_Stopped ( ) )" statement on approx. line 372 type the following:

Code: Select all

   if ( SINGLE_MSG == NO )
   {
      // *******************
      // SIMPLE NOTIFICATION
      // *******************
      
      // Create the local notification
      UILocalNotification *localNF = [[UILocalNotification alloc] init];

      // Check to see that the notification is not nil
      if (localNF == nil)
         return;

      // Chose the date to send the notification (In this case we are firing it off IMMEDIATELY so it is a nil value)
      localNF.fireDate = nil;
      
      // Chose the timezone for the notification
      localNF.timeZone = [NSTimeZone defaultTimeZone];

      // Chose the notification message (Note: We are assuming your ShiVa argument you passed is inside the function S3DEngine_sYourString ( ) for this example.)
      localNF.alertBody = [NSString stringWithUTF8String:S3DEngine_sYourString ( ) ];

      // Set the action to complete with the alert (We want it firing now so nil value is used)
      localNF.alertAction = nil;

      // Set the notification sound
      localNF.soundName = UILocalNotificationDefaultSoundName;

      // Set the notification number for icon
      localNF.applicationIconBadgeNumber = 0;

      // Schedule the notification accordingly
      [[UIApplication sharedApplication] scheduleLocalNotification:localNF];

      // This just makes sure we only run this code once in the main game loop
      SINGLE_MSG = YES;

   }



5. Save, Compile and Test. If all was done correctly, simply exit your app and PULL DOWN the notification bar window (Drag your finger from top of screen on iPhone/iPad down) and you should see your notification listed there.

Congratulations, you've made a basic notification. From here you can continue to learn even more advanced tricks with local notifications and even get into full fledged push notifications which is even more advanced!

Take care and God Bless!

Nav
Last edited by gamescorpion on 17 Aug 2012, 17:10, edited 1 time in total.
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 17 Aug 2012, 07:27

ISSUE: How to set Windows 7 Phone / Windows 7 Device to Development Mode or Prepare for Development?

OUR SOLUTION:

REFERENCES:

a. Solution Link (Our solution came from Solution 2 user Silju MC): http://www.codeproject.com/Questions/232148/Install-xap-files-on-my-Windows-Phone-7
b. Windows Phone Developer Tool: http://www.microsoft.com/en-us/download/details.aspx?id=13890
c. Zune Software Download: http://www.microsoft.com/windowsphone/en-us/apps/zune-software.aspx

NOTE: We are following the solution from the reference link above. This is not our own solution specifically. We have however made it easier by providing direct links to files for your convenience.

ASSUMPTIONS: We assume you have already setup your windows developer account username and password and can login to http://create.msdn.com. If not then go ahead and set up your account now before starting.

1. Download and install Windows Phone Developer Tool (Unless you already installed it)

2. Download and install Microsoft Zune (Link is above for both softwares)

3. After installation, connect your phone/device via USB

4. LAUNCH the Zune software if it has not already started automatically.

5. Register your phone

a. Make sure your device is plugged in and NOT in locked mode
b. Click Start->All Programs->Windows Phone SDK 7.1->Windows Phone Developer
Registration
c. Enter your Windows Live ID and Password (Same one you setup before)
d. After a few moments your phone should be registered as a development device.

6. Now to deploy any XAP file (The actual binary) to your phone/device you follow the steps below:

a. Click on Start->All Programs->Windows Phone SDK 7.1->Application Deployment
b. The new window will come up, make sure your target is set as your device
c. Browse for the XAP file you want to use
d. As long as your device is not in lock mode, you should see the app being DEPLOYED
to device.
e. Once deployed you should see a message that says "XAP Deployment Complete". Your
app should now be part of your app list in the windows phone device.

CONGRATULATIONS! You should now have no issues in testing apps on your device!

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 17 Aug 2012, 09:31

ISSUE: What is Windows 7 Phone Orientation Mode?

OUR SOLUTION:

In ShiVa here is the details for Windows 7 Phone -

LANDSCAPE ORIENTATIONS: 0 and 2 are landscape orientations.

Example:
Code: Select all
        application.setOption ( application.kOptionViewportRotation, 0 )   


Hope that helps :)

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

Re: noob FAQ - Problem and Answers Only Pls

Postby gamescorpion » 17 Aug 2012, 10:00

ISSUE: Step-by-step ShiVa to Windows 7 Phone BETA? (Part 1: Getting from ShiVa to Testing on the phone. Part 2 will focus on getting app into App Hub and signing the app if required...)

OUR SOLUTION:

ShiVa to Windows Phone 7/7.5 (APP HUB) Step-By-Step PART 1:

SETUP AN APP HUB (XBOX LIVE) ACCOUNT AND PAY YOUR YEARLY FEE

1. Go to App Hub Signup Page (http://create.msdn.com/en-us/home/membership)
a. Click on Join Now and sign in with a hotmail/live account (If you dont have one,
setup a new one)
b. Pay the $99 yearly fee via XBOX Live
c. Wait for approval of your account (While waiting you can start the next step and
start downloading the dev tools until they approve your account. Took me nearly
a week to get approved!)
d. Setup your banking information along with a W-8BEN (Once again can take time)

NOTE: You can upload a maximum of 100 Free apps after which it is $19.99 per app.
You also have a limit of 10 apps on XBOX Live.

AFTER ACCOUNT IS SETUP

1. Go to App Hub (http://create.msdn.com/en-US)

2. Click on "Download the Free Tools"

3. Click on "download the SDK"

4. Download the latest vm file (vm_web2.exe at the time of writing this)

5. Once downloaded double click the file to install

6. Accept the Windows Phone SDK 7.1 License and hit Install Now (NOTE: Uncheck the checkbox that allows microsoft to send data. Total invasion of privacy in my opinion, up to you.)

7. You should now have the download begin downloading the sdk which is around 700MB. Once done we will continue.

8. Once installed, RESTART your computer

9. Open Microsoft Visual Studio 2010 Express for Windows Phone

10. Register online for license and register your copy of Microsoft Visual Studio

DEVICE DEVELOPMENT MODE

1. Follow this tutorial to set your device up in DEVELOPMENT MODE:
http://www.stonetrip.com/developer/forum/viewtopic.php?f=27&t=23714&start=75#p49234

ShiVa STEPS

1. Compile your stk file as normal, just take into account the following for your stk file:

a. Windows 7 Phone Landscape mode is 0 and 2
b. Windows 7 Phone BETA currently does not provide sound
c. Windows 7 Phone BETA currently has some glitches with some 3D Model textures not
all working properly (but most work well)
d. W7P BETA works perfectly with HUDs and also works well with the rotations
(accelerometer)
e. I STILL have not figured out how to save/load files yet in Windows 7 Phone. Not
sure if this is a bug or will be fixed in the future...

MICROSOFT VISUAL STUDIO STEPS

1. OBTAIN THE BETA OF WINDOWS 7 PHONE FROM STONETRIP BETA WEBSITE (We are not placing the link here as only those who are part of the beta program at this time are allowed to access these files. If you do not have BETA access, then please wait for the official release to start creating windows 7 phone apps or go and get a ShiVa Beta Account)

2. Unzip the BETA zip file and place all items inside a temporary working folder on your desktop (Just create any project folder on the desktop)

3. In the BETA folder you should have a folder called MyGame. Simply take your STK file and rename it as S3DMain and copy and paste it inside MyGame->MyGameContent folder (MAKE SURE TO OVERWRITE THE OLD S3DMain.stk FILE).

4. Open a new instance of Microsoft Visual Studio 2010 Express for Windows Phone

5. Click on File->Open Project

6. Find the MyGame folder and inside of it you should see a Microsoft Visual Studio Project. Double click on it and open it up.

7. Once open, simply hit F6 OR Debug->Build Solution and you should have a COMPILED XAP FILE.

TESTING STEPS

1. Go to Start->All Programs->Windows Phone SDK 7.1->Application Deployment

2. Select Target as Windows Phone Device

3. Select XAP file located at MyGame->MyGame->bin->Windows Phone->Debug->MyGame.xap

4. Hit the DEPLOY button and as long as your phone is unlocked, it should start COPYING the file over.

5. Test your app :)

CONGRATULATIONS! You should now see your app on your device (Simply go to the ENTIRE app list and you will see the MyGame icon which you can test with your app).

Part 2 will continue where we add an icon and screenshot (Rather than seeing the ShiVa icon and Screenshot) and will focus on getting the app in for approval on App Hub.

ENJOY and God Bless!

Nav
Game Scorpion Inc. http://www.gamescorpion.com
MY KICKSTARTER PROJECT ARMIES OF RIDDLE - NOW LIVE (SEP/OCT 2014):
https://www.kickstarter.com/projects/617242070/mobile-and-physical-fantasy-card-rpg-game-ios-and
User avatar
gamescorpion
Platinum Boarder
Platinum Boarder
 
Posts: 667
Location: Ontario, Canada

PreviousNext

Return to Getting Started