Hello all,
today I first time tried out a Gideros to export Xcode project and try it on IOS device. And I have some problems with iAds plugin.
Basically if I use this iads code:
if application:getDeviceInfo() == "iOS" then
require "iad"
if iad and iad.isAvailable() then
banner = iad.Banner.new(iad.Banner.TOP, iad.Banner.LANDSCAPE)
banner:show() -- show it because newly created banners are not visible by default
end
end |
export project to xcode and launch it on my device or simulator I get "Thread1:EXEC_BAD_ACCESS(code=2,address=0x20)" on line
void updateFramePosition()
{
CGRect frame = view_.frame; //Thread1:EXEC_BAD_ACCESS(code=2, address=0x20) |
Is there anything I need to add to the project? I see that iads framework is already added, etc. So what am I doing wrong, and where should I look for more clues/errors/logs in xcode, etc. Really new to all xcode/ios stuff.
Comments
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
Maybe I need to enable ads in developer account, or something else?
And will ads run on simulator or only on device? (talking about debug)
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
this code snippet works well on my device.
https://sites.google.com/site/xraystudiogame
no other steps needed?
Still I'm kind of thinking, why me? Maybe its my fault after all?
https://sites.google.com/site/xraystudiogame
Can you test this new iAd plugin? I guess that orientationDidChange notification is called before iAd view is created. Therefore I've put an extra if statement.
I've prepared sample Gideros project and exported IOS project I'm using, which gets this error.
http://appcodingeasy.com/AdsTestGideros.zip
http://appcodingeasy.com/AdsTestIOS.zip
And I'm running on Mac mini Software OS X 10.8 (12A269) with Xcode Version 4.4.1 (4F1003)
And don't tell me that you don't get any errors when running these projects
well, you simple take what there is in documentation and since the newest Gideros version, there is nothing you need to do additionally. Only problem that iads will work only on IOS Gideros player or IOS exported xcode project
Will try to deploy my first iOS app soon. Looks like it works in iOS Simulator.
When I use "iad" in version 2014.01 of Gideros and my configuration is
Do you know how solve this?
P.S. In project properties Orientation is Landscape
[-] Liasoft
1) that is probably because you have all orientations selected xCode, you need to only leave landscapes there on the main tab
2) for some reason property file did not copy over (that happened once before: http://giderosmobile.com/forum/discussion/comment/32513#Comment_32513)
1) I tried first option in GiOSPlayer and Xcode give me this
----------------------------------------------------------------------
2014-04-08 11:59:01.088 GiOSPlayer[334:60b] *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
*** First throw call stack:
(0x2e50afd3 0x38cb7ccf 0x2e50af15 0x30d984fb 0x30d981d5 0x30d97ea5 0x82f9f 0x30d965a7 0x30d95efb 0x30d9058b 0x30d2c709 0x30d2b871 0x30d8fcc9 0x33344aed 0x333446d7 0x2e4d5ab7 0x2e4d5a53 0x2e4d4227 0x2e43ef4f 0x2e43ed33 0x30d8eef1 0x30d8a16d 0x8210f 0x82098)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
----------------------------------------------------------------------
2) Also read second option and I thought that maybe when GiOPlayer was created the preference in project was Portrait and not LandScape how this image.
Maybe in my final project when I'll create the file for Xcode (keeping in mind your suggestions) I will not have this problem.
Thanks again.
[-] Liasoft
On real app it should work. Also don't forget to enable AutoRotation.
The bug will be fixed as lots of fixes/changes coming to orientation
Likes: HubertRonald