GLBasic forum

Main forum => GLBasic - en => Topic started by: PaLe on 2011-May-27

Title: APPLE App Rejected :-(
Post by: PaLe on 2011-May-27
sorry for My English...

I recently sent my first application to Apple, but it's been refused by a code 2.1 (Apps That crash Will Be Rejected - https://developer.apple.com/appstore/resources/approval/guidelines.html)
The application works fine on my iPhone 3G-4.2.1 (Xcode 3.2.6 with the specific devolopment-profile, GLB-SDK 9.033)

The program is very simple, less 400 commands even if it uses the 3D instructions (no textures, no lights), I did not use other special instructions, the only I/O operation is to save a file-scores with (PLATFORMINFO $ (DOCUMENTS ") )

In your opinion, may be due to some instructions / routines that I have inserted/not inserted in the code or some settings of Xcode?
Any ideas?



iTunesConnect message:
We found that your app crashed on iPhone 4 running iOS 4.3.3, which is not in compliance with the App Store Review Guidelines.

Your app crashed on both Wi-Fi and cellular networks upon launch.
Title: Re: APPLE App Rejected :-(
Post by: spacefractal on 2011-May-27
http://www.glbasic.com/forum/index.php?topic=6328.0, same issue?
Title: Re: APPLE App Rejected :-(
Post by: Ian Price on 2011-May-27
Rejection is shit - even worse when you are rejected because the reviewer is an idiot. It can (and does) happen!

GLB will crash if trying to load a bad save file or a file that doesn't exist. Make sure you check it's available before trying to load it. If it doesn't exist, then create the save file.

Ensure that your arrays don't go out of bounds. That'll crash GLB too.

Dunno. Could be any number of reasons, but those are what I would check first.

Put error traps/messages out in your code to see if you can identify this error. And delete your SAVE data file and try running the app "clean"
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-May-27
TKS Ian,

Quote from: Ian Price on 2011-May-27
Rejection is shit - even worse when you are rejected because the reviewer is an idiot. It can (and does) happen!

GLB will crash if trying to load a bad save file or a file that doesn't exist. Make sure you check it's available before trying to load it. If it doesn't exist, then create the save file.
yes,the program check "IF DOESFILEEXIST(PLATFORMINFO$("DOCUMENTS")+"/myfile.txt")=FALSE

Quote
Ensure that your arrays don't go out of bounds. That'll crash GLB too.
I know...

Quote
Dunno. Could be any number of reasons, but those are what I would check first.

Put error traps/messages out in your code to see if you can identify this error. And delete your SAVE data file and try running the app "clean"

I'll do it. I deleted the app from iPhone each time before installation...

i also checked the .crash file in the library/logs/crashreporter/mobiledevice/.....myapp.crash but i didnt understand well the list of message...
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-May-27
But I think that the main problem is in the settings of xcode.proj
Title: Re: APPLE App Rejected :-(
Post by: ampos on 2011-May-27
Remove completly your xcode folder and do Not use glb beta. It creates something different in Xcode than previous versions.
Title: Re: APPLE App Rejected :-(
Post by: Millerszone on 2011-May-28
I sent an update today for "Hit the Deck Baseball" (iPhone), and I finally added "Just Pong" for the iPhone to the App Store.
We'll see if they get rejected.

Before sending to Apple, I had to make a couple of changes:
With the beta version of GLBasic, I had to use this at the start of the program:
http://www.glbasic.com/forum/index.php?topic=6309.msg50331#msg50331 (http://www.glbasic.com/forum/index.php?topic=6309.msg50331#msg50331)
Code (glbasic) Select

IF NOT DOESFILEEXIST(PLATFORMINFO$("DOCUMENTS")+"/settings.dat" )
   COPYFILE "Media/settings.dat", PLATFORMINFO$("DOCUMENTS")+"/settings.dat"
ENDIF


Also had to make this change:
http://www.glbasic.com/forum/index.php?topic=6328.msg50747#msg50747 (http://www.glbasic.com/forum/index.php?topic=6328.msg50747#msg50747)

Title: Re: APPLE App Rejected :-(
Post by: ampos on 2011-May-28
With  beta, any app sent to iTunes was automatically rejected by iTunes in just seconds as "Invalid Binary" and no email. So, I remove my xcode dir, compile with non-glb beta and it was accepted.
Title: Re: APPLE App Rejected :-(
Post by: Millerszone on 2011-May-28
Quote from: ampos on 2011-May-28
With  beta, any app sent to iTunes was automatically rejected by iTunes in just seconds as "Invalid Binary" and no email. So, I remove my xcode dir, compile with non-glb beta and it was accepted.

I used Beta 9.104 and apps where accepted. Received emails "Waiting for Review"
Title: Re: APPLE App Rejected :-(
Post by: ampos on 2011-May-28
Quote from: Millerszone on 2011-May-28
Quote from: ampos on 2011-May-28
With  beta, any app sent to iTunes was automatically rejected by iTunes in just seconds as "Invalid Binary" and no email. So, I remove my xcode dir, compile with non-glb beta and it was accepted.

I used Beta 9.104 and apps where accepted. Received emails "Waiting for Review"

Well, so it was for me...
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-May-28

Quote from: ampos on 2011-May-27
Remove completly your xcode folder and do Not use glb beta. It creates something different in Xcode than previous versions.
I remove xCode folder each time...
how to compile with non-glb beta ? ???
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-May-28
Quote from: PaLe on 2011-May-28

Quote from: ampos on 2011-May-27
Remove completly your xcode folder and do Not use glb beta. It creates something different in Xcode than previous versions.
I remove xCode folder each time...
how to compile with non-glb beta ? ???
.. and
what version of Xcode-sdk do you use?
I found people with the same problem (Your app crashed on both Wi-Fi and cellular networks upon launch)

http://forum.unity3d.com/threads/83076-iOS-4.3-App-Rejected (http://forum.unity3d.com/threads/83076-iOS-4.3-App-Rejected)
Title: Re: APPLE App Rejected :-(
Post by: msx on 2011-May-28
Just out of curiosity, did you use the NETWEBGET$ command?
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-May-28
Quote from: msx on 2011-May-28
Just out of curiosity, did you use the NETWEBGET$ command?
no NET commands.... the game is simple...

GLB 9.033
Xcode 3.2.6 - iOS SDK 4.3 (Now i removed)

I Just optimized the code with only GETFILE/PUTFILE instead the INI-commands;
Now install Xcode 3.2.4 - iOS SDK 4.1 and i'll try again to submit the app.

For information APPLE-DEV has removed the link of SDK3... fortunally I kept the DMG  :)
Title: Re: APPLE App Rejected :-(
Post by: Millerszone on 2011-May-28
From reading the Unity thread i believe XCode 4.2 will fix the problem which you can
download here:
https://developer.apple.com/devcenter/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg (https://developer.apple.com/devcenter/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg)

Before trying 4.2, I'll see if my apps get accepted with 4.3
Title: Re: APPLE App Rejected :-(
Post by: Millerszone on 2011-May-28
Reading the complete Unity thread, this post seems to fix the XCode 4.3 problem you might be having:
http://forum.unity3d.com/threads/83076-iOS-4.3-App-Rejected?p=578829&viewfull=1#post578829 (http://forum.unity3d.com/threads/83076-iOS-4.3-App-Rejected?p=578829&viewfull=1#post578829)
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-May-28
Quote from: Millerszone on 2011-May-28
@PaLe
What commands are you using to access the Internet? I noticed the first post said that your app was rejected because:
"We found that your app crashed on iPhone 4 running iOS 4.3.3, which is not in compliance with the App Store Review Guidelines.
Your app crashed on both Wi-Fi and cellular networks upon launch.
"

The message is correct, but I HAVE NOT USED "NET" COMMANDS! An iTunes-connect message told me that the application was refused because it would crash if there was an active Internet connection and WI-FI, but I repeat, I DIDN'T USE NET COMMANDS.


Quote from: Millerszone on 2011-May-28
From reading the Unity thread i believe XCode 4.2 will fix the problem which you can
download here:
https://developer.apple.com/devcenter/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg (https://developer.apple.com/devcenter/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg)

Before trying 4.2, I'll see if my apps get accepted with 4.3

THANKS!!! :good:  :good:  :good:

In the meantime (unfortunally) I have recompiled the "source"with the SDK-3 .2.4-ios-4 .1 and submitted to apple ... is already in review...
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-May-28
Quote from: Millerszone on 2011-May-28
Reading the complete Unity thread, this post seems to fix the XCode 4.3 problem you might be having:
http://forum.unity3d.com/threads/83076-iOS-4.3-App-Rejected?p=578829&viewfull=1#post578829 (http://forum.unity3d.com/threads/83076-iOS-4.3-App-Rejected?p=578829&viewfull=1#post578829)

I'm sorry for the mistake. I searched on Google anything that would explain the reason for this error and I put a WRONG LINK  :nw:
Title: Re: APPLE App Rejected :-(
Post by: spacefractal on 2011-May-29
its could somewhere a loop or timeout issue. I read 4.3 is more strict about timeout under loading and such? make sure to do something feed back under loading me think?
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-May-29
Quote from: spacefractal on 2011-May-29
its could somewhere a loop or timeout issue. I read 4.3 is more strict about timeout under loading and such? make sure to do something feed back under loading me think?
:( I'm sorry, I have problems with English ...What do you mean by "timeout under loading" issue ?

What I wonder is why Apple rejected the application saying that they had the crash with IOS 4-xx when I have chosen instead that the application has not been tested for 4 ios (PHONEOS_DEPLOYMENT_TARGET set to 3.2)
which is why I think it is a problem in xcode-SDK (or for a stupid reviewer!  :D )
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-Jun-04
APP APPROVED !  :happy:

Quote from: spacefractal on 2011-May-29
its could somewhere a loop or timeout issue. I read 4.3 is more strict about timeout under loading and such? make sure to do something feed back under loading me think?

spacefractal, I'm sorry , now I understand what you mean!  ;)

Surely the problem was the Xcode 4, not the "INI" command, however I have replaced with GETFILE/PUTFILE because I have seen faster(in large files, over the 256 lines!)

These are the changes I've made:
Rejected:  Xcode 4.0.1-SDK 4.3; GLB 9.033 source with "INI" commands (PHONEOS_DEPLOYMENT_TARGET set to 3.2)
Approved: Xcode 3.2.4-SDK 4.1; GLB 9.033 source without "INI" commands, replaced with GETFILE/PUTFILE (PHONEOS_DEPLOYMENT_TARGET set to 3.1.2)

If there are real improvements, which of these versions I could try?
Title: Re: APPLE App Rejected :-(
Post by: ampos on 2011-Jun-04
You can not set a program not to work on latest version. You can say "it works on 3.0+" or "it works on 4.0+" but not "it works in <4.0 do not try in 4.0+"

The timeout loading thing is that your program has to give the user some feedback in less than X seconds (perhaps 3? not sure). If not, the program is set a "wrong".

Your program first lines should be

Code (glbasic) Select
loadfont "myfont",1
print "LOADING..."
showscreen


The user must know in few seconds that yopur program is working/making something, and not just broken. A black screen does not help.

You can use also the "default.png" screen to show something while your program is loading.

The current problem we have with GLBasic iOS start is that as soon as our program is loaded, it makes a SCREENOPEN on iOS, removing the default.png screen loaded and opening/creating a black screen, so this default.png screen opened by iOS himself just is open... 1 second.

On one of my programs, my first line is LOADBMP "loading.png" and the loading text is writen in this background, but there is a "black jump" between the iOS default.png screen and my loading.png screen, a think that does not look very professional.

I can imagine a few solutions for this, but they are on Gernot's side:

1.- do not create the iOS screen until the program launchs a SETSCREEN command

2.- Create iOS screen but "do not call iOS showscreen" so the black screen is not shown.

3.- Instead of an iOS' "setscreen" command, do an iOS' "loadbmp 'default.png'" command.
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-Jun-04
Thanks Ampos,
I used like you
Code (glbasic) Select
loadfont "myfont",1
print text$
showscreen

and lost about half a second to choose the language from an external file, then I included the text$ in the code to save time.

In next applications will follow your advice.

p.s
Perhaps I may be wrong,
in 'Xcode3 I have not found but I remember that in' Xcode4 there was an option to display a splash screen
Title: Re: APPLE App Rejected :-(
Post by: ampos on 2011-Jun-04
The splash screen is that default.png file.

Just add a picture called "default.png" in your xcode project, and add it to resources. Also "default@2x.png" for retina does exist, and many for iPad.

http://developer.apple.com/library/ios/#qa/qa1588/_index.html (http://developer.apple.com/library/ios/#qa/qa1588/_index.html)
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-Jun-04
Quote from: ampos on 2011-Jun-04
The splash screen is that default.png file.

Just add a picture called "default.png" in your xcode project, and add it to resources. Also "default@2x.png" for retina does exist, and many for iPad.

http://developer.apple.com/library/ios/#qa/qa1588/_index.html (http://developer.apple.com/library/ios/#qa/qa1588/_index.html)
:good: :good: :good:
tks!! iJust tried (don't forgot the case sensitive  ;) )
Title: APPLE Apps APPROVED
Post by: Millerszone on 2011-Jun-04
Hit the Deck Baseball SD(update) and Just Pong SD(new) iPhone apps got approved and so far no feedback on apps crashing.
I am using XCode 4.3 and GLBasic Beta 9.104.

I used the NETWEBGET command for leaderboards.
If your app is accessing the internet, then test app in airplane mode to make sure it doesn't crash and
give some kind of notification that internet is not available or app could be rejected.

For Default.png I just used a transparent image, I don't like that little flash.
Title: Re: APPLE App Rejected :-(
Post by: PaLe on 2011-Jun-05
Quote from: Millerszone on 2011-Jun-04
Hit the Deck Baseball SD(update) and Just Pong SD apps got approved yesterday.
I am using latest XCode and GLBasic  Beta 9.104.
i Had too many errors (WARNINGS) with xcode4, maybe I'll install the latest 3.2.6-sdk4.2;

Quote
I used the NETWEBGET command for leaderboards.
If your app is accessing the internet, then test app in airplane mode to make sure it doesn't crash and
give some kind of notification that internet is not available or app could be rejected.
I have not planned to use the netwebget command but I remember your advice... even warning that the SAVE is local
Quote
For Default.png I just used a transparent image, I don't like that little flash.
I have not noticed the flicker because I generally use the transparency in PNG image; I'll try anyway just for curiosity  :P
Title: Re: APPLE App Rejected :-(
Post by: mangoo on 2011-Jun-06
oh no i also got this problem now

a customer told me that irace3d is not working on his device so i recreated it, this time not using the beta of glbasic anymore but the lates normal version

the app got accepted but is still crashing on some devices (also on trucidares)

its strange that it works with xcode but not on final devices

any solution beside of the unity flag -all_load yet? i didnt submit it using that flag yet? its working with and without that flag on my devices.

does it help?

Title: Re: APPLE App Rejected :-(
Post by: Kitty Hello on 2011-Jun-06
post the crash report details. Trucidare can reproduce it!?
Title: Re: APPLE App Rejected :-(
Post by: mangoo on 2011-Jun-07
itunes tells me that there are not enough crash reports :(

when i try it at home using xcode everything works fine so i cant reproduce the crash

trucidare tried the xcode project which worked ( i gave him the full xcode project )

when he downloaded the update using itunes it crashed (on his ipod if i remember correctly)

he said that it looked like no graphics could be loaded or something like that: i am writing "loading" while the app is starting using PRINT with my custom font image. he said that loading was written very small and then the app stopped working ( maybe due to the music that starts after loading? )

once i had a similar behaviour on my iphone using xcode 4: in the very first seconds the font is printed very small (so it is the standard because the graphics are not found, i guess), then the graphics seem to be loaded and everything including background is rendering correctly. no crash here.

Title: Re: APPLE App Rejected :-(
Post by: Kitty Hello on 2011-Jun-07
Ahh..... Did you enable the PNG compression Apple has built into XCode?
Title: Re: APPLE App Rejected :-(
Post by: mangoo on 2011-Jun-07
png compression? you mean when i exported my pics in a program like photoshop?

i didnt change my xcode project.
Title: Re: APPLE App Rejected :-(
Post by: Kitty Hello on 2011-Jun-08
XCode has an option to compress PNG images (but they are not compatible with real PNGs then :/ )

The step is called "compress resources". Make sure it's disabled (for distribution _and_ release).

Can someone help here, please?
Title: Re: APPLE App Rejected :-(
Post by: matchy on 2011-Jun-08
If your image media files are PNG then it will compress them although it hasn't effected me lately. The other option is to shoebox them so xcode doesn't compress them.

(Image found via omg google)
(http://i49.tinypic.com/2vdqgqh.png)


Title: Re: APPLE App Rejected :-(
Post by: mangoo on 2011-Jun-09
yes compression is on,

i will turn it off and release a new version. hopefully it works then



i just noticed:


request: fopen("/var/mobile/Applications/093A74C7-A098-4793-B009-ED53EEBC3638/Documents/irace3d/user.ini", "rb") failed
wrt-request: fopen("", "wb") failed
can't write to file: 




i cant save files anymore:

Code (glbasic) Select

LOCAL dir$ = PLATFORMINFO$("Documents") + "/" + "irace3d/"
LOCAL userfilename$ = dir$ + "user.ini"

IF NOT DOESDIREXIST(dir$)
CREATEDIR(dir$)
ELSE
KILLFILE userfilename$
ENDIF

INIOPEN userfilename$
INIPUT "general","muted",settingsmuted
INIOPEN "settings.ini"




maybe there is another problem?
Title: Re: APPLE App Rejected :-(
Post by: Kitty Hello on 2011-Jun-09
Are you using 10x version, already?
can't write to file: L
the "L" character is a bad sign. This smells like a bug.
Title: Re: APPLE App Rejected :-(
Post by: mangoo on 2011-Jun-10
i am using the current beta,

but mylast submitted version that didnt work was builded with the official version of glbasic.


*update*

ah there is already a 10.x beta, i am not sure which version i have, i will have a look this evening
Title: Re: APPLE App Rejected :-(
Post by: mangoo on 2011-Jun-10
i ve update to the newest beta version now   10.013
still the same error


here is the full log
Code (glbasic) Select
[GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:56:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
target remote-mobile /tmp/.XcodeGDBRemote-5454-24
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
[Switching to process 11523 thread 0x0]
[Switching to process 11523 thread 0x0]
`/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/dyld' has changed; re-reading symbols.
`/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/dyld' has changed; re-reading symbols.
sharedlibrary apply-load-rules all
`/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/dyld' has changed; re-reading symbols.
`/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/dyld' has changed; re-reading symbols.
2000-03-13 22:22:34.-104 iRace3D[809:307] *** __NSAutoreleaseNoPool(): Object 0x3eb98aa8 of class NSCFString autoreleased with no pool in place - just leaking
`/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/dyld' has changed; re-reading symbols.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/info/dns.so (file not found).
init with frame.
Scaleing available: self.contentScaleFactor = 1.000000
desktop backing: 320 x 480
mainScreen: 320x480
-applicationDidBecomeActive    -> unpause
BGRA ext supported
init fbo
2D VP
OGRB init [OK]
Cptn
Network
Input
Window mode
Create DXin
reptr
getexe
cd
set cdir to: /var/mobile/Applications/093A74C7-A098-4793-B009-ED53EEBC3638/iRace3D.app
exepath=curdir= /var/mobile/Applications/093A74C7-A098-4793-B009-ED53EEBC3638/iRace3D.app
AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved
Init Finalized
set cdir to: Media
request: fopen("/var/mobile/Applications/093A74C7-A098-4793-B009-ED53EEBC3638/Documents/irace3d/user.ini", "rb") failed
wrt-request: fopen("", "wb") failed

can't write to file: 
Loading Music: menu.mp3
[Switching to process 13059 thread 0x0]
Status: 0
code]
Title: Re: APPLE App Rejected :-(
Post by: MrTAToad on 2011-Jun-10
Looks like its trying to write to an empty file there...  In addition, it looks like the MP3 could be the cause of the problem, or at least the loading of it...
Title: Re: APPLE App Rejected :-(
Post by: mangoo on 2011-Jun-13
hm ya, strange thing is that saving and loading worked before, can i set any writing/reading permissions in my xcode project?

saving and loading is really not working anymore, i tried it changing and saving settings


do i have to convert the mp3 for the new xcode? dou suggest a specific format?








Title: Re: APPLE App Rejected :-(
Post by: Dark Schneider on 2011-Aug-31
You could be interested in this http://www.glbasic.com/forum/index.php?topic=6816.0 (http://www.glbasic.com/forum/index.php?topic=6816.0)