Coder Social home page Coder Social logo

robovm-samples's Introduction

RoboVM

Please see robovm.com for more information.

robovm-samples's People

Contributors

badlogic avatar blueriverinteractive avatar goldeneagle88 avatar henricm avatar loxal avatar ntherning avatar samskivert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

robovm-samples's Issues

QuickContact Example Crash

Hi robovm,

When i run QuickContacts app, i got an error

java.lang.NullPointerException

at java.io.File.fixSlashes(File.java)

at java.io.File.(File.java)

at com.bgate.testradio.QuickContactsViewController.accessGrantedForAddressBook(QuickContactsViewController.java)

at com.bgate.testradio.QuickContactsViewController.checkAddressBookAccess(QuickContactsViewController.java)

at com.bgate.testradio.QuickContactsViewController.(QuickContactsViewController.java)

at com.bgate.testradio.QuickContacts.didFinishLaunching(QuickContacts.java)

at org.robovm.apple.uikit.UIApplicationDelegate$ObjCProxy.$cb$application$didFinishLaunchingWithOptions$(Unknown Source)

at org.robovm.apple.uikit.UIApplication.main(Native Method)

at org.robovm.apple.uikit.UIApplication.main(UIApplication.java)

at com.bgate.testradio.QuickContacts.main(QuickContacts.java)

It's error when run this method

@SuppressWarnings("unchecked")
private void accessGrantedForAddressBook () {
// Load data from the plist file

    String plist = NSBundle.getMainBundle().findResourcePath("Menu", "plist");
    menuArray = (NSArray<NSDictionary<NSString, NSString>>)NSArray.read(new File(plist));
    getTableView().reloadData();
}

Please help me to fix this !

CurrentAddress fails to resolve country code

The CurentAddress sample fails to resolve the country code on startup, rendering the location service non-functional.

2014-09-25 09:51:23.497 CurrentAddress[365:89388] Could not determine current country code: Error Domain=GEOErrorDomain Code=-2 "The operation couldn’t be completed. (GEOErrorDomain error -2.)"

Tested on an iPad 3, 32-bit latest iOS 8.0 build.

Use RoboVM 1.1.0 for samples

1.1.0 is now available. POMs and build.gradle files should updated. BTW, maybe we should have a file in the root of the repo with the RoboVM version used by all samples. Can we get both Maven and Gradle to read this file? Or at least have a central place for specifying this for Gradle. It's a pain to update all build.gradle files to update this now. For Maven we just update the parent POM.

Possible way to prevent the robovm-rt/robovm-cocoatouch dependencies in M2Eclipse imported projects

Can we prevent the robovm-rt and robovm-cocoatouch dependencies to show up in the Maven Dependencies classpath container in Eclipse when importing as a maven project if we enclose these dependencies in a profile which is inactive when M2Eclipse (m2e.version) is detected?

<profiles>
  <profile>
    <id>not-eclipse</id>
    <activation>
      <property>
        <name>!m2e.version</name>
      </property>
    </activation>
    <dependencies>
      <dependency>
        <groupId>org.robovm</groupId>
        <artifactId>robovm-rt</artifactId>
      </dependency>
      <dependency>
        <groupId>org.robovm</groupId>
        <artifactId>robovm-cocoatouch</artifactId>
      </dependency>
    </dependencies>
  </profile>
</profiles>

Updated instructions

Thank for the recent update Niklas.
Although I well know Java & Eclipse, I'm actually new to the Mac. So there are a few things that you can add to the instructions to help developers:

  • Default max memory (512m) is not enough to compile the samples. It fails with an out of memory error when compiling the JRE dependencies. On Eclipse Mac, this value can be changed in eclipse.ini, located in the application content ('Show Package Content' when you right click the app in the finder), then Contents/MacOS.
  • Eclipse can be started with JRE 1.6 even when 1.7 is installed. Typically, you'll get an error stating that the RoboVM plugin failed starting. The JRE to use should be changed in the Info.plist file, located in the application Contents folder. There are some example entries commented out that you should copy and adapt to your own directories. Should look like:
    -vm/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/bin/java

Update samples to use storyboards

The following samples need to be updated with storyboard:

  • Adventure
  • AppPrefs
  • BatteryStatus
  • ContractR
  • CurrentAddress
  • CustomAnimatableProperty
  • DateCell
  • DocInteraction
  • Footprint
  • HelloGL
  • HelloWorld (should have two versions, with/without storyboard)
  • IAPStoreProductViewController
  • InAppPurchases
  • LaunchMe
  • LazyTableImages
  • LocateMe
  • MessageComposer
  • MoveMe
  • MoviePlayer
  • PhotoMap
  • PhotoPicker
  • PhotoScroller
  • QuickContacts
  • Quiz
  • Regions
  • SamplePhotosApp
  • SpeakHere
  • StreetScroller
  • TableSearch
  • Tabster
  • Teslameter
  • TheElements
  • Touches
  • UICatalog
  • VideoRecorder

Make sure ContractR can be imported into IntelliJ

Importing ContractR and have all separate projects working would be nice:

  • Android
  • iOS
  • JavaFX Desktop
  • JavaFX iOS.

Currently I managed to get the iOS part to work, but the Android app complains about unsupported gradle version 0.something.

Tried with IntelliJ CE 14.

Don’t use SNAPSHOTs in master branch

SNAPSHOTS cannot be validated to work with every example. In fact there were compile errors that came due updated APIs and even if there would be a CI that validates compilation, there could be still subtile runtime errors related to the nature of a SNAPSHOT.

How about not using SNAPSHOTS but referring to released & fixed versions instead?

Compiling the samples results to errors

I was trying to compile the sample in Eclipse using the latest plug-in but I'm getting several compilation errors. It looks like there is a incompatibility between the library bundled in the plug-in, and what is expected by the sample. I understand that this is under development, but can you please at least put instructions on what should be done to get the samples running?

gradlew launchIPhoneSimulator fails for HelloWorld example

./gradlew launchIPhoneSimulator --stacktrace
:launchIPhoneSimulator FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launchIPhoneSimulator'.
> No @Marshaler found for parameter 6 of @Callback method <org.robovm.apple.uikit.UIApplicationDelegate$ObjCProxy: boolean $cb$application$openURL$sourceApplication$annotation$(org.robovm.apple.uikit.UIApplicationDelegate,org.robovm.objc.Selector,org.robovm.apple.uikit.UIApplication,org.robovm.apple.foundation.NSURL,java.lang.String,org.robovm.apple.foundation.NSPropertyList)>

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':launchIPhoneSimulator'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:296)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:148)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:105)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:85)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:81)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:39)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Caused by: java.lang.IllegalArgumentException: No @Marshaler found for parameter 6 of @Callback method <org.robovm.apple.uikit.UIApplicationDelegate$ObjCProxy: boolean $cb$application$openURL$sourceApplication$annotation$(org.robovm.apple.uikit.UIApplicationDelegate,org.robovm.objc.Selector,org.robovm.apple.uikit.UIApplication,org.robovm.apple.foundation.NSURL,java.lang.String,org.robovm.apple.foundation.NSPropertyList)>
    at org.robovm.compiler.MarshalerLookup.findMarshalerMethod(MarshalerLookup.java:169)
    at org.robovm.compiler.BroMethodCompiler.getParameterType(BroMethodCompiler.java:491)
    at org.robovm.compiler.BroMethodCompiler.getBridgeOrCallbackFunctionType(BroMethodCompiler.java:512)
    at org.robovm.compiler.BroMethodCompiler.getCallbackFunctionType(BroMethodCompiler.java:504)
    at org.robovm.compiler.CallbackMethodCompiler.callback(CallbackMethodCompiler.java:75)
    at org.robovm.compiler.CallbackMethodCompiler.compileCallback(CallbackMethodCompiler.java:100)
    at org.robovm.compiler.CallbackMethodCompiler.doCompile(CallbackMethodCompiler.java:71)
    at org.robovm.compiler.AbstractMethodCompiler.compile(AbstractMethodCompiler.java:73)
    at org.robovm.compiler.ClassCompiler.callbackMethod(ClassCompiler.java:1139)
    at org.robovm.compiler.ClassCompiler.compile(ClassCompiler.java:620)
    at org.robovm.compiler.ClassCompiler.compile(ClassCompiler.java:276)
    at org.robovm.compiler.AppCompiler.compile(AppCompiler.java:223)
    at org.robovm.compiler.AppCompiler.compile(AppCompiler.java:273)
    at org.robovm.compiler.AppCompiler.compile(AppCompiler.java:316)
    at org.robovm.gradle.tasks.AbstractRoboVMTask.build(AbstractRoboVMTask.java:206)
    at org.robovm.gradle.tasks.AbstractRoboVMTask.build(AbstractRoboVMTask.java:77)
    at org.robovm.gradle.tasks.AbstractIOSSimulatorTask.launch(AbstractIOSSimulatorTask.java:35)
    at org.robovm.gradle.tasks.IPhoneSimulatorTask.invoke(IPhoneSimulatorTask.java:28)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:570)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:553)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 47 more


BUILD FAILED

Total time: 8.186 secs

Add IntelliJ IDEA IDE project meta-data

The repository contain Eclipse project meta-data. I’d suggest to add IntelliJ IDEA project meta-data as well which can be completely stored inside the .idea folder at the root level. For the case when the POM is updated and IntelliJ’s files are not, IntelliJ would auto-update the files itself once it knows the structure of the overall project.

Region sample crashes on iPhone 5

When I use the regions sample app,
place a few regions, and drag the map around,
the app starts crashing, and then crashes on startup.
No amount of killing the app will fix it, until you delete it's data.

Moved from: robovm/robovm#768

Adventure crash - Texture Atlas '...' cannot be found.

Hi,
I'm trying to run Adventure sample. When i do it with ''./gradlew launchIPadSimulator --stacktrace"

I got warnings "Texture Atlas '(Environment)' cannot be found" on every texture and then "java.lang.IndexOutOfBoundsException: index = 0, size = 0" which is understandable because of empty texture array. Do You know how to fix it?

Crash when calling SKScene.getPhysicsWorld().setGravity(...)

SKScene scene = new SKScene();
SKPhysicsWorld physicsWorld = scene.getPhysicsWorld();
physicsWorld.setGravity(new CGVector(0.0, 0.0));

It fails at setGravity:

java.lang.UnsatisfiedLinkError: @Bridge method org/robovm/apple/spritekit/SKPhysicsWorld.$m$setGravity$(Lorg/robovm/apple/spritekit/SKPhysicsWorld;Lorg/robovm/objc/Selector;Lorg/robovm/apple/coregraphics/CGVector;)V not bound

QuickContacts crashes

QuickContacts app crashes on iOS 64-bit 8.0 device when clicking on Edit Unknown Contact

9/24/14 1:55:04 PM: [ERROR] AppLauncher failed with an exception:
9/24/14 1:55:04 PM: [ERROR] java.lang.RuntimeException: Unexpected response from debugserver: $X00;description:5465726d696e617465642064756520746f207369676e616c2036;#00
9/24/14 1:55:04 PM: [ERROR]     at org.robovm.libimobiledevice.util.AppLauncher.pipeStdOut(AppLauncher.java:737)
9/24/14 1:55:04 PM: [ERROR]     at org.robovm.libimobiledevice.util.AppLauncher.launchInternal(AppLauncher.java:667)
9/24/14 1:55:04 PM: [ERROR]     at org.robovm.libimobiledevice.util.AppLauncher.launch(AppLauncher.java:928)
9/24/14 1:55:04 PM: [ERROR]     at org.robovm.compiler.target.ios.AppLauncherProcess$1.run(AppLauncherProcess.java:67)

Same on 32-bit iOS 7.1

2014-09-24 13:57:37.650 QuickContacts[334:60b] -[__NSCFType length]: unrecognized selector sent to instance 0x17659c10
2014-09-24 13:57:37.655 QuickContacts[334:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType length]: unrecognized selector sent to instance 0x17659c10'
*** First throw call stack:
(0x2e774f83 0x3925bccf 0x2e778917 0x2e777203 0x2e6c6768 0x2e74d685 0x2e6cf083 0x2dda5c5b 0x2dda4ee9 0x2ddd0617 0x2dda4b1d 0x2ddaa389 0x3106747b 0x310655eb 0x31065421 0x3106834d 0x31067f25 0x2ddc8401 0x310d77ab 0x2ddaa20f 0x30fac6df 0x2e6be1fd 0x2e6b7be5 0x30fac865 0x3112243f 0x3103fd63 0x3103fb6d 0x3103fb05 0x30f91d59 0x30c0f62b 0x30c0ae3b 0x30c0accd 0x30c0a6df 0x30c0a4ef 0x30c0421d 0x2e740255 0x2e73dbf9 0x2e73df3b 0x2e6a8ebf 0x2e6a8ca3 0x335a3663 0x30ff514d 0x4c95a5 0x4c8b3b 0x4c8b7b 0x6714f3 0x687543 0x68049f 0x68211b 0x682175 0x67c58b 0x675053 0x17c000)
libc++abi.dylib: terminating with uncaught exception of type NSException

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.